Planeshift
|
Base class for all the data classes for admin commands. More...
#include <adminmanager.h>
Public Member Functions | |
AdminCmdData (csString commandName) | |
creates data object for the specified command. | |
AdminCmdData (csString commandName, WordArray &words) | |
Parses the given message and stores its data. | |
virtual AdminCmdData * | CreateCmdData (AdminManager *msgManager, MsgEntry *me, psAdminCmdMessage &msg, Client *client, WordArray &words) |
Creates a command data object of the current class containing the parsed data. | |
virtual csString | GetHelpMessage () |
Retrieve help message for the command that fits to the data. | |
virtual bool | IsQuietInvalid () |
Used for overriding. | |
virtual bool | LogGMCommand (Client *gmClient, const char *cmd) |
Logs the game master command. | |
void | ParseError (MsgEntry *me, const char *errmsg) |
Sends the error message to the gm and invalidates the object. | |
virtual | ~AdminCmdData () |
Public Attributes | |
csString | command |
command name this obj contains data for | |
bool | help |
flag for displaying help (true for displaying help) | |
bool | valid |
flag for setting content valid/invalid | |
Protected Member Functions | |
bool | IsHelp (const csString &word) |
Test for help word and store help state when found. | |
bool | LogGMCommand (Client *gmClient, PID playerID, const char *cmd) |
logs the game master command and target to the database. |
Base class for all the data classes for admin commands.
Contains Data and parsing facilities for admin commands.
Definition at line 270 of file adminmanager.h.
AdminCmdData::AdminCmdData | ( | csString | commandName | ) | [inline] |
creates data object for the specified command.
commandName | name of the command (e.g. /ban) |
Definition at line 280 of file adminmanager.h.
AdminCmdData::AdminCmdData | ( | csString | commandName, |
WordArray & | words | ||
) |
Parses the given message and stores its data.
commandName | name of the command (e.g. /ban) |
words | command message to parse |
virtual AdminCmdData::~AdminCmdData | ( | ) | [inline, virtual] |
Definition at line 290 of file adminmanager.h.
virtual AdminCmdData* AdminCmdData::CreateCmdData | ( | AdminManager * | msgManager, |
MsgEntry * | me, | ||
psAdminCmdMessage & | msg, | ||
Client * | client, | ||
WordArray & | words | ||
) | [virtual] |
Creates a command data object of the current class containing the parsed data.
msgManager | message manager that handles this command |
me | Message sent by the client |
msg | psAdminCmdMessage containing the message |
client | client of the network communication |
words | command message to parse |
Reimplemented in AdminCmdDataTarget, AdminCmdDataTargetReason, AdminCmdDataDeath, AdminCmdDataDeleteChar, AdminCmdDataUpdateRespawn, AdminCmdDataBan, AdminCmdDataKillNPC, AdminCmdDataPercept, AdminCmdDataChangeNPCType, AdminCmdDataDebugNPC, AdminCmdDataDebugTribe, AdminCmdDataSetStackable, AdminCmdDataLoadQuest, AdminCmdDataInfo, AdminCmdDataItem, AdminCmdDataKey, AdminCmdDataRunScript, AdminCmdDataCrystal, AdminCmdDataTeleport, AdminCmdDataSlide, AdminCmdDataChangeName, AdminCmdDataChangeGuildName, AdminCmdDataChangeGuildLeader, AdminCmdDataPetition, AdminCmdDataImpersonate, AdminCmdDataDeputize, AdminCmdDataAward, AdminCmdDataItemTarget, AdminCmdDataCheckItem, AdminCmdDataSectorTarget, AdminCmdDataWeather, AdminCmdDataWeatherEffect, AdminCmdDataFog, AdminCmdDataModify, AdminCmdDataMorph, AdminCmdDataScale, AdminCmdDataSetSkill, AdminCmdDataSet, AdminCmdDataSetLabelColor, AdminCmdDataAction, AdminCmdDataLocation, AdminCmdDataPath, AdminCmdDataGameMasterEvent, AdminCmdDataHire, AdminCmdDataBadText, AdminCmdDataQuest, AdminCmdDataSetQuality, AdminCmdDataSetTrait, AdminCmdDataSetItem, AdminCmdDataReload, AdminCmdDataListWarnings, AdminCmdDataDisableQuest, AdminCmdDataSetKillExp, AdminCmdDataAssignFaction, AdminCmdDataServerQuit, AdminCmdDataNPCClientQuit, AdminCmdDataSimple, AdminCmdDataRndMsgTest, AdminCmdDataList, and AdminCmdDataTime.
virtual csString AdminCmdData::GetHelpMessage | ( | ) | [virtual] |
Retrieve help message for the command that fits to the data.
Reimplemented in AdminCmdDataTarget, AdminCmdDataTargetReason, AdminCmdDataDeath, AdminCmdDataDeleteChar, AdminCmdDataUpdateRespawn, AdminCmdDataBan, AdminCmdDataKillNPC, AdminCmdDataPercept, AdminCmdDataChangeNPCType, AdminCmdDataDebugNPC, AdminCmdDataDebugTribe, AdminCmdDataSetStackable, AdminCmdDataLoadQuest, AdminCmdDataInfo, AdminCmdDataItem, AdminCmdDataKey, AdminCmdDataRunScript, AdminCmdDataCrystal, AdminCmdDataTeleport, AdminCmdDataSlide, AdminCmdDataChangeName, AdminCmdDataChangeGuildName, AdminCmdDataChangeGuildLeader, AdminCmdDataPetition, AdminCmdDataImpersonate, AdminCmdDataDeputize, AdminCmdDataAward, AdminCmdDataItemTarget, AdminCmdDataCheckItem, AdminCmdDataSectorTarget, AdminCmdDataWeather, AdminCmdDataWeatherEffect, AdminCmdDataFog, AdminCmdDataModify, AdminCmdDataMorph, AdminCmdDataScale, AdminCmdDataSetSkill, AdminCmdDataSet, AdminCmdDataSetLabelColor, AdminCmdDataAction, AdminCmdDataLocation, AdminCmdDataPath, AdminCmdDataGameMasterEvent, AdminCmdDataHire, AdminCmdDataBadText, AdminCmdDataQuest, AdminCmdDataSetQuality, AdminCmdDataSetTrait, AdminCmdDataSetItem, AdminCmdDataReload, AdminCmdDataListWarnings, AdminCmdDataDisableQuest, AdminCmdDataSetKillExp, AdminCmdDataAssignFaction, AdminCmdDataServerQuit, AdminCmdDataNPCClientQuit, AdminCmdDataSimple, AdminCmdDataRndMsgTest, AdminCmdDataList, and AdminCmdDataTime.
bool AdminCmdData::IsHelp | ( | const csString & | word | ) | [inline, protected] |
Test for help word and store help state when found.
word | to test |
Definition at line 348 of file adminmanager.h.
virtual bool AdminCmdData::IsQuietInvalid | ( | ) | [inline, virtual] |
Used for overriding.
If it's true the command will have no visual effects and will be discarded.
Reimplemented in AdminCmdDataTarget.
Definition at line 328 of file adminmanager.h.
virtual bool AdminCmdData::LogGMCommand | ( | Client * | gmClient, |
const char * | cmd | ||
) | [virtual] |
Logs the game master command.
gmClient | issuing the command |
cmd | command message issued |
Reimplemented in AdminCmdDataTarget.
bool AdminCmdData::LogGMCommand | ( | Client * | gmClient, |
PID | playerID, | ||
const char * | cmd | ||
) | [protected] |
logs the game master command and target to the database.
/slide command cannot be logged with this function.
gmClient | issuing the command |
playerID | targeted player (if applicable) |
cmd | command message issued |
void AdminCmdData::ParseError | ( | MsgEntry * | me, |
const char * | errmsg | ||
) |
Sends the error message to the gm and invalidates the object.
errormessage is sent to the gm client and valid is set to false.
me | The incoming message from the GM |
errmsg | error message |
csString AdminCmdData::command |
command name this obj contains data for
Definition at line 273 of file adminmanager.h.
bool AdminCmdData::help |
flag for displaying help (true for displaying help)
Definition at line 274 of file adminmanager.h.
bool AdminCmdData::valid |
flag for setting content valid/invalid
Definition at line 275 of file adminmanager.h.