Planeshift
Public Member Functions

AdminCmdDataTarget Class Reference

Base class for all commands that need a target to work on. More...

#include <adminmanager.h>

List of all members.

Public Member Functions

 AdminCmdDataTarget (csString commandName, int targetTypes)
 Creates obj for the given command and allowed target types.
 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.
virtual AdminCmdDataCreateCmdData (AdminManager *msgManager, MsgEntry *me, psAdminCmdMessage &msg, Client *client, WordArray &words)
 Creates a command data object containing the parsed data.
virtual csString GetHelpMessage ()
 Retrieve help message for the command that fits to the data.
virtual bool IsQuietInvalid ()
 Used to invalidate commands with area as they will be handled elsewhere.
virtual bool LogGMCommand (Client *gmClient, const char *cmd)
 Logs the game master command.
virtual ~AdminCmdDataTarget ()

Detailed Description

Base class for all commands that need a target to work on.

Definition at line 641 of file adminmanager.h.


Constructor & Destructor Documentation

AdminCmdDataTarget::AdminCmdDataTarget ( csString  commandName,
int  targetTypes 
) [inline]

Creates obj for the given command and allowed target types.

Parameters:
commandNamename of the command (e.g. /ban)
targetTypesbitmask 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.

Parameters:
commandNamename of the command (e.g. /ban)
targetTypesbitmask based on the ADMINCMD_TARGET_TYPES
msgManagermessage manager that handles this command
meThe incoming message from the GM
msgpsAdminCmdMessage containing the message
clientclient of the network communication
wordscommand message to parse
virtual AdminCmdDataTarget::~AdminCmdDataTarget ( ) [inline, virtual]

Definition at line 663 of file adminmanager.h.


Member Function Documentation

virtual AdminCmdData* AdminCmdDataTarget::CreateCmdData ( AdminManager msgManager,
MsgEntry me,
psAdminCmdMessage msg,
Client client,
WordArray words 
) [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.

Parameters:
msgManagermessage manager that handles this command
meThe incoming message from the GM
msgpsAdminCmdMessage containing the message
clientclient of the network communication
wordscommand message to parse
Returns:
AdminCmdData*: pointer to object containing parsed data. When parsing failed the valid flag is set to false.

Reimplemented from AdminCmdData.

Reimplemented in AdminCmdDataTargetReason, AdminCmdDataDeath, AdminCmdDataDeleteChar, AdminCmdDataUpdateRespawn, AdminCmdDataBan, AdminCmdDataKillNPC, AdminCmdDataPercept, AdminCmdDataChangeNPCType, AdminCmdDataDebugNPC, AdminCmdDataDebugTribe, AdminCmdDataSetStackable, AdminCmdDataInfo, AdminCmdDataItem, AdminCmdDataKey, AdminCmdDataRunScript, AdminCmdDataCrystal, AdminCmdDataTeleport, AdminCmdDataSlide, AdminCmdDataChangeName, AdminCmdDataChangeGuildLeader, AdminCmdDataImpersonate, AdminCmdDataDeputize, AdminCmdDataAward, AdminCmdDataItemTarget, AdminCmdDataCheckItem, AdminCmdDataModify, AdminCmdDataMorph, AdminCmdDataScale, AdminCmdDataSetSkill, AdminCmdDataSet, AdminCmdDataSetLabelColor, AdminCmdDataBadText, AdminCmdDataQuest, AdminCmdDataSetQuality, AdminCmdDataSetTrait, AdminCmdDataSetItem, AdminCmdDataListWarnings, AdminCmdDataSetKillExp, and AdminCmdDataAssignFaction.

virtual csString AdminCmdDataTarget::GetHelpMessage ( ) [virtual]
virtual bool AdminCmdDataTarget::IsQuietInvalid ( ) [inline, virtual]

Used to invalidate commands with area as they will be handled elsewhere.

Returns:
bool true if this command evaluated an area command and so should be ignored.

Reimplemented from AdminCmdData.

Definition at line 696 of file adminmanager.h.

virtual bool AdminCmdDataTarget::LogGMCommand ( Client gmClient,
const char *  cmd 
) [virtual]

Logs the game master command.

Parameters:
gmClientissuing the command
cmdcommand message issued
Returns:

Reimplemented from AdminCmdData.


The documentation for this class was generated from the following file: