From: Ian D. <ia...@us...> - 2004-04-18 18:17:48
|
Update of /cvsroot/planeshift/planeshift/src/server In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2696 Modified Files: command.cpp Log Message: Added 'importnpc' and 'exportnpc' commands. Index: command.cpp =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/server/command.cpp,v retrieving revision 1.117 retrieving revision 1.118 diff -C2 -d -r1.117 -r1.118 *** command.cpp 15 Apr 2004 12:39:03 -0000 1.117 --- command.cpp 18 Apr 2004 18:17:40 -0000 1.118 *************** *** 425,428 **** --- 425,449 ---- + int com_importnpc(char* fileName) + { + AdminManager * adminmgr = psserver->GetAdminManager(); + + // Call this thread save function to initiate loading of NPC. + adminmgr->AdminImportNPC(fileName); + + return 0; + } + + + int com_exportnpc(char *NPCName) + { + AdminManager * adminmgr = psserver->GetAdminManager(); + + adminmgr->AdminExportNPC(NPCName); + + return 0; + } + + int com_newacct(char *userpass) { *************** *** 1328,1331 **** --- 1349,1354 ---- { "rain", com_rain, "Forces it to start or stop raining in a sector"}, { "loadnpc", com_loadnpc, "Loads/Reloads an NPC from the DB into the world"}, + { "importnpc", com_importnpc, "Loads NPC data from a XML file and inserts it into the DB"}, + { "exportnpc", com_exportnpc, "Loads NPC data from the DB and stores it in a XML file"}, { "newacct", com_newacct, "Create a new account: newacct <user/passwd>" }, // { "newguild", com_newguild, "Create a new guild: newguild <name/leader>" }, |