Planeshift

adminmanager.h

Go to the documentation of this file.
00001 /*
00002  * adminmanager.h
00003  *
00004  * Copyright (C) 2001 Atomic Blue ([email protected], http://www.atomicblue.org)
00005  *
00006  *
00007  * This program is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU General Public License
00009  * as published by the Free Software Foundation (version 2 of the License)
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program; if not, write to the Free Software
00016  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00017  *
00018  */
00019 #ifndef __ADMINMANAGER_H__
00020 #define __ADMINMANAGER_H__
00021 
00022 //=============================================================================
00023 // Crystal Space Includes
00024 //=============================================================================
00025 #include <csutil/ref.h>
00026 
00027 //=============================================================================
00028 // Project Includes
00029 //=============================================================================
00030 #include "net/messages.h"            // Chat Message definitions
00031 #include "util/psconst.h"
00032 #include "util/waypoint.h"
00033 
00034 //=============================================================================
00035 // Local Includes
00036 //=============================================================================
00037 #include "msgmanager.h"             // Parent class
00038 #include "gmeventmanager.h"
00039 
00042 #define PETITION_GM 0xFFFFFFFF
00043 
00044 //------------------------------------------------------------------------------------
00045 // Forward Declarations
00046 //------------------------------------------------------------------------------------
00047 class psDatabase;
00048 class psSpawnManager;
00049 class psServer;
00050 class psDatabase;
00051 class EventManager;
00052 class ClientConnectionSet;
00053 class EntityManager;
00054 class psSpawnManager;
00055 class psAdminGameEvent;
00056 class psNPCDialog;
00057 class psItem;
00058 class psSkillInfo;
00059 struct Result;
00060 class iResultSet;
00061 class Client;
00062 class psPathNetwork;
00063 class LocationManager;
00064 class psPath;
00065 class Waypoint;
00066 class WordArray;
00067 class gemNPC;
00068 
00070 enum GM_LEVEL
00071 {
00072     GM_DEVELOPER = 30,
00073     GM_LEVEL_9 = 29,
00074     GM_LEVEL_8 = 28,
00075     GM_LEVEL_7 = 27,
00076     GM_LEVEL_6 = 26,
00077     GM_LEVEL_5 = 25,
00078     GM_LEVEL_4 = 24,
00079     GM_LEVEL_3 = 23,
00080     GM_LEVEL_2 = 22,
00081     GM_LEVEL_1 = 21,
00082     GM_LEVEL_0 = 20,
00083     GM_TESTER  = 10
00084 };
00085 
00089 class psRewardData
00090 {
00091 public:
00093     enum Reward_Type
00094     {
00095         REWARD_EXPERIENCE, 
00096         REWARD_FACTION, 
00097         REWARD_SKILL, 
00098         REWARD_MONEY, 
00099         REWARD_ITEM, 
00100         REWARD_PRACTICE 
00101     };
00102 
00103     Reward_Type rewardType; 
00104 
00107     psRewardData(Reward_Type prewardType);
00108 
00111     virtual ~psRewardData();
00112 
00116     virtual bool IsZero();
00117 
00122     //virtual void Award(int gmClientNum, Client* target);
00123 };
00124 
00126 class psRewardDataExperience : public psRewardData
00127 {
00128 public:
00129     int expDelta; 
00130 
00134     psRewardDataExperience(int pexpDelta);
00135 
00139     virtual bool IsZero(); 
00140 
00141 };
00142 
00144 class psRewardDataFaction : public psRewardData
00145 {
00146 public:
00147     csString factionName; 
00148     int factionDelta; 
00149 
00150     psRewardDataFaction(csString pfactionName, int pfactionDelta);
00151 
00155     virtual bool IsZero(); 
00156 };
00157 
00159 class psRewardDataSkill : public psRewardData
00160 {
00161 public:
00166     csString skillName;
00167     int skillDelta; 
00168     unsigned int skillCap; 
00169 
00172     bool relativeSkill;
00173 
00174     psRewardDataSkill(csString pskillName, int pskillDelta, int pskillCap, bool prelativeSkill);
00175 
00180     virtual bool IsZero(); 
00181 };
00182 
00184 class psRewardDataPractice : public psRewardData
00185 {
00186 public:
00191     csString skillName;
00192     int practice; 
00193 
00194     psRewardDataPractice(csString pSkillName, int pDelta);
00195 
00200     virtual bool IsZero(); 
00201 };
00202 
00204 class psRewardDataMoney : public psRewardData
00205 {
00206 public:
00207     csString moneyType; 
00208 
00211     int moneyCount;
00212     bool random; 
00213 
00219     psRewardDataMoney(csString pmoneyType, int pmoneyCount, bool prandom);
00220 
00224     virtual bool IsZero(); 
00225 };
00226 
00228 class psRewardDataItem : public psRewardData
00229 {
00230 public:
00231     csString itemName; 
00232     unsigned short stackCount; 
00233 
00234     psRewardDataItem(csString pitemName, int pstackCount);
00235 
00239     virtual bool IsZero(); 
00240 };
00241 
00248 enum ADMINCMD_TARGET_TYPES
00249 {
00250     ADMINCMD_TARGET_UNKNOWN = 0, 
00251     ADMINCMD_TARGET_TARGET = 1, 
00252     ADMINCMD_TARGET_PID = 1 << 1, 
00253     ADMINCMD_TARGET_AREA = 1 << 2, 
00254     ADMINCMD_TARGET_ME = 1 << 3, 
00255     ADMINCMD_TARGET_PLAYER = 1 << 4, 
00256     ADMINCMD_TARGET_OBJECT = 1 << 5, 
00257     ADMINCMD_TARGET_NPC = 1 << 6, 
00258     ADMINCMD_TARGET_EID = 1 << 7, 
00259     ADMINCMD_TARGET_ITEM = 1 << 8, 
00260     ADMINCMD_TARGET_CLIENTTARGET = 1 << 9, 
00261     ADMINCMD_TARGET_ACCOUNT = 1 << 10, 
00262     ADMINCMD_TARGET_DATABASE = 1 << 11, 
00263     ADMINCMD_TARGET_STRING = 1 << 14 
00264 };
00265 
00270 class AdminCmdData
00271 {
00272 public:
00273     csString command; 
00274     bool help; 
00275     bool valid; 
00276 
00280     AdminCmdData(csString commandName)
00281         : command(commandName), help(false), valid(true)
00282     {}
00283 
00288     AdminCmdData(csString commandName, WordArray &words);
00289 
00290     virtual ~AdminCmdData()
00291     {}
00292 
00301     virtual AdminCmdData* CreateCmdData(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
00302 
00306     virtual csString GetHelpMessage();
00307 
00314     void ParseError(MsgEntry* me, const char* errmsg);
00315 
00321     virtual bool LogGMCommand(Client* gmClient, const char* cmd);
00322 
00328     virtual bool IsQuietInvalid()
00329     {
00330         return false;
00331     }
00332 
00333 protected:
00341     bool LogGMCommand(Client* gmClient, PID playerID, const char* cmd);
00342 
00348     bool IsHelp(const csString &word)
00349     {
00350         help = (word == "help");
00351         return help;
00352     }
00353 };
00354 
00361 class AdminCmdTargetParser
00362 {
00363 public:
00364     gemObject* targetObject; 
00365     gemActor* targetActor; 
00366     Client* targetClient; 
00367 
00370     bool area; 
00371     bool duplicateActor;
00372     csString target; 
00373     PID targetID; 
00374 
00378     AdminCmdTargetParser(int targetTypes)
00379         : targetObject(NULL), targetActor(NULL), targetClient(NULL),
00380         area(false), duplicateActor(false), target(), targetID(),
00381         allowedTargetTypes(targetTypes), targetTypes(ADMINCMD_TARGET_UNKNOWN),
00382         targetAccountID()
00383     {}
00384 
00387     virtual ~AdminCmdTargetParser()
00388     {}
00389 
00397     bool IsTargetTypeUnknown()
00398     {
00399         return (targetTypes == ADMINCMD_TARGET_UNKNOWN);
00400     }
00401 
00406     bool IsAllowedTargetType(ADMINCMD_TARGET_TYPES targetType)
00407     {
00408         return (allowedTargetTypes & targetType);
00409     }
00410 
00415     bool IsTargetType(ADMINCMD_TARGET_TYPES targetType)
00416     {
00417         return (targetTypes & targetType);
00418     }
00419 
00428     virtual bool ParseTarget(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, csString target);
00429 
00436     virtual csString GetHelpMessagePartForTarget();
00437 
00442     virtual AccountID GetAccountID(size_t gmClientNum);
00443 
00447     bool IsOnline()
00448     {
00449         return (targetObject != NULL);
00450     }
00451 
00452 protected:
00453     int allowedTargetTypes; 
00454     int targetTypes; 
00455     AccountID targetAccountID; 
00456 
00464     bool GetPlayerAccountIDByPID(size_t gmClientNum, const csString &word);
00465 
00474     bool GetPlayerAccountIDByPIDFromName(size_t gmClientNum, const csString &word, bool reporterror);
00475 
00487     bool GetPlayerAccountIDByName(size_t gmClientNum, const csString &word, bool reporterror);
00488 
00497     bool GetPlayerClient(AdminManager* msgManager, size_t gmClientNum, const csString &playerName, bool allowduplicate);
00498 
00503     virtual void Reset();
00504 };
00505 
00509 class AdminCmdSubCommandParser
00510 {
00511 public:
00512     csHash<csString, csString> subCommands; 
00513 
00516     AdminCmdSubCommandParser()
00517     {}
00518 
00525     AdminCmdSubCommandParser(csString commandList);
00526 
00527     virtual ~AdminCmdSubCommandParser()
00528     {}
00529 
00533     virtual csString GetHelpMessage();
00534 
00538     virtual csString GetHelpMessage(const csString &subcommand);
00539 
00544     bool IsSubCommand(const csString &word);
00545 
00551     void Push(csString subcommand, csString helpmsg);
00552 };
00553 
00556 class AdminCmdRewardParser
00557 {
00558 public:
00559     AdminCmdSubCommandParser rewardTypes; 
00560 
00561     csPDelArray<psRewardData> rewards;  
00562     csString error; 
00563 
00564 
00568     AdminCmdRewardParser();
00569 
00570     ~AdminCmdRewardParser()
00571     {}
00572 
00578     bool ParseWords(size_t index, const WordArray &words);
00579 
00583     virtual csString GetHelpMessage();
00584 };
00585 
00591 class AdminCmdOnOffToggleParser
00592 {
00593 public:
00596     enum ADMINCMD_SETTING_ONOFF
00597     {
00598         ADMINCMD_SETTING_UNKNOWN = 0, 
00599         ADMINCMD_SETTING_ON = 1, 
00600         ADMINCMD_SETTING_OFF, 
00601         ADMINCMD_SETTING_TOGGLE 
00602     };
00603 
00604     ADMINCMD_SETTING_ONOFF value; 
00605     csString error; 
00606 
00607     AdminCmdOnOffToggleParser(ADMINCMD_SETTING_ONOFF defaultValue = ADMINCMD_SETTING_UNKNOWN);
00608 
00612     csString GetHelpMessage();
00613 
00617     bool IsOn();
00618 
00622     bool IsOff();
00623 
00627     bool IsToggle();
00628 
00636     bool ParseWord(const csString &word);
00637 };
00638 
00641 class AdminCmdDataTarget : public AdminCmdData, public AdminCmdTargetParser
00642 {
00643 public:
00648     AdminCmdDataTarget(csString commandName, int targetTypes)
00649         : AdminCmdData(commandName), AdminCmdTargetParser(targetTypes)
00650     {}
00651 
00661     AdminCmdDataTarget(csString commandName, int targetTypes, AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
00662 
00663     virtual ~AdminCmdDataTarget()
00664     {}
00665 
00678     virtual AdminCmdData* CreateCmdData(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
00679 
00683     virtual csString GetHelpMessage();
00684 
00690     virtual bool LogGMCommand(Client* gmClient, const char* cmd);
00691 
00696     virtual bool IsQuietInvalid()
00697     {
00698         return IsTargetType(ADMINCMD_TARGET_AREA);
00699     }
00700 };
00701 
00704 class AdminCmdDataTargetReason : public AdminCmdDataTarget
00705 {
00706 public:
00707     csString reason; 
00708 
00712     AdminCmdDataTargetReason(csString command)
00713         : AdminCmdDataTarget(command, ADMINCMD_TARGET_TARGET | ADMINCMD_TARGET_PID | ADMINCMD_TARGET_AREA | ADMINCMD_TARGET_ME | ADMINCMD_TARGET_PLAYER | ADMINCMD_TARGET_EID |ADMINCMD_TARGET_CLIENTTARGET)
00714     {};
00715 
00724     AdminCmdDataTargetReason(csString command, AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
00725 
00726     virtual ~AdminCmdDataTargetReason()
00727     {};
00728 
00736     virtual AdminCmdData* CreateCmdData(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
00737 
00741     virtual csString GetHelpMessage();
00742 };
00743 
00746 class AdminCmdDataDeath : public AdminCmdDataTarget
00747 {
00748 public:
00749     csString requestor; 
00750 
00753     AdminCmdDataDeath()
00754         : AdminCmdDataTarget("/death",  ADMINCMD_TARGET_TARGET | ADMINCMD_TARGET_PID | ADMINCMD_TARGET_PLAYER | ADMINCMD_TARGET_AREA | ADMINCMD_TARGET_CLIENTTARGET | ADMINCMD_TARGET_NPC | ADMINCMD_TARGET_ME | ADMINCMD_TARGET_EID)
00755     {};
00756 
00764     AdminCmdDataDeath(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
00765 
00766     virtual ~AdminCmdDataDeath()
00767     {};
00768 
00776     virtual AdminCmdData* CreateCmdData(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
00777 
00781     virtual csString GetHelpMessage();
00782 };
00783 
00786 class AdminCmdDataDeleteChar : public AdminCmdDataTarget
00787 {
00788 public:
00789     AdminCmdTargetParser requestor; 
00790 
00793     AdminCmdDataDeleteChar()
00794         : AdminCmdDataTarget("/deletechar", ADMINCMD_TARGET_PLAYER | ADMINCMD_TARGET_PID), requestor(ADMINCMD_TARGET_TARGET | ADMINCMD_TARGET_PID | ADMINCMD_TARGET_ME | ADMINCMD_TARGET_PLAYER | ADMINCMD_TARGET_EID | ADMINCMD_TARGET_CLIENTTARGET | ADMINCMD_TARGET_DATABASE)
00795     {};
00796 
00804     AdminCmdDataDeleteChar(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
00805 
00806     virtual ~AdminCmdDataDeleteChar()
00807     {};
00808 
00816     virtual AdminCmdData* CreateCmdData(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
00817 
00821     virtual csString GetHelpMessage();
00822 };
00823 
00824 
00827 class AdminCmdDataUpdateRespawn : public AdminCmdDataTarget
00828 {
00829 public:
00830     csString place; 
00831 
00834     AdminCmdDataUpdateRespawn()
00835         : AdminCmdDataTarget("/updaterespawn", ADMINCMD_TARGET_TARGET | ADMINCMD_TARGET_PID | ADMINCMD_TARGET_AREA | ADMINCMD_TARGET_PLAYER | ADMINCMD_TARGET_ME | ADMINCMD_TARGET_NPC | ADMINCMD_TARGET_EID | ADMINCMD_TARGET_CLIENTTARGET)
00836     {};
00837 
00845     AdminCmdDataUpdateRespawn(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
00846 
00847     virtual ~AdminCmdDataUpdateRespawn()
00848     {};
00849 
00857     virtual AdminCmdData* CreateCmdData(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
00858 
00862     virtual csString GetHelpMessage();
00863 };
00864 
00867 class AdminCmdDataBan : public AdminCmdDataTarget
00868 {
00869 public:
00870     int minutes; 
00871     int hours;   
00872     int days;    
00873     bool banIP;  
00874     csString reason; 
00875 
00878     AdminCmdDataBan()
00879         : AdminCmdDataTarget("/ban", ADMINCMD_TARGET_TARGET | ADMINCMD_TARGET_PID | ADMINCMD_TARGET_AREA | ADMINCMD_TARGET_PLAYER | ADMINCMD_TARGET_ACCOUNT | ADMINCMD_TARGET_EID | ADMINCMD_TARGET_CLIENTTARGET | ADMINCMD_TARGET_DATABASE)
00880     {};
00881 
00889     AdminCmdDataBan(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
00890 
00891     virtual ~AdminCmdDataBan()
00892     {};
00893 
00901     virtual AdminCmdData* CreateCmdData(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
00902 
00906     virtual csString GetHelpMessage();
00907 };
00908 
00911 class AdminCmdDataKillNPC : public AdminCmdDataTarget
00912 {
00913 public:
00914     bool   reload; 
00915     float  damage; 
00916 
00919     AdminCmdDataKillNPC()
00920         : AdminCmdDataTarget("/killnpc", ADMINCMD_TARGET_TARGET | ADMINCMD_TARGET_PID | ADMINCMD_TARGET_AREA | ADMINCMD_TARGET_NPC | ADMINCMD_TARGET_EID | ADMINCMD_TARGET_CLIENTTARGET | ADMINCMD_TARGET_DATABASE), reload(false), damage(0.0)
00921     {};
00922 
00930     AdminCmdDataKillNPC(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
00931 
00932     virtual ~AdminCmdDataKillNPC()
00933     {};
00934 
00943     virtual AdminCmdData* CreateCmdData(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
00944 
00948     virtual csString GetHelpMessage();
00949 };
00950 
00953 class AdminCmdDataPercept : public AdminCmdDataTarget
00954 {
00955 public:
00956     csString perception; 
00957     csString type;       
00958 
00961     AdminCmdDataPercept()
00962         : AdminCmdDataTarget("/percept", ADMINCMD_TARGET_TARGET | ADMINCMD_TARGET_PID | ADMINCMD_TARGET_AREA | ADMINCMD_TARGET_NPC | ADMINCMD_TARGET_EID | ADMINCMD_TARGET_CLIENTTARGET)
00963     {};
00964 
00972     AdminCmdDataPercept(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
00973 
00974     virtual ~AdminCmdDataPercept()
00975     {};
00976 
00985     virtual AdminCmdData* CreateCmdData(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
00986 
00990     virtual csString GetHelpMessage();
00991 };
00992 
00995 class AdminCmdDataChangeNPCType : public AdminCmdDataTarget
00996 {
00997 public:
00998     csString npcType; 
00999 
01002     AdminCmdDataChangeNPCType()
01003         : AdminCmdDataTarget("/changenpctype", ADMINCMD_TARGET_TARGET | ADMINCMD_TARGET_PID | ADMINCMD_TARGET_AREA | ADMINCMD_TARGET_NPC | ADMINCMD_TARGET_EID | ADMINCMD_TARGET_CLIENTTARGET), npcType("")
01004     {};
01005 
01013     AdminCmdDataChangeNPCType(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
01014 
01015     virtual ~AdminCmdDataChangeNPCType()
01016     {};
01017 
01026     virtual AdminCmdData* CreateCmdData(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
01027 
01031     virtual csString GetHelpMessage();
01032 };
01033 
01036 class AdminCmdDataDebugNPC : public AdminCmdDataTarget
01037 {
01038 public:
01039     int debugLevel; 
01040 
01043     AdminCmdDataDebugNPC()
01044         : AdminCmdDataTarget("/debugnpc", ADMINCMD_TARGET_TARGET | ADMINCMD_TARGET_PID | ADMINCMD_TARGET_AREA | ADMINCMD_TARGET_NPC | ADMINCMD_TARGET_EID | ADMINCMD_TARGET_CLIENTTARGET), debugLevel(0)
01045     {};
01046 
01054     AdminCmdDataDebugNPC(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
01055 
01056     virtual ~AdminCmdDataDebugNPC()
01057     {};
01058 
01067     virtual AdminCmdData* CreateCmdData(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
01068 
01072     virtual csString GetHelpMessage();
01073 };
01074 
01077 class AdminCmdDataDebugTribe : public AdminCmdDataTarget
01078 {
01079 public:
01080     int debugLevel; 
01081 
01084     AdminCmdDataDebugTribe()
01085         : AdminCmdDataTarget("/debugtribe", ADMINCMD_TARGET_TARGET | ADMINCMD_TARGET_PID | ADMINCMD_TARGET_AREA | ADMINCMD_TARGET_NPC | ADMINCMD_TARGET_EID | ADMINCMD_TARGET_CLIENTTARGET), debugLevel(0)
01086     {};
01087 
01095     AdminCmdDataDebugTribe(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
01096 
01100     virtual ~AdminCmdDataDebugTribe() {};
01101 
01110     virtual AdminCmdData* CreateCmdData(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
01111 
01115     virtual csString GetHelpMessage();
01116 };
01117 
01120 class AdminCmdDataSetStackable : public AdminCmdDataTarget
01121 {
01122 public:
01123     AdminCmdSubCommandParser subCommandList; 
01124     csString stackableAction; 
01125 
01128     AdminCmdDataSetStackable()
01129         : AdminCmdDataTarget("/setstackable", ADMINCMD_TARGET_TARGET | ADMINCMD_TARGET_AREA | ADMINCMD_TARGET_ITEM | ADMINCMD_TARGET_EID | ADMINCMD_TARGET_CLIENTTARGET), subCommandList("info on off reset help")
01130     {};
01131 
01139     AdminCmdDataSetStackable(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
01140 
01141     virtual ~AdminCmdDataSetStackable()
01142     {};
01143 
01152     virtual AdminCmdData* CreateCmdData(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
01153 
01157     virtual csString GetHelpMessage();
01158 };
01159 
01162 class AdminCmdDataLoadQuest : public AdminCmdData
01163 {
01164 public:
01165     csString questName; 
01166 
01169     AdminCmdDataLoadQuest()
01170         : AdminCmdData("/loadquest")
01171     {};
01172 
01180     AdminCmdDataLoadQuest(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
01181 
01182     virtual ~AdminCmdDataLoadQuest()
01183     {};
01184 
01193     virtual AdminCmdData* CreateCmdData(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
01194 
01198     virtual csString GetHelpMessage();
01199 };
01200 
01203 class AdminCmdDataInfo : public AdminCmdDataTarget
01204 {
01205 public:
01206     csString subCmd; 
01207 
01210     AdminCmdDataInfo()
01211         : AdminCmdDataTarget("/info", ADMINCMD_TARGET_TARGET | ADMINCMD_TARGET_PID | ADMINCMD_TARGET_AREA | ADMINCMD_TARGET_ME | ADMINCMD_TARGET_PLAYER | ADMINCMD_TARGET_OBJECT | ADMINCMD_TARGET_NPC | ADMINCMD_TARGET_EID | ADMINCMD_TARGET_ITEM | ADMINCMD_TARGET_CLIENTTARGET | ADMINCMD_TARGET_DATABASE), subCmd("summary")
01212     {};
01213 
01221     AdminCmdDataInfo(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
01222 
01223     virtual ~AdminCmdDataInfo()
01224     {};
01225 
01234     virtual AdminCmdData* CreateCmdData(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
01235 
01239     virtual csString GetHelpMessage();
01240 };
01241 
01244 class AdminCmdDataItem : public AdminCmdDataTarget
01245 {
01246 public:
01247     bool random; 
01248     int quality; 
01249     int quantity; 
01250 
01253     AdminCmdDataItem()
01254         : AdminCmdDataTarget("/item", ADMINCMD_TARGET_ITEM | ADMINCMD_TARGET_STRING), random(false), quality(50), quantity(1)
01255     {}
01256 
01264     AdminCmdDataItem(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
01265 
01266     virtual ~AdminCmdDataItem()
01267     {}
01268 
01277     virtual AdminCmdData* CreateCmdData(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
01278 
01282     virtual csString GetHelpMessage();
01283 };
01284 
01289 class AdminCmdDataKey : public AdminCmdDataTarget
01290 {
01291 public:
01292     AdminCmdSubCommandParser subCommandList; 
01293     AdminCmdSubCommandParser subTargetCommandList; 
01294     csString subCommand; 
01295 
01298     AdminCmdDataKey()
01299         : AdminCmdDataTarget("/key", ADMINCMD_TARGET_ITEM | ADMINCMD_TARGET_OBJECT | ADMINCMD_TARGET_CLIENTTARGET),
01300           subCommandList("make makemaster copy clearlocks skel"),
01301           subTargetCommandList("changelock makeunlockable securitylockable addlock removelock")
01302     {};
01303 
01311     AdminCmdDataKey(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
01312 
01313     virtual ~AdminCmdDataKey()
01314     {};
01315 
01324     virtual AdminCmdData* CreateCmdData(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
01325 
01329     virtual csString GetHelpMessage();
01330 };
01331 
01334 class AdminCmdDataRunScript : public AdminCmdDataTarget
01335 {
01336 public:
01337     csString scriptName; 
01338     AdminCmdTargetParser origObj; 
01339 
01342     AdminCmdDataRunScript()
01343         : AdminCmdDataTarget("/runscript", ADMINCMD_TARGET_TARGET | ADMINCMD_TARGET_PID | ADMINCMD_TARGET_AREA | ADMINCMD_TARGET_ME | ADMINCMD_TARGET_OBJECT | ADMINCMD_TARGET_PLAYER | ADMINCMD_TARGET_NPC | ADMINCMD_TARGET_EID | ADMINCMD_TARGET_ITEM | ADMINCMD_TARGET_CLIENTTARGET), origObj(ADMINCMD_TARGET_TARGET | ADMINCMD_TARGET_PID | ADMINCMD_TARGET_ME | ADMINCMD_TARGET_OBJECT | ADMINCMD_TARGET_PLAYER | ADMINCMD_TARGET_NPC | ADMINCMD_TARGET_EID | ADMINCMD_TARGET_ITEM | ADMINCMD_TARGET_CLIENTTARGET)
01344     {};
01345 
01353     AdminCmdDataRunScript(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
01354 
01355     virtual ~AdminCmdDataRunScript()
01356     {};
01357 
01366     virtual AdminCmdData* CreateCmdData(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
01367 
01371     virtual csString GetHelpMessage();
01372 };
01373 
01376 class AdminCmdDataCrystal : public AdminCmdDataTarget
01377 {
01378 public:
01379     int interval; 
01380     int random; 
01381     int amount; 
01382     float range; 
01383     csString itemName; 
01384 
01387     AdminCmdDataCrystal()
01388         : AdminCmdDataTarget("/hunt_location", ADMINCMD_TARGET_ITEM | ADMINCMD_TARGET_STRING)
01389     {};
01390 
01398     AdminCmdDataCrystal(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
01399 
01400     virtual ~AdminCmdDataCrystal()
01401     {};
01402 
01411     virtual AdminCmdData* CreateCmdData(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
01412 
01416     virtual csString GetHelpMessage();
01417 };
01418 
01421 class AdminCmdDataTeleport : public AdminCmdDataTarget
01422 {
01423 public:
01424     AdminCmdSubCommandParser destList; 
01425 
01428     AdminCmdTargetParser destObj;
01429     InstanceID destInstance; 
01430     bool destInstanceValid; 
01431     csString dest; 
01432     csString destMap; 
01433     csString destSector; 
01434     float x; 
01435     float y; 
01436     float z; 
01437 
01440     AdminCmdDataTeleport()
01441         : AdminCmdDataTarget("/teleport", ADMINCMD_TARGET_TARGET | ADMINCMD_TARGET_PID | ADMINCMD_TARGET_AREA | ADMINCMD_TARGET_ME | ADMINCMD_TARGET_PLAYER | ADMINCMD_TARGET_OBJECT | ADMINCMD_TARGET_NPC | ADMINCMD_TARGET_EID | ADMINCMD_TARGET_ITEM | ADMINCMD_TARGET_DATABASE), destList("here there last spawn restore"), destObj(ADMINCMD_TARGET_TARGET | ADMINCMD_TARGET_PID | ADMINCMD_TARGET_ME | ADMINCMD_TARGET_PLAYER | ADMINCMD_TARGET_OBJECT | ADMINCMD_TARGET_NPC | ADMINCMD_TARGET_EID | ADMINCMD_TARGET_ITEM)
01442     {};
01443 
01451     AdminCmdDataTeleport(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
01452 
01453     virtual ~AdminCmdDataTeleport()
01454     {};
01455 
01464     virtual AdminCmdData* CreateCmdData(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
01465 
01469     virtual csString GetHelpMessage();
01470 };
01471 
01476 class AdminCmdDataSlide : public AdminCmdDataTarget
01477 {
01478 public:
01479     csString direction; 
01480     float slideAmount; 
01481 
01484     AdminCmdDataSlide()
01485         : AdminCmdDataTarget("/slide", ADMINCMD_TARGET_TARGET | ADMINCMD_TARGET_PID | ADMINCMD_TARGET_AREA | ADMINCMD_TARGET_PLAYER | ADMINCMD_TARGET_NPC | ADMINCMD_TARGET_OBJECT | ADMINCMD_TARGET_EID | ADMINCMD_TARGET_ITEM | ADMINCMD_TARGET_CLIENTTARGET), slideAmount(0)
01486     {}
01487 
01495     AdminCmdDataSlide(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
01496 
01497     virtual ~AdminCmdDataSlide()
01498     {};
01499 
01508     virtual AdminCmdData* CreateCmdData(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
01509 
01513     virtual csString GetHelpMessage();
01514 };
01515 
01518 class AdminCmdDataChangeName : public AdminCmdDataTarget
01519 {
01520 public:
01521     bool uniqueName; 
01522     bool uniqueFirstName; 
01523     csString newName; 
01524     csString newLastName; 
01525 
01528     AdminCmdDataChangeName()
01529         : AdminCmdDataTarget("/changename", ADMINCMD_TARGET_TARGET | ADMINCMD_TARGET_ME | ADMINCMD_TARGET_PLAYER | ADMINCMD_TARGET_PID | ADMINCMD_TARGET_EID | ADMINCMD_TARGET_CLIENTTARGET | ADMINCMD_TARGET_DATABASE), uniqueName(true), uniqueFirstName(true)
01530     {};
01531 
01539     AdminCmdDataChangeName(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
01540 
01541     virtual ~AdminCmdDataChangeName()
01542     {};
01543 
01552     virtual AdminCmdData* CreateCmdData(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
01553 
01557     virtual csString GetHelpMessage();
01558 };
01559 
01560 
01563 class AdminCmdDataChangeGuildName : public AdminCmdData
01564 {
01565 public:
01566     csString guildName; 
01567     csString newName; 
01568 
01571     AdminCmdDataChangeGuildName()
01572         : AdminCmdData("/changeguildname")
01573     {};
01574 
01582     AdminCmdDataChangeGuildName(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
01583 
01584     virtual ~AdminCmdDataChangeGuildName()
01585     {};
01586 
01595     virtual AdminCmdData* CreateCmdData(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
01596 
01600     virtual csString GetHelpMessage();
01601 };
01602 
01605 class AdminCmdDataChangeGuildLeader : public AdminCmdDataTarget
01606 {
01607 public:
01608     csString guildName; 
01609 
01612     AdminCmdDataChangeGuildLeader()
01613         : AdminCmdDataTarget("/changeguildleader", ADMINCMD_TARGET_TARGET | ADMINCMD_TARGET_PID | ADMINCMD_TARGET_ME | ADMINCMD_TARGET_PLAYER | ADMINCMD_TARGET_EID | ADMINCMD_TARGET_CLIENTTARGET | ADMINCMD_TARGET_DATABASE)
01614     {};
01615 
01623     AdminCmdDataChangeGuildLeader(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
01624 
01625     virtual ~AdminCmdDataChangeGuildLeader()
01626     {};
01627 
01636     virtual AdminCmdData* CreateCmdData(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
01637 
01641     virtual csString GetHelpMessage();
01642 };
01643 
01646 class AdminCmdDataPetition : public AdminCmdData
01647 {
01648 public:
01649     csString petition; 
01650 
01653     AdminCmdDataPetition()
01654         : AdminCmdData("/petition")
01655     {};
01656 
01664     AdminCmdDataPetition(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
01665 
01666     virtual ~AdminCmdDataPetition()
01667     {};
01668 
01677     virtual AdminCmdData* CreateCmdData(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
01678 
01682     virtual csString GetHelpMessage();
01683 };
01684 
01689 class AdminCmdDataImpersonate : public AdminCmdDataTarget
01690 {
01691 public:
01692     csString commandMod; 
01693     csString text; 
01694     int duration; 
01695 
01698     AdminCmdDataImpersonate()
01699         : AdminCmdDataTarget("/impersonate", ADMINCMD_TARGET_TARGET | ADMINCMD_TARGET_PID | ADMINCMD_TARGET_ME | ADMINCMD_TARGET_PLAYER | ADMINCMD_TARGET_CLIENTTARGET | ADMINCMD_TARGET_NPC | ADMINCMD_TARGET_EID | ADMINCMD_TARGET_ITEM | ADMINCMD_TARGET_OBJECT)
01700     {};
01701 
01709     AdminCmdDataImpersonate(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
01710 
01711     virtual ~AdminCmdDataImpersonate()
01712     {};
01713 
01722     virtual AdminCmdData* CreateCmdData(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
01723 
01727     virtual csString GetHelpMessage();
01728 };
01729 
01734 class AdminCmdDataDeputize : public AdminCmdDataTarget
01735 {
01736 public:
01737     csString securityLevel; 
01738 
01741     AdminCmdDataDeputize()
01742         : AdminCmdDataTarget("/deputize", ADMINCMD_TARGET_TARGET | ADMINCMD_TARGET_PID | ADMINCMD_TARGET_AREA | ADMINCMD_TARGET_ME | ADMINCMD_TARGET_PLAYER | ADMINCMD_TARGET_EID | ADMINCMD_TARGET_CLIENTTARGET)
01743     {};
01744 
01752     AdminCmdDataDeputize(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
01753 
01754     virtual ~AdminCmdDataDeputize()
01755     {};
01756 
01765     virtual AdminCmdData* CreateCmdData(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
01766 
01770     virtual csString GetHelpMessage();
01771 };
01772 
01775 class AdminCmdDataAward : public AdminCmdDataTarget
01776 {
01777 public:
01778     AdminCmdRewardParser rewardList; 
01779 
01782     AdminCmdDataAward()
01783         : AdminCmdDataTarget("/award", ADMINCMD_TARGET_TARGET | ADMINCMD_TARGET_PID | ADMINCMD_TARGET_AREA | ADMINCMD_TARGET_ME | ADMINCMD_TARGET_PLAYER | ADMINCMD_TARGET_EID |ADMINCMD_TARGET_CLIENTTARGET)
01784     {};
01785 
01793     AdminCmdDataAward(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
01794 
01795     virtual ~AdminCmdDataAward()
01796     {};
01797 
01806     virtual AdminCmdData* CreateCmdData(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
01807 
01811     virtual csString GetHelpMessage();
01812 };
01813 
01816 class AdminCmdDataItemTarget : public AdminCmdDataTarget
01817 {
01818 public:
01819     csString itemName; 
01820     int stackCount; 
01821 
01825     AdminCmdDataItemTarget(csString command)
01826         : AdminCmdDataTarget(command, ADMINCMD_TARGET_TARGET | ADMINCMD_TARGET_PID | ADMINCMD_TARGET_AREA |ADMINCMD_TARGET_PLAYER | ADMINCMD_TARGET_EID |ADMINCMD_TARGET_CLIENTTARGET), stackCount(0)
01827     {};
01828 
01837     AdminCmdDataItemTarget(csString command, AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
01838 
01839     virtual ~AdminCmdDataItemTarget()
01840     {};
01841 
01850     virtual AdminCmdData* CreateCmdData(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
01851 
01855     virtual csString GetHelpMessage();
01856 };
01857 
01860 class AdminCmdDataCheckItem : public AdminCmdDataItemTarget
01861 {
01862 public:
01865     AdminCmdDataCheckItem()
01866         : AdminCmdDataItemTarget("/checkitem")
01867     {};
01868 
01876     AdminCmdDataCheckItem(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
01877 
01878     virtual ~AdminCmdDataCheckItem()
01879     {};
01880 
01889     virtual AdminCmdData* CreateCmdData(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
01890 
01894     virtual csString GetHelpMessage();
01895 };
01896 
01899 class AdminCmdDataSectorTarget : public AdminCmdData
01900 {
01901 public:
01902     bool isClientSector; 
01903     csString sectorName;    
01904     psSectorInfo* sectorInfo; 
01905 
01909     AdminCmdDataSectorTarget(csString command)
01910         : AdminCmdData(command), isClientSector(false), sectorInfo(NULL)
01911     {};
01912 
01921     AdminCmdDataSectorTarget(csString command, AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
01922 
01923     virtual ~AdminCmdDataSectorTarget()
01924     {};
01925 
01934     virtual AdminCmdData* CreateCmdData(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
01935 
01939     virtual csString GetHelpMessage();
01940 
01949     virtual bool ParseTarget(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, csString target);
01950 
01951 
01956     virtual bool GetSectorOfClient(Client* client);
01957 };
01958 
01961 class AdminCmdDataWeather : public AdminCmdDataSectorTarget
01962 {
01963 public:
01964     bool enabled; 
01965     int type; 
01966 
01969     AdminCmdDataWeather()
01970         : AdminCmdDataSectorTarget("/weather"), enabled(false), type(0)
01971     {};
01972 
01980     AdminCmdDataWeather(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
01981 
01982     virtual ~AdminCmdDataWeather()
01983     {};
01984 
01993     virtual AdminCmdData* CreateCmdData(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
01994 
01998     virtual csString GetHelpMessage();
01999 };
02000 
02003 class AdminCmdDataWeatherEffect : public AdminCmdDataSectorTarget
02004 {
02005 public:
02006     bool enabled; 
02007     int particleCount; 
02008     int interval; 
02009     int fadeTime; 
02010 
02014     AdminCmdDataWeatherEffect(csString command)
02015         : AdminCmdDataSectorTarget(command), enabled(false), particleCount(4000), interval(600000), fadeTime(10000)
02016     {};
02017 
02026     AdminCmdDataWeatherEffect(csString command, AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
02027 
02028     virtual ~AdminCmdDataWeatherEffect()
02029     {};
02030 
02039     virtual AdminCmdData* CreateCmdData(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
02040 
02044     virtual csString GetHelpMessage();
02045 };
02046 
02049 class AdminCmdDataFog : public AdminCmdDataSectorTarget
02050 {
02051 public:
02052     bool enabled; 
02053     int density; 
02054     int fadeTime; 
02055     int interval; 
02056     int r; 
02057     int g; 
02058     int b; 
02059 
02062     AdminCmdDataFog()
02063         : AdminCmdDataSectorTarget("/fog"), enabled(false), density(200), fadeTime(10000), interval(0), r(200), g(200), b(200)
02064     {};
02065 
02073     AdminCmdDataFog(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
02074 
02075     virtual ~AdminCmdDataFog()
02076     {};
02077 
02086     virtual AdminCmdData* CreateCmdData(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
02087 
02091     virtual csString GetHelpMessage();
02092 };
02093 
02096 class AdminCmdDataModify : public AdminCmdDataTarget
02097 {
02098 public:
02099     AdminCmdSubCommandParser attributeList;
02100     csString subCommand; 
02101     int interval; 
02102     int maxinterval; 
02103     int amount; 
02104     int range; 
02105     float x; 
02106     float y; 
02107     float z; 
02108     float rot; 
02109     csString skillName; 
02110     int level; 
02111     bool enabled; 
02112 
02115     AdminCmdDataModify()
02116         : AdminCmdDataTarget("/modify", ADMINCMD_TARGET_TARGET | ADMINCMD_TARGET_AREA | ADMINCMD_TARGET_ITEM | ADMINCMD_TARGET_EID | ADMINCMD_TARGET_CLIENTTARGET), attributeList("pickupable unpickable transient npcowned collide settingitem")
02117     {};
02118 
02126     AdminCmdDataModify(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
02127 
02128     virtual ~AdminCmdDataModify()
02129     {};
02130 
02139     virtual AdminCmdData* CreateCmdData(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
02140 
02144     virtual csString GetHelpMessage();
02145 };
02146 
02149 class AdminCmdDataMorph : public AdminCmdDataTarget
02150 {
02151 public:
02152     csString subCommand; 
02153     csString raceName;   
02154     csString genderName; 
02155     csString scale;      
02156 
02159     AdminCmdDataMorph()
02160         : AdminCmdDataTarget("/morph", ADMINCMD_TARGET_TARGET | ADMINCMD_TARGET_PID | ADMINCMD_TARGET_PLAYER | ADMINCMD_TARGET_AREA | ADMINCMD_TARGET_CLIENTTARGET | ADMINCMD_TARGET_ME | ADMINCMD_TARGET_EID)
02161     {};
02162 
02170     AdminCmdDataMorph(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
02171 
02172     virtual ~AdminCmdDataMorph()
02173     {};
02174 
02183     virtual AdminCmdData* CreateCmdData(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
02184 
02188     virtual csString GetHelpMessage();
02189 };
02190 
02193 class AdminCmdDataScale : public AdminCmdDataTarget
02194 {
02195 public:
02196     csString subCommand; 
02197     csString scale;      
02198 
02201     AdminCmdDataScale()
02202         : AdminCmdDataTarget("/scale", ADMINCMD_TARGET_TARGET | ADMINCMD_TARGET_PID | ADMINCMD_TARGET_PLAYER | ADMINCMD_TARGET_AREA | ADMINCMD_TARGET_CLIENTTARGET | ADMINCMD_TARGET_ME | ADMINCMD_TARGET_EID)
02203     {};
02204 
02212     AdminCmdDataScale(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
02213 
02214     virtual ~AdminCmdDataScale()
02215     {};
02216 
02225     virtual AdminCmdData* CreateCmdData(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
02226 
02230     virtual csString GetHelpMessage();
02231 };
02232 
02233 
02236 class AdminCmdDataSetSkill : public AdminCmdDataTarget
02237 {
02238 public:
02242     AdminCmdTargetParser sourcePlayer;
02243     csString subCommand; 
02244     psRewardDataSkill skillData; 
02245     /*
02246     csString skillName; ///< Name of the skill to set
02247     int value; ///< value of the skill
02248     bool relative; ///< when the value should be relative
02249     */
02250 
02253     AdminCmdDataSetSkill()
02254         : AdminCmdDataTarget("/setskill", ADMINCMD_TARGET_TARGET | ADMINCMD_TARGET_PID | ADMINCMD_TARGET_AREA | ADMINCMD_TARGET_ME | ADMINCMD_TARGET_PLAYER | ADMINCMD_TARGET_EID | ADMINCMD_TARGET_CLIENTTARGET), sourcePlayer(ADMINCMD_TARGET_TARGET | ADMINCMD_TARGET_PID | ADMINCMD_TARGET_ME | ADMINCMD_TARGET_PLAYER | ADMINCMD_TARGET_NPC | ADMINCMD_TARGET_EID | ADMINCMD_TARGET_CLIENTTARGET), subCommand(), skillData("",0,0,false)
02255     {};
02256 
02264     AdminCmdDataSetSkill(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
02265 
02266     virtual ~AdminCmdDataSetSkill()
02267     {};
02268 
02277     virtual AdminCmdData* CreateCmdData(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
02278 
02282     virtual csString GetHelpMessage();
02283 };
02284 
02287 class AdminCmdDataSet : public AdminCmdDataTarget
02288 {
02289 public:
02290     AdminCmdSubCommandParser subCommandList; 
02291     AdminCmdSubCommandParser attributeList; 
02292     AdminCmdOnOffToggleParser setting; 
02293 
02294     csString subCommand; 
02295     csString attribute; 
02296 
02299     AdminCmdDataSet()
02300         : AdminCmdDataTarget("/set", ADMINCMD_TARGET_TARGET | ADMINCMD_TARGET_PID | ADMINCMD_TARGET_AREA | ADMINCMD_TARGET_PLAYER | ADMINCMD_TARGET_NPC | ADMINCMD_TARGET_EID | ADMINCMD_TARGET_CLIENTTARGET | ADMINCMD_TARGET_ME), subCommandList("list gm player"), attributeList("invincible invincibility invisibility invisible viewall nevertired nofalldamage infiniteinventory questtester infinitemana instantcast givekillexp attackable buddyhide"), setting()
02301     {};
02302 
02310     AdminCmdDataSet(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
02311 
02312     virtual ~AdminCmdDataSet()
02313     {};
02314 
02323     virtual AdminCmdData* CreateCmdData(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
02324 
02328     virtual csString GetHelpMessage();
02329 };
02330 
02333 class AdminCmdDataSetLabelColor : public AdminCmdDataTarget
02334 {
02335 public:
02336     AdminCmdSubCommandParser labelTypeList; 
02337 
02338     csString labelType; 
02339 
02342     AdminCmdDataSetLabelColor()
02343         : AdminCmdDataTarget("/setlabelcolor", ADMINCMD_TARGET_TARGET | ADMINCMD_TARGET_PID | ADMINCMD_TARGET_AREA  | ADMINCMD_TARGET_ME | ADMINCMD_TARGET_PLAYER | ADMINCMD_TARGET_CLIENTTARGET | ADMINCMD_TARGET_EID), labelTypeList("normal alive dead npc tester gm gm1 player")
02344     {};
02345 
02353     AdminCmdDataSetLabelColor(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
02354 
02355     virtual ~AdminCmdDataSetLabelColor()
02356     {};
02357 
02366     virtual AdminCmdData* CreateCmdData(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
02367 
02371     virtual csString GetHelpMessage();
02372 };
02373 
02376 class AdminCmdDataAction : public AdminCmdDataSectorTarget
02377 {
02378 public:
02379     AdminCmdSubCommandParser subCommandList; 
02380     csString subCommand; 
02381     csString guildName; 
02382     csString description; 
02383 
02386     AdminCmdDataAction()
02387         : AdminCmdDataSectorTarget("/action"), subCommandList("create_entrance")
02388     {};
02389 
02397     AdminCmdDataAction(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
02398 
02399     virtual ~AdminCmdDataAction()
02400     {};
02401 
02410     virtual AdminCmdData* CreateCmdData(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
02411 
02415     virtual csString GetHelpMessage();
02416 };
02417 
02420 class AdminCmdDataLocation : public AdminCmdData
02421 {
02422 public:
02423     AdminCmdSubCommandParser subCommandList; 
02424     csString subCommand; 
02425     csString locationType; 
02426     csString locationName; 
02427     float radius; 
02428     float searchRadius; 
02429     float rotAngle; 
02430 
02433     AdminCmdDataLocation()
02434         : AdminCmdData("/location"), subCommandList("help adjust display hide")
02435     {};
02436 
02444     AdminCmdDataLocation(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
02445 
02446     virtual ~AdminCmdDataLocation()
02447     {};
02448 
02457     virtual AdminCmdData* CreateCmdData(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
02458 
02462     virtual csString GetHelpMessage();
02463 };
02464 
02467 class AdminCmdDataPath : public AdminCmdData
02468 {
02469 public:
02470     AdminCmdSubCommandParser subCommandList; 
02471     AdminCmdSubCommandParser aliasSubCommandList; 
02472     AdminCmdSubCommandParser wpList; 
02473     csString subCmd;    
02474     csString aliasSubCmd; 
02475     bool wpOrPathIsWP; 
02476     float defaultRadius; 
02477     float radius; 
02478     float newRadius; 
02479     csString waypoint; 
02480     csString alias; 
02481     csString flagName; 
02482     csString waypointPathName; 
02483     int firstIndex; 
02484     csString waypointFlags; 
02485     csString pathFlags; 
02486     csString cmdTarget; 
02487     int waypointPathIndex; 
02488     bool wpOrPathIsIndex; 
02489     float rotationAngle; 
02490 
02491 
02494     AdminCmdDataPath()
02495         : AdminCmdData("/path"), subCommandList("adjust alias display format help hide info point start stop"), aliasSubCommandList("add remove"), wpList("waypoints points"), subCmd(), defaultRadius(2.0)
02496     {};
02497 
02505     AdminCmdDataPath(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
02506 
02507     virtual ~AdminCmdDataPath()
02508     {};
02509 
02518     virtual AdminCmdData* CreateCmdData(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
02519 
02523     virtual csString GetHelpMessage();
02524 };
02525 
02528 class AdminCmdDataGameMasterEvent : public AdminCmdData
02529 {
02530 public:
02531     AdminCmdSubCommandParser subCommandList; 
02532     csString subCmd; 
02533 
02534     AdminCmdTargetParser player; 
02535     AdminCmdRewardParser rewardList; 
02536 
02537     csString gmeventName; 
02538     csString gmeventDesc; 
02539 
02540     csString commandMod; 
02541     RangeSpecifier rangeSpecifier; 
02542     float range; 
02543 
02546     AdminCmdDataGameMasterEvent()
02547         : AdminCmdData("/event"), subCommandList("help list"), subCmd(), player(ADMINCMD_TARGET_TARGET | ADMINCMD_TARGET_PLAYER | ADMINCMD_TARGET_CLIENTTARGET)
02548     {};
02549 
02557     AdminCmdDataGameMasterEvent(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
02558 
02559     virtual ~AdminCmdDataGameMasterEvent()
02560     {};
02561 
02570     virtual AdminCmdData* CreateCmdData(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
02571 
02575     virtual csString GetHelpMessage();
02576 };
02577 
02580 class AdminCmdDataHire : public AdminCmdData
02581 {
02582 public:
02583     AdminCmdSubCommandParser subCommandList; 
02584     csString  subCmd;      
02585     csString  typeName;    
02586     csString  typeNPCType; 
02587     PID       masterPID;   
02588 
02589     gemActor* owner;
02590     gemNPC*   hiredNPC;
02591 
02594     AdminCmdDataHire()
02595         : AdminCmdData("/hire"), subCommandList("help list"), subCmd(), owner(NULL), hiredNPC(NULL)
02596     {};
02597 
02605     AdminCmdDataHire(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
02606 
02607     virtual ~AdminCmdDataHire()
02608     {};
02609 
02618     virtual AdminCmdData* CreateCmdData(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
02619 
02623     virtual csString GetHelpMessage();
02624 };
02625 
02628 class AdminCmdDataBadText : public AdminCmdDataTarget
02629 {
02630 public:
02631     int first; 
02632     int last; 
02633 
02636     AdminCmdDataBadText()
02637         : AdminCmdDataTarget("/badtext", ADMINCMD_TARGET_TARGET | ADMINCMD_TARGET_PID | ADMINCMD_TARGET_AREA | ADMINCMD_TARGET_NPC | ADMINCMD_TARGET_EID |ADMINCMD_TARGET_CLIENTTARGET)
02638     {};
02639 
02647     AdminCmdDataBadText(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
02648 
02649     virtual ~AdminCmdDataBadText()
02650     {};
02651 
02660     virtual AdminCmdData* CreateCmdData(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
02661 
02665     virtual csString GetHelpMessage();
02666 };
02667 
02670 class AdminCmdDataQuest : public AdminCmdDataTarget
02671 {
02672 public:
02673     AdminCmdSubCommandParser subCommandList; 
02674     csString subCmd; 
02675     csString questName; 
02676 
02679     AdminCmdDataQuest()
02680         : AdminCmdDataTarget("/quest", ADMINCMD_TARGET_TARGET | ADMINCMD_TARGET_PID | ADMINCMD_TARGET_AREA | ADMINCMD_TARGET_ME | ADMINCMD_TARGET_PLAYER | ADMINCMD_TARGET_EID | ADMINCMD_TARGET_CLIENTTARGET | ADMINCMD_TARGET_DATABASE),
02681           subCommandList("complete list discard assign")
02682     {};
02683 
02691     AdminCmdDataQuest(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
02692 
02693     virtual ~AdminCmdDataQuest()
02694     {};
02695 
02704     virtual AdminCmdData* CreateCmdData(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
02705 
02709     virtual csString GetHelpMessage();
02710 };
02711 
02714 class AdminCmdDataSetQuality : public AdminCmdDataTarget
02715 {
02716 public:
02717     int quality; 
02718     int qualityMax; 
02719 
02722     AdminCmdDataSetQuality()
02723         : AdminCmdDataTarget("/setquality", ADMINCMD_TARGET_TARGET | ADMINCMD_TARGET_AREA |ADMINCMD_TARGET_ITEM | ADMINCMD_TARGET_EID | ADMINCMD_TARGET_CLIENTTARGET)
02724     {};
02725 
02733     AdminCmdDataSetQuality(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
02734 
02735     virtual ~AdminCmdDataSetQuality()
02736     {};
02737 
02746     virtual AdminCmdData* CreateCmdData(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
02747 
02751     virtual csString GetHelpMessage();
02752 };
02753 
02756 class AdminCmdDataSetTrait : public AdminCmdDataTarget
02757 {
02758 public:
02759     csString subCmd; 
02760     csString race; 
02761     PSCHARACTER_GENDER gender; 
02762     csString traitName; 
02763 
02766     AdminCmdDataSetTrait()
02767         : AdminCmdDataTarget("/settrait", ADMINCMD_TARGET_TARGET | ADMINCMD_TARGET_PID | ADMINCMD_TARGET_AREA | ADMINCMD_TARGET_ME | ADMINCMD_TARGET_PLAYER | ADMINCMD_TARGET_EID | ADMINCMD_TARGET_CLIENTTARGET)
02768     {};
02769 
02777     AdminCmdDataSetTrait(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
02778 
02779     virtual ~AdminCmdDataSetTrait()
02780     {};
02781 
02790     virtual AdminCmdData* CreateCmdData(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
02791 
02795     virtual csString GetHelpMessage();
02796 };
02797 
02800 class AdminCmdDataSetItem : public AdminCmdDataTarget
02801 {
02802 public:
02803     csString name; 
02804     csString description; 
02805 
02808     AdminCmdDataSetItem()
02809         : AdminCmdDataTarget("/setitemname", ADMINCMD_TARGET_TARGET | ADMINCMD_TARGET_AREA | ADMINCMD_TARGET_ITEM | ADMINCMD_TARGET_EID |ADMINCMD_TARGET_CLIENTTARGET)
02810     {};
02811 
02819     AdminCmdDataSetItem(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
02820 
02821     virtual ~AdminCmdDataSetItem()
02822     {};
02823 
02832     virtual AdminCmdData* CreateCmdData(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
02833 
02837     virtual csString GetHelpMessage();
02838 };
02839 
02842 class AdminCmdDataReload : public AdminCmdData
02843 {
02844 public:
02845     csString subCmd; 
02846     int itemID; 
02847     AdminCmdSubCommandParser subCommandList; 
02848 
02851     AdminCmdDataReload()
02852         : AdminCmdData("/reload"), itemID(0)
02853     {};
02854 
02862     AdminCmdDataReload(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
02863 
02864     virtual ~AdminCmdDataReload()
02865     {};
02866 
02875     virtual AdminCmdData* CreateCmdData(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
02876 
02880     virtual csString GetHelpMessage();
02881 };
02882 
02885 class AdminCmdDataListWarnings : public AdminCmdDataTarget
02886 {
02887 public:
02890     AdminCmdDataListWarnings()
02891         : AdminCmdDataTarget("/listwarnings", ADMINCMD_TARGET_TARGET | ADMINCMD_TARGET_PID | ADMINCMD_TARGET_AREA | ADMINCMD_TARGET_ME | ADMINCMD_TARGET_PLAYER | ADMINCMD_TARGET_CLIENTTARGET | ADMINCMD_TARGET_DATABASE)
02892     {};
02893 
02901     AdminCmdDataListWarnings(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
02902 
02903     virtual ~AdminCmdDataListWarnings()
02904     {};
02905 
02914     virtual AdminCmdData* CreateCmdData(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
02915 
02919     virtual csString GetHelpMessage();
02920 };
02921 
02924 class AdminCmdDataDisableQuest : public AdminCmdData
02925 {
02926 public:
02927     csString questName; 
02928     bool saveToDb; 
02929 
02932     AdminCmdDataDisableQuest()
02933         : AdminCmdData("/disablequest")
02934     {};
02935 
02943     AdminCmdDataDisableQuest(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
02944 
02945     virtual ~AdminCmdDataDisableQuest()
02946     {};
02947 
02956     virtual AdminCmdData* CreateCmdData(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
02957 
02961     virtual csString GetHelpMessage();
02962 };
02963 
02966 class AdminCmdDataSetKillExp : public AdminCmdDataTarget
02967 {
02968 public:
02969     int expValue; 
02970 
02973     AdminCmdDataSetKillExp()
02974         : AdminCmdDataTarget("/setkillexp", ADMINCMD_TARGET_TARGET | ADMINCMD_TARGET_PID | ADMINCMD_TARGET_AREA | ADMINCMD_TARGET_ME | ADMINCMD_TARGET_PLAYER | ADMINCMD_TARGET_EID | ADMINCMD_TARGET_CLIENTTARGET)
02975     {};
02976 
02984     AdminCmdDataSetKillExp(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
02985 
02986     virtual ~AdminCmdDataSetKillExp()
02987     {};
02988 
02997     virtual AdminCmdData* CreateCmdData(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
02998 
03002     virtual csString GetHelpMessage();
03003 };
03004 
03007 class AdminCmdDataAssignFaction : public AdminCmdDataTarget
03008 {
03009 public:
03010     csString factionName; 
03011     int factionPoints; 
03012 
03015     AdminCmdDataAssignFaction()
03016         : AdminCmdDataTarget("/assignfaction", ADMINCMD_TARGET_TARGET | ADMINCMD_TARGET_PID | ADMINCMD_TARGET_AREA | ADMINCMD_TARGET_ME | ADMINCMD_TARGET_PLAYER | ADMINCMD_TARGET_EID | ADMINCMD_TARGET_CLIENTTARGET)
03017     {};
03018 
03026     AdminCmdDataAssignFaction(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
03027 
03028     virtual ~AdminCmdDataAssignFaction()
03029     {};
03030 
03039     virtual AdminCmdData* CreateCmdData(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
03040 
03044     virtual csString GetHelpMessage();
03045 };
03046 
03049 class AdminCmdDataServerQuit : public AdminCmdData
03050 {
03051 public:
03052     csString reason; 
03053     int time; 
03054 
03057     AdminCmdDataServerQuit()
03058         : AdminCmdData("/serverquit")
03059     {};
03060 
03068     AdminCmdDataServerQuit(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
03069 
03070     virtual ~AdminCmdDataServerQuit()
03071     {};
03072 
03081     virtual AdminCmdData* CreateCmdData(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
03082 
03086     virtual csString GetHelpMessage();
03087 };
03088 
03091 class AdminCmdDataNPCClientQuit : public AdminCmdData
03092 {
03093 public:
03096     AdminCmdDataNPCClientQuit()
03097         : AdminCmdData("/npcclientquit")
03098     {};
03099 
03107     AdminCmdDataNPCClientQuit(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
03108 
03109     virtual ~AdminCmdDataNPCClientQuit()
03110     {};
03111 
03120     virtual AdminCmdData* CreateCmdData(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
03121 
03125     virtual csString GetHelpMessage();
03126 };
03127 
03130 class AdminCmdDataSimple : public AdminCmdData
03131 {
03132 public:
03135     AdminCmdDataSimple(csString commandName)
03136         : AdminCmdData(commandName)
03137     {};
03138 
03149     AdminCmdDataSimple(csString commandName, AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
03150 
03151     virtual ~AdminCmdDataSimple()
03152     {};
03153 
03162     virtual AdminCmdData* CreateCmdData(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
03163 
03167     virtual csString GetHelpMessage();
03168 };
03169 
03170 
03173 class AdminCmdDataRndMsgTest : public AdminCmdData
03174 {
03175 public:
03176     csString text; 
03177     bool sequential; 
03178 
03181     AdminCmdDataRndMsgTest()
03182         : AdminCmdData("/rndmsgtest")
03183     {};
03184 
03192     AdminCmdDataRndMsgTest(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
03193 
03194     virtual ~AdminCmdDataRndMsgTest()
03195     {};
03196 
03207     virtual AdminCmdData* CreateCmdData(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
03208 
03214     virtual csString GetHelpMessage();
03215 };
03216 
03222 class AdminCmdDataList : public AdminCmdData
03223 {
03224 public:
03225     AdminCmdSubCommandParser subCommandList; 
03226     csString subCommand; 
03227 
03231     AdminCmdDataList()
03232         : AdminCmdData("/list"), subCommandList("map")
03233     {};
03234 
03244     AdminCmdDataList(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
03245 
03246     virtual ~AdminCmdDataList()
03247     {};
03248 
03259     virtual AdminCmdData* CreateCmdData(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
03260 
03266     virtual csString GetHelpMessage();
03267 };
03268 
03274 class AdminCmdDataTime : public AdminCmdData
03275 {
03276 public:
03277     AdminCmdSubCommandParser subCommandList; 
03278     csString subCommand; 
03279     int hour,minute;
03280 
03283     AdminCmdDataTime()
03284         : AdminCmdData("/time"), subCommandList("show set"), hour(0), minute(0)
03285     {}
03286 
03296     AdminCmdDataTime(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
03297 
03298     virtual ~AdminCmdDataTime()
03299     {};
03300 
03311     virtual AdminCmdData* CreateCmdData(AdminManager* msgManager, MsgEntry* me, psAdminCmdMessage &msg, Client* client, WordArray &words);
03312 
03318     virtual csString GetHelpMessage();
03319 };
03320 
03321 
03332 class AdminCmdDataFactory
03333 {
03334 public:
03335     AdminCmdDataFactory();
03336     virtual ~AdminCmdDataFactory();
03337 
03342     AdminCmdData* FindFactory(csString datatypename);
03343 
03344     /*/* @brief Register a new AdminCmdData for a command.
03345      * @param func Factory function that creates data objects for the command
03346      * @param datatypename Name of the command to search for (including /)
03347      */
03348     //void RegisterMsgFactoryFunction(AdminCmdMsgFactoryFunc func, const char* datatypename);
03349 
03353     void RegisterMsgFactoryFunction(AdminCmdData* obj);
03354 
03355 protected:
03356     csPDelArray<AdminCmdData> adminCmdDatas; 
03357 };
03358 
03361 class AdminManager : public MessageManager<AdminManager>, public iEffectIDAllocator
03362 {
03363 public:
03364     AdminManager();
03365     virtual ~AdminManager();
03366 
03379     void Admin(int clientnum, Client* client, int requestedLevel = -1);
03380 
03386     void AwardExperienceToTarget(int gmClientnum, Client* target, int ppAward);
03387 
03394     void AdjustFactionStandingOfTarget(int gmClientnum, Client* target, csString factionName, int standingDelta);
03395 
03405     bool ApplySkill(int gmClientNum, Client* target, psSkillInfo* skill, int value, bool relative = false, int cap = 0);
03406 
03413     void AwardToTarget(unsigned int gmClientNum, Client* target, psRewardData* data);
03414 
03420     bool GetStartOfMap(int clientnum, const csString &map, iSector* &targetSector,  csVector3 &targetPoint);
03421 
03426     void HandleNpcCommand(MsgEntry* pMsg, Client* client);
03427 
03430     psPathNetwork* GetPathNetwork()
03431     {
03432         return pathNetwork;
03433     }
03434 
03435     LocationManager* GetLocationManager()
03436     {
03437         return locations;
03438     }
03439 
03440 protected:
03443     AdminCmdDataFactory* dataFactory;
03444 
03449     bool IsReseting(const csString &command);
03450 
03455     void HandleAdminCmdMessage(MsgEntry* pMsg, Client* client);
03456 
03461     void HandlePetitionMessage(MsgEntry* pMsg, Client* client);
03462 
03467     void HandleGMGuiMessage(MsgEntry* pMsg, Client* client);
03468 
03476     void SpawnItemInv(MsgEntry* me, Client* client);
03477 
03483     void SpawnItemInv(MsgEntry* me, psGMSpawnItem &msg, Client* client);
03484 
03490     void HandleLoadQuest(psAdminCmdMessage &msg, AdminCmdData* data, Client* client);
03491 
03498     void GetSiblingChars(MsgEntry* me, psAdminCmdMessage &msg, AdminCmdData* data, Client* client);
03499 
03500 
03507     void GetInfo(MsgEntry* me,psAdminCmdMessage &msg, AdminCmdData* data,Client* client);
03508 
03509 
03516     void CreateNPC(MsgEntry* me,psAdminCmdMessage &msg, AdminCmdData* data, Client* client);
03517 
03524     void KillNPC(MsgEntry* me, psAdminCmdMessage &msg, AdminCmdData* data, Client* client);
03525 
03532     void Percept(MsgEntry* me, psAdminCmdMessage &msg, AdminCmdData* data, Client* client);
03533 
03540     void ChangeNPCType(MsgEntry* me, psAdminCmdMessage &msg, AdminCmdData* cmddata, Client* client);
03541 
03548     void DebugNPC(MsgEntry* me, psAdminCmdMessage &msg, AdminCmdData* cmddata, Client* client);
03549 
03556     void DebugTribe(MsgEntry* me, psAdminCmdMessage &msg, AdminCmdData* cmddata, Client* client);
03557 
03567     void CreateItem(MsgEntry* me, psAdminCmdMessage &msg, AdminCmdData* data, Client* client);
03568 
03575     void ModifyKey(MsgEntry* me, psAdminCmdMessage &msg, AdminCmdData* data, Client* client);
03576 
03587     void ChangeLock(MsgEntry* me, psAdminCmdMessage &msg, AdminCmdData* data, Client* client);
03588 
03599     void MakeUnlockable(MsgEntry* me, psAdminCmdMessage &msg, AdminCmdData* data, Client* client);
03600 
03610     void MakeSecurity(MsgEntry* me, psAdminCmdMessage &msg, AdminCmdData* data, Client* client);
03611 
03612 
03625     void MakeKey(MsgEntry* me, psAdminCmdMessage &msg, AdminCmdData* data, Client* client, bool masterkey);
03626 
03634     void CopyKey(MsgEntry* me, psAdminCmdMessage &msg, AdminCmdData* data, Client* client, psItem* key);
03635 
03643     void AddRemoveLock(MsgEntry* me, psAdminCmdMessage &msg, AdminCmdData* data, Client* client,psItem* key);
03644 
03651     void RunScript(MsgEntry* me, psAdminCmdMessage &msg, AdminCmdData* data, Client* client);
03652 
03664     void CreateHuntLocation(MsgEntry* me, psAdminCmdMessage &msg, AdminCmdData* data, Client* client);
03665 
03672     void ModifyItem(MsgEntry* me, psAdminCmdMessage &msg, AdminCmdData* data, Client* client);
03673 
03685     void Slide(MsgEntry* me,psAdminCmdMessage &msg, AdminCmdData* data, Client* client);
03686 
03691     void TeleportOfflineCharacter(Client* client, AdminCmdDataTeleport* data);
03692 
03699     void Teleport(MsgEntry* me,psAdminCmdMessage &msg, AdminCmdData* data, Client* client);
03700 
03712     bool GetTargetOfTeleport(Client* client, psAdminCmdMessage &msg, AdminCmdData* data, iSector* &targetSector,  csVector3 &targetPoint, float &yRot, gemObject* subject, InstanceID &instance);
03713 
03722     bool MoveObject(Client* client, gemObject* target, csVector3 &pos, float yrot, iSector* sector, InstanceID instance);
03723 
03734     void WarnMessage(MsgEntry* me, psAdminCmdMessage &msg, AdminCmdData* data, Client* client);
03735 
03744     void KickPlayer(MsgEntry* me, psAdminCmdMessage &msg, AdminCmdData* data, Client* client);
03745 
03752     void MutePlayer(MsgEntry* me, psAdminCmdMessage &msg, AdminCmdData* data, Client* client);
03753 
03760     void UnmutePlayer(MsgEntry* me, psAdminCmdMessage &msg, AdminCmdData* data, Client* client);
03761 
03768     void Death(MsgEntry* me, psAdminCmdMessage &msg, AdminCmdData* data, Client* client);
03769 
03776     void Impersonate(MsgEntry* me, psAdminCmdMessage &msg, AdminCmdData* data, Client* client);
03777 
03786     void SetAttrib(MsgEntry* me, psAdminCmdMessage &msg, AdminCmdData* data, Client* client);
03787 
03794     void SetLabelColor(MsgEntry* me, psAdminCmdMessage &msg, AdminCmdData* data, Client* client);
03795 
03800     void Divorce(MsgEntry* me, AdminCmdData* data);
03801 
03806     void ViewMarriage(MsgEntry* me, AdminCmdData* data);
03807 
03814     int PathPointCreate(int pathID, int prevPointId, csVector3 &pos, csString &sectorName);
03815 
03834     void FindPath(csVector3 &pos, iSector* sector, float radius,
03835                   Waypoint** wp, float* rangeWP,
03836                   psPath** path, float* rangePath, int* indexPath, float* fraction,
03837                   psPath** pointPath, float* rangePoint, int* indexPoint);
03838 
03841     virtual uint32_t GetEffectID();
03842 
03848     void HideAllPaths(bool clearSelected);
03849 
03855     void HidePaths(Client* client);
03856 
03862     void HideWaypoints(Client* client);
03863 
03870     void HidePaths(Client* client, iSector* sector);
03871 
03878     void HideWaypoints(Client* client, iSector* sector);
03879 
03883     void RedisplayAllPaths();
03884 
03890     void ShowPaths(Client* client);
03891 
03897     void ShowWaypoints(Client* client);
03898 
03905     void ShowPaths(Client* client, iSector* sector);
03906 
03913     void ShowWaypoints(Client* client, iSector* sector);
03914 
03918     void UpdateDisplayPath(psPathPoint* point);
03919 
03923     void UpdateDisplayWaypoint(Waypoint* wp);
03924 
03933     void HandlePath(MsgEntry* me, psAdminCmdMessage &msg, AdminCmdData* data, Client* client);
03934 
03944     int LocationCreate(int typeID, csVector3 &pos, csString &sectorName, csString &name, int radius);
03945 
03949     void ShowLocations(Client* client);
03950 
03954     void ShowLocations(Client* client, iSector* sector);
03955 
03961     void HideAllLocations(bool clearSelected);
03962 
03965     void HideLocations(Client* client);
03966 
03969     void HideLocations(Client* client, iSector* sector);
03970 
03974     void RedisplayAllLocations();
03975 
03978     void UpdateDisplayLocation(Location* location);
03979 
03988     void HandleLocation(MsgEntry* me, psAdminCmdMessage &msg, AdminCmdData* data, Client* client);
03989 
03998     void HandleActionLocation(MsgEntry* me, psAdminCmdMessage &msg, AdminCmdData* data, Client* client);
03999 
04008     void HandleAddPetition(MsgEntry* me, psAdminCmdMessage &msg, AdminCmdData* data,Client* client);
04009 
04017     void BroadcastDirtyPetitions(int clientNum, bool includeSelf=false);
04018 
04027     bool GetPetitionsArray(csArray<psPetitionInfo> &petitions, Client* client, bool IsGMrequest = false);
04028 
04036     void ListPetitions(MsgEntry* me, psPetitionRequestMessage &msg, Client* client);
04037 
04045     void CancelPetition(MsgEntry* me, psPetitionRequestMessage &msg, Client* client);
04046 
04054     void ChangePetition(MsgEntry* me, psPetitionRequestMessage &msg, Client* client);
04055 
04063     void GMListPetitions(MsgEntry* me, psPetitionRequestMessage &msg, Client* client);
04064 
04074     void GMHandlePetition(MsgEntry* me, psPetitionRequestMessage &msg, Client* client);
04075 
04083     void SendGMPlayerList(MsgEntry* me, psGMGuiMessage &msg, Client* client);
04084 
04094     void HandleList(MsgEntry* me, psAdminCmdMessage &msg, AdminCmdData* data,Client* client);
04095 
04104     void HandleTime(MsgEntry* me, psAdminCmdMessage &msg, AdminCmdData* data,Client* client);
04105 
04114     void ChangeName(MsgEntry* me, psAdminCmdMessage &msg, AdminCmdData* data, Client* client);
04115 
04122     void UpdateRespawn(AdminCmdData* data, Client* client);
04123 
04133     void Weather(MsgEntry* me, psAdminCmdMessage &msg, AdminCmdData* data, Client* client);
04134 
04144     void Rain(MsgEntry* me, psAdminCmdMessage &msg, AdminCmdData* data, Client* client);
04145 
04155     void Snow(MsgEntry* me, psAdminCmdMessage &msg, AdminCmdData* data, Client* client);
04156 
04167     void Thunder(MsgEntry* me, psAdminCmdMessage &msg, AdminCmdData* data, Client* client);
04168 
04178     void Fog(MsgEntry* me, psAdminCmdMessage &msg, AdminCmdData* data, Client* client);
04179 
04194     void DeleteCharacter(MsgEntry* me, psAdminCmdMessage &msg, AdminCmdData* data, Client* client);
04195 
04207     void BanName(MsgEntry* me, psAdminCmdMessage &msg, AdminCmdData* data, Client* client);
04208 
04220     void UnBanName(MsgEntry* me, psAdminCmdMessage &msg, AdminCmdData* data, Client* client);
04221 
04234     void BanClient(MsgEntry* me, psAdminCmdMessage &msg, AdminCmdData* data, Client* client);
04235 
04248     void UnbanClient(MsgEntry* me, psAdminCmdMessage &msg, AdminCmdData* data, Client* client);
04249 
04263     void BanAdvisor(MsgEntry* me, psAdminCmdMessage &msg, AdminCmdData* data, Client* client);
04264 
04277     void UnbanAdvisor(MsgEntry* me, psAdminCmdMessage &msg, AdminCmdData* data, Client* client);
04278 
04287     void SendSpawnTypes(MsgEntry* me, psAdminCmdMessage &msg, AdminCmdData* data, Client* client);
04288 
04295     void SendSpawnItems(MsgEntry* me, Client* client);
04296 
04303     void SendSpawnMods(MsgEntry* me, Client* client);
04304 
04313     void RenameGuild(MsgEntry* me, psAdminCmdMessage &msg, AdminCmdData* data, Client* client);
04314 
04323     void ChangeGuildLeader(MsgEntry* me, psAdminCmdMessage &msg, AdminCmdData* data, Client* client);
04324 
04334     void SendAwardInfo(size_t gmClientnum, Client* target, const char* awardname, const char* awarddesc, int awarded);
04335 
04345     void AwardExperience(MsgEntry* me, psAdminCmdMessage &msg, AdminCmdData* data, Client* client, Client* target);
04346 
04353     void Award(AdminCmdData* data, Client* client);
04354 
04363     void TransferItem(MsgEntry* me, psAdminCmdMessage &msg, AdminCmdData* data, Client* client);
04364 
04372     void CheckItem(MsgEntry* me, psAdminCmdMessage &msg, AdminCmdData* data);
04373 
04382     void FreezeClient(MsgEntry* me, psAdminCmdMessage &msg, AdminCmdData* data, Client* client);
04383 
04392     void ThawClient(MsgEntry* me, psAdminCmdMessage &msg, AdminCmdData* data, Client* client);
04393 
04404     void Inspect(MsgEntry* me, psAdminCmdMessage &msg, AdminCmdData* data, Client* client);
04405 
04416     void SetSkill(MsgEntry* me, psAdminCmdMessage &msg, AdminCmdData* data, Client* client);
04417 
04426     void Morph(MsgEntry* me, psAdminCmdMessage &msg, AdminCmdData* data, Client* client);
04427 
04436     void Scale(MsgEntry* me, psAdminCmdMessage &msg, AdminCmdData* data, Client* client);
04437 
04446     void TempSecurityLevel(MsgEntry* me, psAdminCmdMessage &msg, AdminCmdData* data, Client* client);
04447 
04454     int GetTrueSecurityLevel(AccountID accountID);
04455 
04464     void HandleGMEvent(MsgEntry* me, psAdminCmdMessage &msg, AdminCmdData* data, Client* client);
04465 
04472     void HandleHire(AdminCmdData* data, Client* client);
04473 
04481     void HandleBadText(psAdminCmdMessage &msg, AdminCmdData* data, Client* client);
04482 
04491     void HandleQuest(MsgEntry* me,psAdminCmdMessage &msg, AdminCmdData* data, Client* client);
04492 
04499     void HandleSetQuality(psAdminCmdMessage &msg, AdminCmdData* data, Client* client);
04500 
04509     void ItemStackable(MsgEntry* me, AdminCmdData* data, Client* client);
04510 
04518     void HandleSetTrait(psAdminCmdMessage &msg, AdminCmdData* data, Client* client);
04519 
04527     void HandleSetItemName(psAdminCmdMessage &msg, AdminCmdData* data, Client* client);
04528 
04537     void HandleReload(psAdminCmdMessage &msg, AdminCmdData* data, Client* client);
04538 
04546     void HandleListWarnings(psAdminCmdMessage &msg, AdminCmdData* data, Client* client);
04547 
04555     void CheckTarget(psAdminCmdMessage &msg, AdminCmdData* data, Client* client);
04556 
04565     void DisableQuest(MsgEntry* me, psAdminCmdMessage &msg, AdminCmdData* data, Client* client);
04566 
04575     void SetKillExp(MsgEntry* me, psAdminCmdMessage &msg, AdminCmdData* data, Client* client);
04576 
04585     void AssignFaction(MsgEntry* me, psAdminCmdMessage &msg, AdminCmdData* data, Client* client);
04586 
04595     void HandleServerQuit(MsgEntry* me, psAdminCmdMessage &msg, AdminCmdData* data, Client* client);
04596 
04605     void HandleNPCClientQuit(MsgEntry* me, psAdminCmdMessage &msg, AdminCmdData* data, Client* client);
04606 
04615     void HandleVersion(MsgEntry* me, psAdminCmdMessage &msg, AdminCmdData* data, Client* client);
04616 
04626     bool AddPetition(PID playerID, const char* petition);
04627 
04636     iResultSet* GetPetitions(PID playerID, PID gmID = PETITION_GM);
04637 
04646     bool CancelPetition(PID playerID, int petitionID, bool isGMrequest = false);
04647 
04657     bool ChangePetition(PID playerID, int petitionID, const char* petition);
04658 
04667     bool ClosePetition(PID gmID, int petitionID, const char* desc);
04668 
04676     bool AssignPetition(PID gmID, int petitionID);
04677 
04686     bool DeassignPetition(PID gmID, int gmLevel, int petitionID);
04687 
04697     bool EscalatePetition(PID gmID, int gmLevel, int petitionID);
04698 
04708     bool DescalatePetition(PID gmID, int gmLevel, int petitionID);
04709 
04719     bool LogGMCommand(AccountID accountID, PID gmID, PID playerID, const char* cmd);
04720 
04730     void RandomMessageTest(AdminCmdData* data, Client* client);
04731 
04738     const char* GetLastSQLError();
04739 
04740     csString lasterror; 
04741 
04742     ClientConnectionSet* clients; 
04743 
04744 
04750     void SendGMAttribs(Client* client);
04751 
04760     psNPCDialog* npcdlg;
04761 
04765     psPathNetwork* pathNetwork;
04766 
04770     LocationManager* locations;
04771 };
04772 
04773 #endif