Planeshift
|
Base class for all commands that need a target to work on. More...
#include <adminmanager.h>
Public Member Functions | |
AdminCmdDataTarget (csString commandName, int targetTypes) | |
Creates obj for the given command and allowed target types. More... | |
AdminCmdDataTarget (csString commandName, int targetTypes, AdminManager *msgManager, MsgEntry *me, psAdminCmdMessage &msg, Client *client, WordArray &words) | |
Creates obj for the given command and allowed target types. More... | |
virtual AdminCmdData * | CreateCmdData (AdminManager *msgManager, MsgEntry *me, psAdminCmdMessage &msg, Client *client, WordArray &words) |
Creates a command data object containing the parsed data. More... | |
virtual csString | GetHelpMessage () |
Retrieve help message for the command that fits to the data. More... | |
virtual bool | IsQuietInvalid () |
Used to invalidate commands with area as they will be handled elsewhere. More... | |
virtual bool | LogGMCommand (Client *gmClient, const char *cmd) |
Logs the game master command. More... | |
virtual | ~AdminCmdDataTarget () |
![]() | |
AdminCmdData (csString commandName) | |
creates data object for the specified command. More... | |
AdminCmdData (csString commandName, WordArray &words) | |
Parses the given message and stores its data. More... | |
void | ParseError (MsgEntry *me, const char *errmsg) |
Sends the error message to the gm and invalidates the object. More... | |
virtual | ~AdminCmdData () |
![]() | |
AdminCmdTargetParser (int targetTypes) | |
default constructor. More... | |
virtual AccountID | GetAccountID (size_t gmClientNum) |
Returns the AccountID when the target is a player. More... | |
virtual csString | GetHelpMessagePartForTarget () |
Returns a helpmessage string for the allowed types of the target. More... | |
bool | IsAllowedTargetType (ADMINCMD_TARGET_TYPES targetType) |
Test whether the given target type is allowed or not. More... | |
bool | IsOnline () |
Returns true when the 'target' is online. More... | |
bool | IsTargetType (ADMINCMD_TARGET_TYPES targetType) |
Test whether the given target type is of the supplied type or not. More... | |
bool | IsTargetTypeUnknown () |
Test for unparsable targettype. More... | |
virtual bool | ParseTarget (AdminManager *msgManager, MsgEntry *me, psAdminCmdMessage &msg, Client *client, csString target) |
Tries to parse the supplied string as a destination. More... | |
virtual | ~AdminCmdTargetParser () |
the default destructor. More... | |
Additional Inherited Members | |
![]() | |
csString | command |
command name this obj contains data for More... | |
bool | help |
flag for displaying help (true for displaying help) More... | |
bool | valid |
flag for setting content valid/invalid More... | |
![]() | |
bool | area |
is set to true if a character was found by name and multiple name instances were found. More... | |
bool | duplicateActor |
csString | target |
player that is target for the command More... | |
gemActor * | targetActor |
set to the targets actor when possible More... | |
Client * | targetClient |
set to the targets client when possible More... | |
PID | targetID |
stores PID when target is a player/npc/???? specified by PID More... | |
gemObject * | targetObject |
set to the object of the target when possible More... | |
![]() | |
bool | IsHelp (const csString &word) |
Test for help word and store help state when found. More... | |
bool | LogGMCommand (Client *gmClient, PID playerID, const char *cmd) |
logs the game master command and target to the database. More... | |
![]() | |
bool | GetPlayerAccountIDByName (size_t gmClientNum, const csString &word, bool reporterror) |
Tries to resolve a player name to pid and accountid. More... | |
bool | GetPlayerAccountIDByPID (size_t gmClientNum, const csString &word) |
Tries to resolve player by pid:PID to accountid. More... | |
bool | GetPlayerAccountIDByPIDFromName (size_t gmClientNum, const csString &word, bool reporterror) |
Tries to resolve a player name to pid and accountid. More... | |
bool | GetPlayerClient (AdminManager *msgManager, size_t gmClientNum, const csString &playerName, bool allowduplicate) |
Tries to find a client by name and checks for duplicates. More... | |
virtual void | Reset () |
resets the internal variables to their default values. More... | |
![]() | |
int | allowedTargetTypes |
allowed destination types More... | |
AccountID | targetAccountID |
internal cache value for accountID More... | |
int | targetTypes |
type of the parsed target More... | |
Base class for all commands that need a target to work on.
Definition at line 641 of file adminmanager.h.
|
inline |
Creates obj for the given command and allowed target types.
commandName | name of the command (e.g. /ban) |
targetTypes | bitmask based on the ADMINCMD_TARGET_TYPES |
Definition at line 648 of file adminmanager.h.
AdminCmdDataTarget::AdminCmdDataTarget | ( | csString | commandName, |
int | targetTypes, | ||
AdminManager * | msgManager, | ||
MsgEntry * | me, | ||
psAdminCmdMessage & | msg, | ||
Client * | client, | ||
WordArray & | words | ||
) |
Creates obj for the given command and allowed target types.
commandName | name of the command (e.g. /ban) |
targetTypes | bitmask based on the ADMINCMD_TARGET_TYPES |
msgManager | message manager that handles this command |
me | The incoming message from the GM |
msg | psAdminCmdMessage containing the message |
client | client of the network communication |
words | command message to parse |
|
inlinevirtual |
Definition at line 663 of file adminmanager.h.
|
virtual |
Creates a command data object containing the parsed data.
The created object is most likely a derived class that parses the given command string and stores the data internally for further use. That kind of new object is passed back by this function.
msgManager | message manager that handles this command |
me | The incoming message from the GM |
msg | psAdminCmdMessage containing the message |
client | client of the network communication |
words | command message to parse |
Reimplemented from AdminCmdData.
Reimplemented in AdminCmdDataAssignFaction, AdminCmdDataSetKillExp, AdminCmdDataListWarnings, AdminCmdDataSetItem, AdminCmdDataSetTrait, AdminCmdDataSetQuality, AdminCmdDataQuest, AdminCmdDataBadText, AdminCmdDataSetLabelColor, AdminCmdDataSet, AdminCmdDataSetSkill, AdminCmdDataScale, AdminCmdDataMorph, AdminCmdDataModify, AdminCmdDataCheckItem, AdminCmdDataItemTarget, AdminCmdDataAward, AdminCmdDataDeputize, AdminCmdDataImpersonate, AdminCmdDataChangeGuildLeader, AdminCmdDataChangeName, AdminCmdDataSlide, AdminCmdDataTeleport, AdminCmdDataCrystal, AdminCmdDataRunScript, AdminCmdDataKey, AdminCmdDataItem, AdminCmdDataInfo, AdminCmdDataSetStackable, AdminCmdDataDebugTribe, AdminCmdDataDebugNPC, AdminCmdDataChangeNPCType, AdminCmdDataPercept, AdminCmdDataKillNPC, AdminCmdDataBan, AdminCmdDataUpdateRespawn, AdminCmdDataDeleteChar, AdminCmdDataDeath, and AdminCmdDataTargetReason.
|
virtual |
Retrieve help message for the command that fits to the data.
Reimplemented from AdminCmdData.
Reimplemented in AdminCmdDataAssignFaction, AdminCmdDataSetKillExp, AdminCmdDataListWarnings, AdminCmdDataSetItem, AdminCmdDataSetTrait, AdminCmdDataSetQuality, AdminCmdDataQuest, AdminCmdDataBadText, AdminCmdDataSetLabelColor, AdminCmdDataSet, AdminCmdDataSetSkill, AdminCmdDataScale, AdminCmdDataMorph, AdminCmdDataModify, AdminCmdDataCheckItem, AdminCmdDataItemTarget, AdminCmdDataAward, AdminCmdDataDeputize, AdminCmdDataImpersonate, AdminCmdDataChangeGuildLeader, AdminCmdDataChangeName, AdminCmdDataSlide, AdminCmdDataTeleport, AdminCmdDataCrystal, AdminCmdDataRunScript, AdminCmdDataKey, AdminCmdDataItem, AdminCmdDataInfo, AdminCmdDataSetStackable, AdminCmdDataDebugTribe, AdminCmdDataDebugNPC, AdminCmdDataChangeNPCType, AdminCmdDataPercept, AdminCmdDataKillNPC, AdminCmdDataBan, AdminCmdDataUpdateRespawn, AdminCmdDataDeleteChar, AdminCmdDataDeath, and AdminCmdDataTargetReason.
|
inlinevirtual |
Used to invalidate commands with area as they will be handled elsewhere.
Reimplemented from AdminCmdData.
Definition at line 696 of file adminmanager.h.
|
virtual |
Logs the game master command.
gmClient | issuing the command |
cmd | command message issued |
Reimplemented from AdminCmdData.