Planeshift
AdminCmdDataSectorTarget Class Reference

Class for commands with a sector target. More...

#include <adminmanager.h>

Public Member Functions

 AdminCmdDataSectorTarget (csString command)
 Creates obj for specified command that target a sector. More...
 
 AdminCmdDataSectorTarget (csString command, AdminManager *msgManager, MsgEntry *me, psAdminCmdMessage &msg, Client *client, WordArray &words)
 Parses the given message and stores its data. More...
 
virtual AdminCmdDataCreateCmdData (AdminManager *msgManager, MsgEntry *me, psAdminCmdMessage &msg, Client *client, WordArray &words)
 Creates an object containing the parsed data targeting a sector. More...
 
virtual csString GetHelpMessage ()
 Returns a helpmessage that fits to the parser of the class. More...
 
virtual bool GetSectorOfClient (Client *client)
 Retrieves the current sector of the command issuing client. 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 ~AdminCmdDataSectorTarget ()
 
- Public Member Functions inherited from AdminCmdData
 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...
 
virtual bool IsQuietInvalid ()
 Used for overriding. More...
 
virtual bool LogGMCommand (Client *gmClient, const char *cmd)
 Logs the game master command. More...
 
void ParseError (MsgEntry *me, const char *errmsg)
 Sends the error message to the gm and invalidates the object. More...
 
virtual ~AdminCmdData ()
 

Public Attributes

bool isClientSector
 true when sector of client is stored More...
 
psSectorInfosectorInfo
 sector either found by sectorname or client position More...
 
csString sectorName
 name of the sector (when parsed successfully) More...
 
- Public Attributes inherited from AdminCmdData
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...
 

Additional Inherited Members

- Protected Member Functions inherited from AdminCmdData
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...
 

Detailed Description

Class for commands with a sector target.

Definition at line 1899 of file adminmanager.h.

Constructor & Destructor Documentation

AdminCmdDataSectorTarget::AdminCmdDataSectorTarget ( csString  command)
inline

Creates obj for specified command that target a sector.

Parameters
commandname of the command (e.g. /ban)

Definition at line 1909 of file adminmanager.h.

AdminCmdDataSectorTarget::AdminCmdDataSectorTarget ( csString  command,
AdminManager msgManager,
MsgEntry me,
psAdminCmdMessage msg,
Client client,
WordArray words 
)

Parses the given message and stores its data.

Parameters
commandname of the command (e.g. /ban)
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 AdminCmdDataSectorTarget::~AdminCmdDataSectorTarget ( )
inlinevirtual

Definition at line 1923 of file adminmanager.h.

Member Function Documentation

virtual AdminCmdData* AdminCmdDataSectorTarget::CreateCmdData ( AdminManager msgManager,
MsgEntry me,
psAdminCmdMessage msg,
Client client,
WordArray words 
)
virtual

Creates an object containing the parsed data targeting a sector.

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 AdminCmdDataAction, AdminCmdDataFog, AdminCmdDataWeatherEffect, and AdminCmdDataWeather.

virtual csString AdminCmdDataSectorTarget::GetHelpMessage ( )
virtual

Returns a helpmessage that fits to the parser of the class.

Returns
csString: a help message to send back to the client

Reimplemented from AdminCmdData.

Reimplemented in AdminCmdDataAction, AdminCmdDataFog, AdminCmdDataWeatherEffect, and AdminCmdDataWeather.

virtual bool AdminCmdDataSectorTarget::GetSectorOfClient ( Client client)
virtual

Retrieves the current sector of the command issuing client.

Parameters
clientis the gm client issuing the command
Returns
bool: true when sector was successfully found, otherwise false.
virtual bool AdminCmdDataSectorTarget::ParseTarget ( AdminManager msgManager,
MsgEntry me,
psAdminCmdMessage msg,
Client client,
csString  target 
)
virtual

Tries to parse the supplied string as a destination.

Parameters
msgManagermessage manager that handles this command
meThe incoming message from the GM
msgpsAdminCmdMessage containing the message
clientclient of the network communication
targetstring to parse as a destination
Returns
false when parsing the supplied string failed, otherwise true

Member Data Documentation

bool AdminCmdDataSectorTarget::isClientSector

true when sector of client is stored

Definition at line 1902 of file adminmanager.h.

psSectorInfo* AdminCmdDataSectorTarget::sectorInfo

sector either found by sectorname or client position

Definition at line 1904 of file adminmanager.h.

csString AdminCmdDataSectorTarget::sectorName

name of the sector (when parsed successfully)

Definition at line 1903 of file adminmanager.h.


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