Planeshift
Public Member Functions | Protected Member Functions | Protected Attributes

AdminManager Class Reference

Admin manager that handles GM commands and general game control. More...

#include <adminmanager.h>

List of all members.

Public Member Functions

void AdjustFactionStandingOfTarget (int gmClientnum, Client *target, csString factionName, int standingDelta)
 adjusts a faction standing of the target by a given value.
void Admin (int clientnum, Client *client, int requestedLevel=-1)
 This is called when a player does /admin.
 AdminManager ()
bool ApplySkill (int gmClientNum, Client *target, psSkillInfo *skill, int value, bool relative=false, int cap=0)
 adjusts a skill of the target by a given value.
void AwardExperienceToTarget (int gmClientnum, Client *target, int ppAward)
 This awards a certain amount of exp to the target.
void AwardToTarget (unsigned int gmClientNum, Client *target, psRewardData *data)
 universal function to award a target.
LocationManagerGetLocationManager ()
psPathNetworkGetPathNetwork ()
 return the path network
bool GetStartOfMap (int clientnum, const csString &map, iSector *&targetSector, csVector3 &targetPoint)
 Get sector and coordinates of starting point of a map.
void HandleNpcCommand (MsgEntry *pMsg, Client *client)
 wrapper for internal use from npc
virtual ~AdminManager ()

Protected Member Functions

bool AddPetition (PID playerID, const char *petition)
 Adds a petition under the passed user's name to the 'petitions' table in the database.
void AddRemoveLock (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data, Client *client, psItem *key)
 A lock is added or removed from the list of locks a key can unlock.
void AssignFaction (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 Allows to change faction points of players.
bool AssignPetition (PID gmID, int petitionID)
 Assignes the specified GM to the specified petition.
void Award (AdminCmdData *data, Client *client)
 Awards something to a player, by a GM.
void AwardExperience (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data, Client *client, Client *target)
 Awards experience to a player, by a GM.
void BanAdvisor (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 Bans an account from advising.
void BanClient (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 Bans an account.
void BanName (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 Bans a name from being used.
void BroadcastDirtyPetitions (int clientNum, bool includeSelf=false)
 Handles broadcasting the petition list dirty signal.
void CancelPetition (MsgEntry *me, psPetitionRequestMessage &msg, Client *client)
 Cancels a petition.
bool CancelPetition (PID playerID, int petitionID, bool isGMrequest=false)
 Cancels the specified petition if the player was its creator.
void ChangeGuildLeader (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 Changes the leader of a guild.
void ChangeLock (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 Exchanges the lock on an item.
void ChangeName (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 Changes the name of the player to the specified one.
void ChangeNPCType (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *cmddata, Client *client)
 Change the npctype (brain) of the npc.
bool ChangePetition (PID playerID, int petitionID, const char *petition)
 Changes the description of the specified petition if the player was its creator.
void ChangePetition (MsgEntry *me, psPetitionRequestMessage &msg, Client *client)
 Modifies a petition.
void CheckItem (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data)
 Checks the presence of items.
void CheckTarget (psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 Shows what the target used in command will afflict in the game.
bool ClosePetition (PID gmID, int petitionID, const char *desc)
 Closes the specified petition (GM only).
void CopyKey (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data, Client *client, psItem *key)
 Creates a copy of a master key.
void CreateHuntLocation (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 Creates a new hunt location.
void CreateItem (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 Creates an item or loads GUI for item creation.
void CreateNPC (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 Creates a new NPC by copying data from a master NPC.
bool DeassignPetition (PID gmID, int gmLevel, int petitionID)
 Deassignes the specified GM to the specified petition.
void Death (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 Kills by doing a large amount of damage to target.
void DebugNPC (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *cmddata, Client *client)
 Change the NPC Debug level.
void DebugTribe (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *cmddata, Client *client)
 Change the Tribe Debug level.
void DeleteCharacter (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 Deletes a character from the database.
bool DescalatePetition (PID gmID, int gmLevel, int petitionID)
 Descalates the level of the specified petition.
void DisableQuest (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 Allows to disable/enable quests temporarily (server cache) or definitely (database).
void Divorce (MsgEntry *me, AdminCmdData *data)
 Divorce char1 and char2, if they're married.
bool EscalatePetition (PID gmID, int gmLevel, int petitionID)
 Escalates the level of the specified petition.
void FindPath (csVector3 &pos, iSector *sector, float radius, Waypoint **wp, float *rangeWP, psPath **path, float *rangePath, int *indexPath, float *fraction, psPath **pointPath, float *rangePoint, int *indexPoint)
 Lookup path information close to a point.
void Fog (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 Controls the rain.
void FreezeClient (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 Freezes a client, preventing it from doing anything.
virtual uint32_t GetEffectID ()
 Implement the abstract function from the iEffectIDAllocator.
void GetInfo (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 Retrieves information like ID, etc.
const char * GetLastSQLError ()
 Returns the last error generated by SQL.
iResultSet * GetPetitions (PID playerID, PID gmID=PETITION_GM)
 Returns a list of all the petitions for the specified player.
bool GetPetitionsArray (csArray< psPetitionInfo > &petitions, Client *client, bool IsGMrequest=false)
 Gets the list of petitions and returns an array with the parsed data.
void GetSiblingChars (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 Get the list of characters in the same account of the provided one.
bool GetTargetOfTeleport (Client *client, psAdminCmdMessage &msg, AdminCmdData *data, iSector *&targetSector, csVector3 &targetPoint, float &yRot, gemObject *subject, InstanceID &instance)
 Get sector and coordinates of target of teleportation described by 'msg'.
int GetTrueSecurityLevel (AccountID accountID)
 Gets the given account number's security level from the DB.
void GMHandlePetition (MsgEntry *me, psPetitionRequestMessage &msg, Client *client)
 Handles GM changes to petitions.
void GMListPetitions (MsgEntry *me, psPetitionRequestMessage &msg, Client *client)
 Handles GM queries for dealing with petitions.
void HandleActionLocation (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 Handle action location entrances.
void HandleAddPetition (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 Handles a user submitting a petition.
void HandleAdminCmdMessage (MsgEntry *pMsg, Client *client)
 Parses message and executes contained admin command.
void HandleBadText (psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 Handle request to view bad text from the targeted NPC.
void HandleGMEvent (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 Handle GM Event command.
void HandleGMGuiMessage (MsgEntry *pMsg, Client *client)
 Parses and executes commands sent by a gm GUI.
void HandleHire (AdminCmdData *data, Client *client)
 Handle Hire command.
void HandleList (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 List command for information retrieval.
void HandleListWarnings (psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 List warnings given to account.
void HandleLoadQuest (psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 Handles a request to reload a quest from the database.
void HandleLocation (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 Handle online path editing.
void HandleNPCClientQuit (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 Allows to quit/reboot the npcclient remotely from a client.
void HandlePath (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 Handle online path editing.
void HandlePetitionMessage (MsgEntry *pMsg, Client *client)
 Parses and executes petition related commands.
void HandleQuest (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 Manipulate quests from characters.
void HandleReload (psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 Handle reloads from DB.
void HandleServerQuit (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 Allows to quit/reboot the server remotely from a client.
void HandleSetItemName (psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 Change name of items.
void HandleSetQuality (psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 Change quality of items.
void HandleSetTrait (psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 Set trait of a char.
void HandleTime (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 Time command for setting of game time.
void HandleVersion (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 Allows to get version the server remotely from a client.
void HideAllLocations (bool clearSelected)
 Hide all locations for all clients.
void HideAllPaths (bool clearSelected)
 Hide all paths for all clients.
void HideLocations (Client *client)
 Hide all locations for one client.
void HideLocations (Client *client, iSector *sector)
 Hide all locations in one sector for one client.
void HidePaths (Client *client)
 Hide all paths for a client.
void HidePaths (Client *client, iSector *sector)
 Hide all paths for a client in a sector.
void HideWaypoints (Client *client)
 Hide all waypoints for a client.
void HideWaypoints (Client *client, iSector *sector)
 Hide all waypoints for a client in a sector.
void Impersonate (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 Impersonate a character.
void Inspect (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 Retrieves detailed information about a character.
bool IsReseting (const csString &command)
 Test the first 8 chars after the command for 'me reset'.
void ItemStackable (MsgEntry *me, AdminCmdData *data, Client *client)
 Decide whether an item is stackable or not.
void KickPlayer (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 This function kicks a player off the server.
void KillNPC (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 Kill an npc in order to make it respawn, It can be used also to reload the data of the npc from the database.
void ListPetitions (MsgEntry *me, psPetitionRequestMessage &msg, Client *client)
 Retrieves a list of petitions.
int LocationCreate (int typeID, csVector3 &pos, csString &sectorName, csString &name, int radius)
 Add new location point to DB.
bool LogGMCommand (AccountID accountID, PID gmID, PID playerID, const char *cmd)
 Logs all gm commands.
void MakeKey (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data, Client *client, bool masterkey)
 Sets an item as a key or master key.
void MakeSecurity (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 Toggles the lock to be a security lock or not.
void MakeUnlockable (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 Toggles the lockability of a lock.
void ModifyItem (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 Changes various parameters associated to the item.
void ModifyKey (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 Creates, destroys and changes keys and locks.
void Morph (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 Temporarily changes the mesh for a player.
bool MoveObject (Client *client, gemObject *target, csVector3 &pos, float yrot, iSector *sector, InstanceID instance)
 Handles movement of objects for teleport and slide.
void MutePlayer (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 This function will mute a player until logoff.
int PathPointCreate (int pathID, int prevPointId, csVector3 &pos, csString &sectorName)
 Add new Path point to DB.
void Percept (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 Percept a NPC.
void Rain (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 Controls the rain.
void RandomMessageTest (AdminCmdData *data, Client *client)
 Messagetest sending 10 random messages to a client.
void RedisplayAllLocations ()
 Show locations for all clients that have enabled display.
void RedisplayAllPaths ()
 Show paths and waypoints for all clients that have enabled display.
void RenameGuild (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 Changes the name of a guild.
void RunScript (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 Runs a progression script on the targetted client.
void Scale (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 Temporarily changes the scale for an actor.
void SendAwardInfo (size_t gmClientnum, Client *target, const char *awardname, const char *awarddesc, int awarded)
 Sends information about an award (reward) to the target and GM.
void SendGMAttribs (Client *client)
 Sends the gm client the current gm attributes.
void SendGMPlayerList (MsgEntry *me, psGMGuiMessage &msg, Client *client)
 Lists all players for a GM.
void SendSpawnItems (MsgEntry *me, Client *client)
 Sends items of the specified type to the GMs client.
void SendSpawnMods (MsgEntry *me, Client *client)
 Sends item modifiers of the specified type to the GMs client.
void SendSpawnTypes (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 Retrieves a list of spawn types for from all items of the server.
void SetAttrib (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 Set various GM/debug abilities.
void SetKillExp (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 Allows to set an experience given to who kills the issing player.
void SetLabelColor (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 Set the label color for char.
void SetSkill (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 Changes the skill of the target.
void ShowLocations (Client *client, iSector *sector)
 Handle display of locations.
void ShowLocations (Client *client)
 Handle display of locations.
void ShowPaths (Client *client)
 Show paths for client in all sectors that has been enabled.
void ShowPaths (Client *client, iSector *sector)
 Show path for a client in a given sector.
void ShowWaypoints (Client *client, iSector *sector)
 Show waypoints for a client in a given sector.
void ShowWaypoints (Client *client)
 Show waypoint for client in all sectors that has been enabled.
void Slide (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 Moves an object along a direction or turns it around the y axis.
void Snow (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 Controls the snow.
void SpawnItemInv (MsgEntry *me, psGMSpawnItem &msg, Client *client)
 Parses and executes commands for spawning items for a gm.
void SpawnItemInv (MsgEntry *me, Client *client)
 Parses and executes commands for spawning items for a gm.
void Teleport (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 Move an object to a certain position.
void TeleportOfflineCharacter (Client *client, AdminCmdDataTeleport *data)
 Teleport an offline character.
void TempSecurityLevel (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 Temporarily changes the security level for a player.
void ThawClient (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 Thaws a client, reversing a freeze command.
void Thunder (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 Controls the thunder.
void TransferItem (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 Transfers an item from one client to another.
void UnbanAdvisor (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 Unbans an account for advising.
void UnbanClient (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 Unbans an account.
void UnBanName (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 Unbans a name from not being used.
void UnmutePlayer (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 This function will unmute a player.
void UpdateDisplayLocation (Location *location)
 Update location to all clients displaying locations.
void UpdateDisplayPath (psPathPoint *point)
 Update the display of paths in clients.
void UpdateDisplayWaypoint (Waypoint *wp)
 Update the display of waypoints in clients.
void UpdateRespawn (AdminCmdData *data, Client *client)
 Changes the NPC's default spawn location.
void ViewMarriage (MsgEntry *me, AdminCmdData *data)
 Get the marriage info of a player.
void WarnMessage (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 This function sends a warning message from a GM to a player.
void Weather (MsgEntry *me, psAdminCmdMessage &msg, AdminCmdData *data, Client *client)
 Controls the weather.

Protected Attributes

ClientConnectionSetclients
 internal list of clients connected to the server
AdminCmdDataFactorydataFactory
 Data object factory for parsing command data.
csString lasterror
 internal string used for formating and passing back errormessages
LocationManagerlocations
 Hold every location in the world for editing of locations.
psNPCDialognpcdlg
 Holds a dummy dialog.
psPathNetworkpathNetwork
 Holds the entire PathNetwork for editing of paths.

Detailed Description

Admin manager that handles GM commands and general game control.

Definition at line 3361 of file adminmanager.h.


Constructor & Destructor Documentation

AdminManager::AdminManager ( )
virtual AdminManager::~AdminManager ( ) [virtual]

Member Function Documentation

bool AdminManager::AddPetition ( PID  playerID,
const char *  petition 
) [protected]

Adds a petition under the passed user's name to the 'petitions' table in the database.

Will automatically add the date and time of the petition's submission in the appropriate table columns

Parameters:
playerID,:PID of the player who is submitting the petition.
petition,:The player's request.
Returns:
Returns either success or failure.
void AdminManager::AddRemoveLock ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data,
Client client,
psItem key 
) [protected]

A lock is added or removed from the list of locks a key can unlock.

Parameters:
meThe incoming message from the GM
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
keyto remove the lock from.
void AdminManager::AdjustFactionStandingOfTarget ( int  gmClientnum,
Client target,
csString  factionName,
int  standingDelta 
)

adjusts a faction standing of the target by a given value.

Parameters:
gmClientnumClientID of the issuer
targetpointer to the Client of the target
factionNamename of the faction to adjust
standingDeltavalue to adjust the standing by
void AdminManager::Admin ( int  clientnum,
Client client,
int  requestedLevel = -1 
)

This is called when a player does /admin.

This builds up the list of commands that are available to the player at their current GM rank. This commands allows player to check the commands of a different gm level (or not gm) provided they have some sort of security level ( > 0 ) in that case the commands won't be subscribed in the client.

Parameters:
clientnumclient identifier of message sending client
clientobject of the client sending message.
requestedLevelthe requested level
bool AdminManager::ApplySkill ( int  gmClientNum,
Client target,
psSkillInfo skill,
int  value,
bool  relative = false,
int  cap = 0 
)

adjusts a skill of the target by a given value.

Parameters:
gmClientNumClientID of the issuer
targetpointer to the Client of the target
skillpointer to the info about the skill to adjust
valueamount to set/adjust by
relativedetermines whether the value is absolute or relative
capif nonzero the skill will be set to a value smaller or equal to the specified one
Returns:
bool FALSE if an error occured
void AdminManager::AssignFaction ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

Allows to change faction points of players.

Parameters:
meThe incoming message from the GM.
msgThe cracked command message.
dataA pointer to the command parser object with target data.
clientThe target client which will have his faction points changed.
bool AdminManager::AssignPetition ( PID  gmID,
int  petitionID 
) [protected]

Assignes the specified GM to the specified petition.

Parameters:
gmID,:Is the ID of the GM who is requesting the assignment.
petitionID,:The petition id
Returns:
Returns either success or failure.
void AdminManager::Award ( AdminCmdData data,
Client client 
) [protected]

Awards something to a player, by a GM.

Parameters:
dataA pointer to the command parser object with target data
clientThe GM client the command came from.gm
void AdminManager::AwardExperience ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data,
Client client,
Client target 
) [protected]

Awards experience to a player, by a GM.

Parameters:
meThe incoming message from the GM
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
targetThe target to award the experience to.
void AdminManager::AwardExperienceToTarget ( int  gmClientnum,
Client target,
int  ppAward 
)

This awards a certain amount of exp to the target.

Parameters:
gmClientnumClientID of the issuer
targetpointer to the Client of the target
ppAwardamount of exp to award. might be negative to punish instead
void AdminManager::AwardToTarget ( unsigned int  gmClientNum,
Client target,
psRewardData data 
)

universal function to award a target.

Parameters:
gmClientNumClientID of the issuer
targetpointer to the Client of the target
datastruct holding the awards to apply
See also:
psRewardData
void AdminManager::BanAdvisor ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

Bans an account from advising.

Bans can be done by player or account (pid,name,targeting). Their length can be defined and set according to the security level of the issuing GM.

Parameters:
meThe incoming message from the GM
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
void AdminManager::BanClient ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

Bans an account.

Bans can be done by player or account (pid,name,targeting). Their length can be defined and set according to the security level of the issuing GM.

Parameters:
meThe incoming message from the GM
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
void AdminManager::BanName ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

Bans a name from being used.

The given name is added to the list of not allowed names for characters.

Parameters:
meThe incoming message from the GM
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
void AdminManager::BroadcastDirtyPetitions ( int  clientNum,
bool  includeSelf = false 
) [protected]

Handles broadcasting the petition list dirty signal.

Used by: CancelPetition, GMHandlePetition, HandleAddPetition

Parameters:
clientNumof the client issuing the command.
includeSelfWhether to include the sending client in the broadcast or not.
bool AdminManager::CancelPetition ( PID  playerID,
int  petitionID,
bool  isGMrequest = false 
) [protected]

Cancels the specified petition if the player was its creator.

Parameters:
playerID,:Is the ID of the player who is requesting the change.
petitionID,:The petition id
isGMrequest,:if true that means a GM is cancelling someone's petition
Returns:
Returns either success or failure.
void AdminManager::CancelPetition ( MsgEntry me,
psPetitionRequestMessage msg,
Client client 
) [protected]

Cancels a petition.

Parameters:
meThe incoming message from the GM
msgThe cracked command message.
clientThe GM client the command came from.
void AdminManager::ChangeGuildLeader ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

Changes the leader of a guild.

Parameters:
meThe incoming message from the GM
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
void AdminManager::ChangeLock ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

Exchanges the lock on an item.

This removes the ability of all keys of the 'original' lock of unlocking this item.

Parameters:
meThe incoming message from the GM
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
void AdminManager::ChangeName ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

Changes the name of the player to the specified one.

Parameters:
meThe incoming message from the GM
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
void AdminManager::ChangeNPCType ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData cmddata,
Client client 
) [protected]

Change the npctype (brain) of the npc.

Parameters:
meThe incoming message from the GM
msgThe cracked command message.
cmddataA pointer to the command parser object with target datat
clientThe GM client the command came from.
bool AdminManager::ChangePetition ( PID  playerID,
int  petitionID,
const char *  petition 
) [protected]

Changes the description of the specified petition if the player was its creator.

Parameters:
playerID,:Is the ID of the player who is requesting the change. if ID is -1, that means a GM is changing someone's petition
petitionID,:The petition id
petitionnew petition text
Returns:
Returns either success or failure.
void AdminManager::ChangePetition ( MsgEntry me,
psPetitionRequestMessage msg,
Client client 
) [protected]

Modifies a petition.

Parameters:
meThe incoming message from the GM
msgThe cracked command message.
clientThe GM client the command came from.
void AdminManager::CheckItem ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data 
) [protected]

Checks the presence of items.

Parameters:
meincoming message from gm client
msgThe cracked command message.
dataA pointer to the command parser object with target data
void AdminManager::CheckTarget ( psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

Shows what the target used in command will afflict in the game.

Parameters:
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
bool AdminManager::ClosePetition ( PID  gmID,
int  petitionID,
const char *  desc 
) [protected]

Closes the specified petition (GM only).

Parameters:
gmID,:Is the ID of the GM who is requesting the close.
petitionID,:The petition id
desc,:the closing description
Returns:
Returns either success or failure.
void AdminManager::CopyKey ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data,
Client client,
psItem key 
) [protected]

Creates a copy of a master key.

Parameters:
meThe incoming message from the GM
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
keyto copy
void AdminManager::CreateHuntLocation ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

Creates a new hunt location.

Hunt locations spawn items. The conditions like how many are spawned is given by the command line options that are parsed and stored by the AdminCmdDataCrystal object.

Parameters:
meThe incoming message from the GM
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
void AdminManager::CreateItem ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

Creates an item or loads GUI for item creation.

Gui for item creation is loaded when no item was specified.

Parameters:
meThe incoming message from the GM
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
void AdminManager::CreateNPC ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

Creates a new NPC by copying data from a master NPC.

Parameters:
meThe incoming message from the GM
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
bool AdminManager::DeassignPetition ( PID  gmID,
int  gmLevel,
int  petitionID 
) [protected]

Deassignes the specified GM to the specified petition.

Parameters:
gmID,:Is the ID of the GM who is requesting the deassignment.
gmLevel,:The security level of the gm
petitionID,:The petition id
Returns:
Returns either success or failure.
void AdminManager::Death ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

Kills by doing a large amount of damage to target.

Parameters:
meThe incoming message from the GM
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
void AdminManager::DebugNPC ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData cmddata,
Client client 
) [protected]

Change the NPC Debug level.

Parameters:
meThe incoming message from the GM
msgThe cracked command message.
cmddataA pointer to the command parser object with target datat
clientThe GM client the command came from.
void AdminManager::DebugTribe ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData cmddata,
Client client 
) [protected]

Change the Tribe Debug level.

Parameters:
meThe incoming message from the GM
msgThe cracked command message.
cmddataA pointer to the command parser object with target datat
clientThe GM client the command came from.
void AdminManager::DeleteCharacter ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

Deletes a character from the database.

Should be used with caution. This function will also send out reasons why a delete failed. Possible reasons are not found or the requester is not the same account as the one to delete. Also if the character is a guild leader they must resign first and assign a new leader.

Parameters:
meThe incoming message from the GM
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
bool AdminManager::DescalatePetition ( PID  gmID,
int  gmLevel,
int  petitionID 
) [protected]

Descalates the level of the specified petition.

Changes the assigned_gm to -1, and the status to 'Open'

Parameters:
gmID,:Is the ID of the GM who is requesting the descalation.
gmLevel,:The security level of the gm
petitionID,:The petition id
Returns:
Returns either success or failure.
void AdminManager::DisableQuest ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

Allows to disable/enable quests temporarily (server cache) or definitely (database).

Parameters:
meThe incoming message from the GM
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
void AdminManager::Divorce ( MsgEntry me,
AdminCmdData data 
) [protected]

Divorce char1 and char2, if they're married.

Parameters:
meThe incoming message from the GM
dataA pointer to the command parser object with target data
bool AdminManager::EscalatePetition ( PID  gmID,
int  gmLevel,
int  petitionID 
) [protected]

Escalates the level of the specified petition.

Changes the assigned_gm to -1, and the status to 'Open'

Parameters:
gmID,:Is the ID of the GM who is requesting the escalation.
gmLevel,:The security level of the gm
petitionID,:The petition id
Returns:
Returns either success or failure.
void AdminManager::FindPath ( csVector3 &  pos,
iSector *  sector,
float  radius,
Waypoint **  wp,
float rangeWP,
psPath **  path,
float rangePath,
int indexPath,
float fraction,
psPath **  pointPath,
float rangePoint,
int indexPoint 
) [protected]

Lookup path information close to a point.

Waypoints, paths or pointpaths can be retrieved. When wp and pointPath pointers are given, then only the nearest will be returned.

Parameters:
posposition of the point to lookup.
sectorof the point to lookup.
radiusis the searchrange around the point.
wpoutput of waypoints found
rangeWPdistance of the waypoint to the point
pathoutput of paths found
rangePathdistance of the path to the point
indexPathindex of the path
fraction?
pointPathoutput of point of path
rangePointrange of the point of path to the point
indexPointindex of the point of path on the path
void AdminManager::Fog ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

Controls the rain.

Turn off, turn on, setting rain parameters.

Parameters:
meThe incoming message from the GM
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
void AdminManager::FreezeClient ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

Freezes a client, preventing it from doing anything.

Parameters:
meincoming message from gm client
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
virtual uint32_t AdminManager::GetEffectID ( ) [protected, virtual]

Implement the abstract function from the iEffectIDAllocator.

Implements iEffectIDAllocator.

void AdminManager::GetInfo ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

Retrieves information like ID, etc.

about a target.

Parameters:
meThe incoming message from the GM
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
const char* AdminManager::GetLastSQLError ( ) [protected]

Returns the last error generated by SQL.

Returns:
Returns a string that describes the last sql error.
See also:
iConnection::GetLastError()
LocationManager* AdminManager::GetLocationManager ( ) [inline]

Definition at line 3435 of file adminmanager.h.

psPathNetwork* AdminManager::GetPathNetwork ( ) [inline]

return the path network

Definition at line 3430 of file adminmanager.h.

iResultSet* AdminManager::GetPetitions ( PID  playerID,
PID  gmID = PETITION_GM 
) [protected]

Returns a list of all the petitions for the specified player.

Parameters:
playerID,:Is the ID of the player who is requesting the list. if the ID is -1, that means a GM is requesting a complete listing
gmID,:Is the id of the GM who is requesting petitions, ignored if playerID != -1
Returns:
Returns a iResultSet which contains the set of all matching petitions for the user
bool AdminManager::GetPetitionsArray ( csArray< psPetitionInfo > &  petitions,
Client client,
bool  IsGMrequest = false 
) [protected]

Gets the list of petitions and returns an array with the parsed data.

Parameters:
petitionsan array with the data of the petition: It's empty if it wasn't possible to obtain results.
clientThe GM client which requested the informations.
IsGMrequestmanages if the list should be formated for gm or players. True is for gm.
Returns:
true if the query succeded, false if there were errors.
void AdminManager::GetSiblingChars ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

Get the list of characters in the same account of the provided one.

Parameters:
meThe incoming message from the GM
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
bool AdminManager::GetStartOfMap ( int  clientnum,
const csString &  map,
iSector *&  targetSector,
csVector3 &  targetPoint 
)

Get sector and coordinates of starting point of a map.

Returns:
return the success (true when successful).
bool AdminManager::GetTargetOfTeleport ( Client client,
psAdminCmdMessage msg,
AdminCmdData data,
iSector *&  targetSector,
csVector3 &  targetPoint,
float yRot,
gemObject subject,
InstanceID instance 
) [protected]

Get sector and coordinates of target of teleportation described by 'msg'.

Parameters:
clientThe GM client the command came from.
msgThe cracked command message.
dataA pointer to the command parser object with target data
targetSectorthe target sector of the teleport.
targetPointthe target point to teleport to.
yRotis the rotation on the y-axis for the teleport.
subjectis the target object to teleport
instanceis the instance to teleport to.
Returns:
true on success, otherwise fals
int AdminManager::GetTrueSecurityLevel ( AccountID  accountID) [protected]

Gets the given account number's security level from the DB.

Parameters:
accountIDto retrieve the security level for.
Returns:
the security level of the specified account.
void AdminManager::GMHandlePetition ( MsgEntry me,
psPetitionRequestMessage msg,
Client client 
) [protected]

Handles GM changes to petitions.

Possible changes are: canceling, closing, assigning, escalating, deescalationg.

Parameters:
meThe incoming message from the GM
msgThe cracked command message.
clientThe GM client the command came from.
void AdminManager::GMListPetitions ( MsgEntry me,
psPetitionRequestMessage msg,
Client client 
) [protected]

Handles GM queries for dealing with petitions.

Parameters:
meThe incoming message from the GM
msgThe cracked command message.
clientThe GM client the command came from.
void AdminManager::HandleActionLocation ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

Handle action location entrances.

Parameters:
meThe incoming message from the GM
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
void AdminManager::HandleAddPetition ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

Handles a user submitting a petition.

Parameters:
meThe incoming message from the GM
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
void AdminManager::HandleAdminCmdMessage ( MsgEntry pMsg,
Client client 
) [protected]

Parses message and executes contained admin command.

Parameters:
pMsgMessage sent by gm client
clientsending gm client
void AdminManager::HandleBadText ( psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

Handle request to view bad text from the targeted NPC.

Parameters:
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
void AdminManager::HandleGMEvent ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

Handle GM Event command.

Parameters:
meincoming message from gm client
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
void AdminManager::HandleGMGuiMessage ( MsgEntry pMsg,
Client client 
) [protected]

Parses and executes commands sent by a gm GUI.

Parameters:
pMsggm GUI message sent by gm client
clientsending gm client
void AdminManager::HandleHire ( AdminCmdData data,
Client client 
) [protected]

Handle Hire command.

Parameters:
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
void AdminManager::HandleList ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

List command for information retrieval.

Currently only supports listing the servers map.

Parameters:
meThe incoming message from the GM
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
void AdminManager::HandleListWarnings ( psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

List warnings given to account.

Parameters:
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
void AdminManager::HandleLoadQuest ( psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

Handles a request to reload a quest from the database.

Parameters:
msgThe text name is in the msg.text field.
dataA pointer to the command parser object with target data
clientThe client we will send error codes back to.
void AdminManager::HandleLocation ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

Handle online path editing.

Parameters:
meThe incoming message from the GM
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
void AdminManager::HandleNPCClientQuit ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

Allows to quit/reboot the npcclient remotely from a client.

Parameters:
meThe incoming message from the GM
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
void AdminManager::HandleNpcCommand ( MsgEntry pMsg,
Client client 
)

wrapper for internal use from npc

Parameters:
pMsgMessage sent by npc
client??
void AdminManager::HandlePath ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

Handle online path editing.

Parameters:
meThe incoming message from the GM
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
void AdminManager::HandlePetitionMessage ( MsgEntry pMsg,
Client client 
) [protected]

Parses and executes petition related commands.

Parameters:
pMsgMessage sent by gm client
clientsending gm client
void AdminManager::HandleQuest ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

Manipulate quests from characters.

Parameters:
meincoming message from gm client
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
void AdminManager::HandleReload ( psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

Handle reloads from DB.

Currently can only reload items.

Parameters:
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
void AdminManager::HandleServerQuit ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

Allows to quit/reboot the server remotely from a client.

Parameters:
meThe incoming message from the GM
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
void AdminManager::HandleSetItemName ( psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

Change name of items.

Parameters:
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
void AdminManager::HandleSetQuality ( psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

Change quality of items.

Parameters:
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
void AdminManager::HandleSetTrait ( psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

Set trait of a char.

Parameters:
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
void AdminManager::HandleTime ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

Time command for setting of game time.

Parameters:
meThe incoming message from the GM
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
void AdminManager::HandleVersion ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

Allows to get version the server remotely from a client.

Parameters:
meThe incoming message from the GM
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
void AdminManager::HideAllLocations ( bool  clearSelected) [protected]

Hide all locations for all clients.

Parameters:
clearSelectedClear selected location when iterating.
void AdminManager::HideAllPaths ( bool  clearSelected) [protected]

Hide all paths for all clients.

Parameters:
clearSelectedClear selected path when iterating.
void AdminManager::HideLocations ( Client client,
iSector *  sector 
) [protected]

Hide all locations in one sector for one client.

void AdminManager::HideLocations ( Client client) [protected]

Hide all locations for one client.

void AdminManager::HidePaths ( Client client) [protected]

Hide all paths for a client.

Parameters:
clientThe client to hide paths for.
void AdminManager::HidePaths ( Client client,
iSector *  sector 
) [protected]

Hide all paths for a client in a sector.

Parameters:
clientThe client to hide paths for.
sectorThe sector to hide paths in.
void AdminManager::HideWaypoints ( Client client) [protected]

Hide all waypoints for a client.

Parameters:
clientThe client to hide waypoints for.
void AdminManager::HideWaypoints ( Client client,
iSector *  sector 
) [protected]

Hide all waypoints for a client in a sector.

Parameters:
clientThe client ot hide waypoints for.
sectorThe sector to hide paths in.
void AdminManager::Impersonate ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

Impersonate a character.

Parameters:
meThe incoming message from the GM
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
void AdminManager::Inspect ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

Retrieves detailed information about a character.

For a targeted player this lists the inventory of the player.

Parameters:
meincoming message from gm client
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
bool AdminManager::IsReseting ( const csString &  command) [protected]

Test the first 8 chars after the command for 'me reset'.

Parameters:
commandthe command string to test for 'me reset'.
Returns:
bool: true when 'me reset' is found, otherwise false.
void AdminManager::ItemStackable ( MsgEntry me,
AdminCmdData data,
Client client 
) [protected]

Decide whether an item is stackable or not.

This is bypassing the flag for this type of item.

Parameters:
meincoming message from gm client
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
void AdminManager::KickPlayer ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

This function kicks a player off the server.

The gm (client) needs to have sufficient priviledges.

Parameters:
meThe incoming message from the GM
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
void AdminManager::KillNPC ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

Kill an npc in order to make it respawn, It can be used also to reload the data of the npc from the database.

Parameters:
meThe incoming message from the GM
msgThe cracked command message.
dataA pointer to the command parser object with target datat
clientThe GM client the command came from.
void AdminManager::ListPetitions ( MsgEntry me,
psPetitionRequestMessage msg,
Client client 
) [protected]

Retrieves a list of petitions.

Parameters:
meThe incoming message from the GM
msgThe cracked command message.
clientThe GM client the command came from.
int AdminManager::LocationCreate ( int  typeID,
csVector3 &  pos,
csString &  sectorName,
csString &  name,
int  radius 
) [protected]

Add new location point to DB.

Parameters:
typeIDtype of the location
posposition of the new location.
sectorNamename of the sector for the new location.
namefor the location.
radiusfor the location.
bool AdminManager::LogGMCommand ( AccountID  accountID,
PID  gmID,
PID  playerID,
const char *  cmd 
) [protected]

Logs all gm commands.

Parameters:
accountID,:of the GM
gmID,:the ID of the GM
playerID,:the ID of the player
cmd,:the command the GM executed
Returns:
Returns either success or failure.
void AdminManager::MakeKey ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data,
Client client,
bool  masterkey 
) [protected]

Sets an item as a key or master key.

The item needs to be placed in the right hand of the clients (gm) character for the key creation. Master key is a key that can unlock all locks.

Parameters:
meThe incoming message from the GM
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
masterkeytrue for masterkey otherwise false.
void AdminManager::MakeSecurity ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

Toggles the lock to be a security lock or not.

The security locked flag on an item is removed when it was already set, otherwise the security locked flag is set.

Parameters:
meThe incoming message from the GM
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
void AdminManager::MakeUnlockable ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

Toggles the lockability of a lock.

A lockable lock is set to unlockable and an unlockable lock is set to lockable.

Parameters:
meThe incoming message from the GM
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
void AdminManager::ModifyItem ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

Changes various parameters associated to the item.

Parameters:
meThe incoming message from the GM
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
void AdminManager::ModifyKey ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

Creates, destroys and changes keys and locks.

Parameters:
meThe incoming message from the GM
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
void AdminManager::Morph ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

Temporarily changes the mesh for a player.

Parameters:
meincoming message from gm client
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
bool AdminManager::MoveObject ( Client client,
gemObject target,
csVector3 &  pos,
float  yrot,
iSector *  sector,
InstanceID  instance 
) [protected]

Handles movement of objects for teleport and slide.

Parameters:
clientThe GM client the command came from.
targetThe target object to move around.
posThe destination position.
yrotThe y-axis rotation (if any).
sectorThe destination sector.
instanceThe destination instance.
void AdminManager::MutePlayer ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

This function will mute a player until logoff.

Parameters:
meThe incoming message from the GM
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
int AdminManager::PathPointCreate ( int  pathID,
int  prevPointId,
csVector3 &  pos,
csString &  sectorName 
) [protected]

Add new Path point to DB.

Parameters:
pathIDthe path to create the point for.
prevPointIdof the (ancestor) previous point in the path.
posvector specifying the point
sectorNameis the name of the sector for the point.
void AdminManager::Percept ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

Percept a NPC.

Parameters:
meThe incoming message from the GM
msgThe cracked command message.
dataA pointer to the command parser object with target datat
clientThe GM client the command came from.
void AdminManager::Rain ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

Controls the rain.

Turn off, turn on, setting rain parameters.

Parameters:
meThe incoming message from the GM
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
void AdminManager::RandomMessageTest ( AdminCmdData data,
Client client 
) [protected]

Messagetest sending 10 random messages to a client.

Sends 10 messages in random order to the client for testing sequential delivery.

Parameters:
client,:Client to be the recepient of the messages
dataA pointer to the command parser object with target data
Returns:
void
void AdminManager::RedisplayAllLocations ( ) [protected]

Show locations for all clients that have enabled display.

void AdminManager::RedisplayAllPaths ( ) [protected]

Show paths and waypoints for all clients that have enabled display.

void AdminManager::RenameGuild ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

Changes the name of a guild.

Parameters:
meThe incoming message from the GM
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
void AdminManager::RunScript ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

Runs a progression script on the targetted client.

Parameters:
meThe incoming message from the GM
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
void AdminManager::Scale ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

Temporarily changes the scale for an actor.

Parameters:
meincoming message from gm client
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
void AdminManager::SendAwardInfo ( size_t  gmClientnum,
Client target,
const char *  awardname,
const char *  awarddesc,
int  awarded 
) [protected]

Sends information about an award (reward) to the target and GM.

Parameters:
gmClientnumThe GM awarding something.
targetthe client that should get the award information.
awardnameis a name for the award.
awarddescis a description of the award.
awarded> 0, means its a real award, <0 means it is a penalty.
void AdminManager::SendGMAttribs ( Client client) [protected]

Sends the gm client the current gm attributes.

Parameters:
clientof the GM.
void AdminManager::SendGMPlayerList ( MsgEntry me,
psGMGuiMessage msg,
Client client 
) [protected]

Lists all players for a GM.

Parameters:
meThe incoming message from the GM
msgThe cracked command message.
clientThe GM client the command came from.
void AdminManager::SendSpawnItems ( MsgEntry me,
Client client 
) [protected]

Sends items of the specified type to the GMs client.

Parameters:
meThe incoming message from the GM
clientThe GM client the command came from.
void AdminManager::SendSpawnMods ( MsgEntry me,
Client client 
) [protected]

Sends item modifiers of the specified type to the GMs client.

Parameters:
meThe incoming message from the GM
clientThe GM client the command came from.
void AdminManager::SendSpawnTypes ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

Retrieves a list of spawn types for from all items of the server.

Parameters:
meThe incoming message from the GM
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
void AdminManager::SetAttrib ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

Set various GM/debug abilities.

The setable abilites are: invisible, invincible, etc.

Parameters:
meThe incoming message from the GM
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
void AdminManager::SetKillExp ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

Allows to set an experience given to who kills the issing player.

Parameters:
meThe incoming message from the GM
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
void AdminManager::SetLabelColor ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

Set the label color for char.

Parameters:
meThe incoming message from the GM
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
void AdminManager::SetSkill ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

Changes the skill of the target.

TODO: should be changed to alias /award

Parameters:
meincoming message from gm client
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
void AdminManager::ShowLocations ( Client client) [protected]

Handle display of locations.

void AdminManager::ShowLocations ( Client client,
iSector *  sector 
) [protected]

Handle display of locations.

void AdminManager::ShowPaths ( Client client,
iSector *  sector 
) [protected]

Show path for a client in a given sector.

Parameters:
clientThe client to show paths for.
sectorThe sector to show paths in.
void AdminManager::ShowPaths ( Client client) [protected]

Show paths for client in all sectors that has been enabled.

Parameters:
clientThe client to show paths for.
void AdminManager::ShowWaypoints ( Client client) [protected]

Show waypoint for client in all sectors that has been enabled.

Parameters:
clientThe client to show waypoints for.
void AdminManager::ShowWaypoints ( Client client,
iSector *  sector 
) [protected]

Show waypoints for a client in a given sector.

Parameters:
clientThe client to show waypoints for.
sectorThe sector to show paths in.
void AdminManager::Slide ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

Moves an object along a direction or turns it around the y axis.

Movement is specified as a certain amount along one direction. Direction can be: up, down, left, right, forward, backward. Can also turn an object around the y axis.

Parameters:
meThe incoming message from the GM
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
void AdminManager::Snow ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

Controls the snow.

Turn off, turn on, setting snow parameters.

Parameters:
meThe incoming message from the GM
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
void AdminManager::SpawnItemInv ( MsgEntry me,
psGMSpawnItem msg,
Client client 
) [protected]

Parses and executes commands for spawning items for a gm.

Parameters:
meThe incoming message from the GM
msggm item spawn message sent by gm client
clientsending gm client
void AdminManager::SpawnItemInv ( MsgEntry me,
Client client 
) [protected]

Parses and executes commands for spawning items for a gm.

Internally a psGMSpawnItem struct is created for calling the the other SpawnItemInv function.

Parameters:
meThe incoming message from the GM
clientsending gm client
void AdminManager::Teleport ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

Move an object to a certain position.

Parameters:
meThe incoming message from the GM
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
void AdminManager::TeleportOfflineCharacter ( Client client,
AdminCmdDataTeleport data 
) [protected]

Teleport an offline character.

Parameters:
clientThe GM client the command came from.
dataA pointer to the command parser object with target data
void AdminManager::TempSecurityLevel ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

Temporarily changes the security level for a player.

Parameters:
meincoming message from gm client
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
void AdminManager::ThawClient ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

Thaws a client, reversing a freeze command.

Parameters:
meincoming message from gm client
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
void AdminManager::Thunder ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

Controls the thunder.

Sending a sound command to the clients. Works only when it is raining.

Parameters:
meThe incoming message from the GM
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
void AdminManager::TransferItem ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

Transfers an item from one client to another.

Parameters:
meincoming message from gm client
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
void AdminManager::UnbanAdvisor ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

Unbans an account for advising.

Unbanning can be done by player or account (pid,name). Depending on the ban length, the unbanning is executed when the gm has the right to issue the kind of ban.

Parameters:
meThe incoming message from the GM
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
void AdminManager::UnbanClient ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

Unbans an account.

Unbanning can be done by player or account (pid,name). Depending on the ban length, the unbanning is executed when the gm has the right to issue the kind of ban.

Parameters:
meThe incoming message from the GM
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
void AdminManager::UnBanName ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

Unbans a name from not being used.

The given name is removed from the list of not allowed names for characters.

Parameters:
meThe incoming message from the GM
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
void AdminManager::UnmutePlayer ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

This function will unmute a player.

Parameters:
meThe incoming message from the GM
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
void AdminManager::UpdateDisplayLocation ( Location location) [protected]

Update location to all clients displaying locations.

void AdminManager::UpdateDisplayPath ( psPathPoint point) [protected]

Update the display of paths in clients.

void AdminManager::UpdateDisplayWaypoint ( Waypoint wp) [protected]

Update the display of waypoints in clients.

void AdminManager::UpdateRespawn ( AdminCmdData data,
Client client 
) [protected]

Changes the NPC's default spawn location.

Parameters:
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
void AdminManager::ViewMarriage ( MsgEntry me,
AdminCmdData data 
) [protected]

Get the marriage info of a player.

Parameters:
meThe incoming message from the GM
dataAdminCmdData object containing parsed data.
void AdminManager::WarnMessage ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

This function sends a warning message from a GM to a player.

It is displayed in the client GUI as a big, red, un-ignorable text on the screen and in the chat window.

Parameters:
meThe incoming message from the GM
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.
void AdminManager::Weather ( MsgEntry me,
psAdminCmdMessage msg,
AdminCmdData data,
Client client 
) [protected]

Controls the weather.

To turn it on/off.

Parameters:
meThe incoming message from the GM
msgThe cracked command message.
dataA pointer to the command parser object with target data
clientThe GM client the command came from.

Member Data Documentation

internal list of clients connected to the server

Definition at line 4742 of file adminmanager.h.

Data object factory for parsing command data.

Definition at line 3443 of file adminmanager.h.

csString AdminManager::lasterror [protected]

internal string used for formating and passing back errormessages

Definition at line 4740 of file adminmanager.h.

Hold every location in the world for editing of locations.

Definition at line 4770 of file adminmanager.h.

Holds a dummy dialog.

We may need this later on when NPC's are inserted. This also insures that the dicitonary will always exist. There where some problems with the dictionary getting deleted just after the initial npc was added. This prevents that

Definition at line 4760 of file adminmanager.h.

Holds the entire PathNetwork for editing of paths.

Definition at line 4765 of file adminmanager.h.


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