ManaPlus
Public Member Functions
TmwAthena::AdminHandler Class Reference

#include <adminhandler.h>

Inheritance diagram for TmwAthena::AdminHandler:
Ea::AdminHandler Net::AdminHandler

Public Member Functions

 AdminHandler ()
 
 ~AdminHandler ()
 
void announce (const std::string &text) const
 
void localAnnounce (const std::string &text) const
 
void hide (const bool h) const
 
void kick (const BeingId playerId) const
 
void kickAll () const
 
void warp (const std::string &map, const int x, const int y) const
 
void resetStats () const
 
void resetSkills () const
 
void gotoName (const std::string &name) const
 
void recallName (const std::string &name) const
 
void mute (const Being *const being, const int type, const int limit) const
 
void muteName (const std::string &name) const
 
void requestLogin (const Being *const being) const
 
void setTileType (const int x, const int y, const int type) const
 
void unequipAll (const Being *const being) const
 
void requestStats (const std::string &name) const
 
void monsterInfo (const std::string &name) const
 
void itemInfo (const std::string &name) const
 
void whoDrops (const std::string &name) const
 
void mobSearch (const std::string &name) const
 
void mobSpawnSearch (const std::string &name) const
 
void playerGmCommands (const std::string &name) const
 
void playerCharGmCommands (const std::string &name) const
 
void showLevel (const std::string &name) const
 
void showStats (const std::string &name) const
 
void showStorageList (const std::string &name) const
 
void showCartList (const std::string &name) const
 
void showInventoryList (const std::string &name) const
 
void locatePlayer (const std::string &name) const
 
void showAccountInfo (const std::string &name) const
 
void spawnSlave (const std::string &name) const
 
void spawnClone (const std::string &name) const
 
void spawnSlaveClone (const std::string &name) const
 
void spawnEvilClone (const std::string &name) const
 
void savePosition (const std::string &name) const
 
void loadPosition (const std::string &name) const
 
void randomWarp (const std::string &name) const
 
void gotoNpc (const std::string &name) const
 
void killer (const std::string &name) const
 
void killable (const std::string &name) const
 
void heal (const std::string &name) const
 
void alive (const std::string &name) const
 
void disguise (const std::string &name) const
 
void immortal (const std::string &name) const
 
void hide (const std::string &name) const
 
void nuke (const std::string &name) const
 
void kill (const std::string &name) const
 
void jail (const std::string &name) const
 
void unjail (const std::string &name) const
 
void npcMove (const std::string &name, const int x, const int y) const
 
void hideNpc (const std::string &name) const
 
void showNpc (const std::string &name) const
 
void changePartyLeader (const std::string &name) const
 
void partyRecall (const std::string &name) const
 
void breakGuild (const std::string &name) const
 
void guildRecall (const std::string &name) const
 
void slide (const int x, const int y) const
 
void changeDress () const
 
void resetCooldowns () const
 
- Public Member Functions inherited from Ea::AdminHandler
 AdminHandler ()
 
void kickName (const std::string &name) const
 
void ban (const int playerId) const
 
void banName (const std::string &name) const
 
void unban (const int playerId) const
 
void unbanName (const std::string &name) const
 
void ipcheckName (const std::string &name) const
 
void createItems (const int id, const ItemColor color, const int amount) const
 
void spawn (const std::string &name) const
 
- Public Member Functions inherited from Net::AdminHandler
 AdminHandler ()
 

Detailed Description

Definition at line 32 of file adminhandler.h.

Constructor & Destructor Documentation

◆ AdminHandler()

TmwAthena::AdminHandler::AdminHandler ( )

Definition at line 39 of file adminhandler.cpp.

39  :
41 {
42  adminHandler = this;
43 }
Net::AdminHandler * adminHandler
Definition: net.cpp:84

References adminHandler.

◆ ~AdminHandler()

TmwAthena::AdminHandler::~AdminHandler ( )
virtual

Reimplemented from Ea::AdminHandler.

Definition at line 45 of file adminhandler.cpp.

46 {
47  adminHandler = nullptr;
48 }

References adminHandler.

Member Function Documentation

◆ alive()

void TmwAthena::AdminHandler::alive ( const std::string &  name) const
virtual

Implements Net::AdminHandler.

Definition at line 231 of file adminhandler.cpp.

232 {
233  Gm::runCommand("revive", name);
234 }
void runCommand(const std::string &command, const std::string &params)
Definition: gmfunctions.cpp:35

References Gm::runCommand().

◆ announce()

void TmwAthena::AdminHandler::announce ( const std::string &  text) const
virtual

Implements Net::AdminHandler.

Definition at line 50 of file adminhandler.cpp.

51 {
52  createOutPacket(CMSG_ADMIN_ANNOUNCE);
53  outMsg.writeInt16(CAST_S16(text.length() + 4), "len");
54  outMsg.writeString(text, CAST_S32(text.length()), "message");
55 }
#define CAST_S16
Definition: cast.h:28
#define CAST_S32
Definition: cast.h:30
#define createOutPacket(name)
Definition: messageout.h:37

References CAST_S16, CAST_S32, and createOutPacket.

◆ breakGuild()

void TmwAthena::AdminHandler::breakGuild ( const std::string &  name) const
virtual

Implements Net::AdminHandler.

Definition at line 287 of file adminhandler.cpp.

288 {
289 }

◆ changeDress()

void TmwAthena::AdminHandler::changeDress ( ) const
virtual

Implements Net::AdminHandler.

Definition at line 300 of file adminhandler.cpp.

301 {
302 }

◆ changePartyLeader()

void TmwAthena::AdminHandler::changePartyLeader ( const std::string &  name) const
virtual

Implements Net::AdminHandler.

Definition at line 279 of file adminhandler.cpp.

280 {
281 }

◆ disguise()

void TmwAthena::AdminHandler::disguise ( const std::string &  name) const
virtual

Implements Net::AdminHandler.

Definition at line 236 of file adminhandler.cpp.

237 {
238 }

◆ gotoName()

void TmwAthena::AdminHandler::gotoName ( const std::string &  name) const
virtual

Implements Net::AdminHandler.

Definition at line 94 of file adminhandler.cpp.

95 {
96  Gm::runCommand("goto", name);
97 }

References Gm::runCommand().

◆ gotoNpc()

void TmwAthena::AdminHandler::gotoNpc ( const std::string &  name) const
virtual

Implements Net::AdminHandler.

Definition at line 215 of file adminhandler.cpp.

216 {
217 }

◆ guildRecall()

void TmwAthena::AdminHandler::guildRecall ( const std::string &  name) const
virtual

Implements Net::AdminHandler.

Definition at line 291 of file adminhandler.cpp.

292 {
293 }

◆ heal()

void TmwAthena::AdminHandler::heal ( const std::string &  name) const
virtual

Implements Net::AdminHandler.

Definition at line 227 of file adminhandler.cpp.

228 {
229 }

◆ hide() [1/2]

void TmwAthena::AdminHandler::hide ( const bool  h) const
virtual

Implements Net::AdminHandler.

Definition at line 64 of file adminhandler.cpp.

65 {
66  createOutPacket(CMSG_ADMIN_HIDE);
67  outMsg.writeInt32(0, "unused");
68 }

References createOutPacket.

◆ hide() [2/2]

void TmwAthena::AdminHandler::hide ( const std::string &  name) const
virtual

Implements Net::AdminHandler.

Definition at line 244 of file adminhandler.cpp.

245 {
246  Gm::runCommand("hide");
247 }

References Gm::runCommand().

◆ hideNpc()

void TmwAthena::AdminHandler::hideNpc ( const std::string &  name) const
virtual

Implements Net::AdminHandler.

Definition at line 271 of file adminhandler.cpp.

272 {
273 }

◆ immortal()

void TmwAthena::AdminHandler::immortal ( const std::string &  name) const
virtual

Implements Net::AdminHandler.

Definition at line 240 of file adminhandler.cpp.

241 {
242 }

◆ itemInfo()

void TmwAthena::AdminHandler::itemInfo ( const std::string &  name) const
virtual

Implements Net::AdminHandler.

Definition at line 135 of file adminhandler.cpp.

136 {
137 }

◆ jail()

void TmwAthena::AdminHandler::jail ( const std::string &  name) const
virtual

Implements Net::AdminHandler.

Definition at line 257 of file adminhandler.cpp.

258 {
259 }

◆ kick()

void TmwAthena::AdminHandler::kick ( const BeingId  playerId) const
virtual

Implements Net::AdminHandler.

Definition at line 70 of file adminhandler.cpp.

71 {
72  createOutPacket(CMSG_ADMIN_KICK);
73  outMsg.writeBeingId(playerId, "account id");
74 }

References createOutPacket.

◆ kickAll()

void TmwAthena::AdminHandler::kickAll ( ) const
virtual

Implements Net::AdminHandler.

Definition at line 76 of file adminhandler.cpp.

77 {
78 }

◆ kill()

void TmwAthena::AdminHandler::kill ( const std::string &  name) const
virtual

Implements Net::AdminHandler.

Definition at line 253 of file adminhandler.cpp.

254 {
255 }

◆ killable()

void TmwAthena::AdminHandler::killable ( const std::string &  name) const
virtual

Implements Net::AdminHandler.

Definition at line 223 of file adminhandler.cpp.

224 {
225 }

◆ killer()

void TmwAthena::AdminHandler::killer ( const std::string &  name) const
virtual

Implements Net::AdminHandler.

Definition at line 219 of file adminhandler.cpp.

220 {
221 }

◆ loadPosition()

void TmwAthena::AdminHandler::loadPosition ( const std::string &  name) const
virtual

Implements Net::AdminHandler.

Definition at line 207 of file adminhandler.cpp.

208 {
209 }

◆ localAnnounce()

void TmwAthena::AdminHandler::localAnnounce ( const std::string &  text) const
virtual

Implements Net::AdminHandler.

Definition at line 57 of file adminhandler.cpp.

58 {
59  createOutPacket(CMSG_ADMIN_LOCAL_ANNOUNCE);
60  outMsg.writeInt16(CAST_S16(text.length() + 4), "len");
61  outMsg.writeString(text, CAST_S32(text.length()), "message");
62 }

References CAST_S16, CAST_S32, and createOutPacket.

◆ locatePlayer()

void TmwAthena::AdminHandler::locatePlayer ( const std::string &  name) const
virtual

Implements Net::AdminHandler.

Definition at line 179 of file adminhandler.cpp.

180 {
181 }

◆ mobSearch()

void TmwAthena::AdminHandler::mobSearch ( const std::string &  name) const
virtual

Implements Net::AdminHandler.

Definition at line 143 of file adminhandler.cpp.

144 {
145 }

◆ mobSpawnSearch()

void TmwAthena::AdminHandler::mobSpawnSearch ( const std::string &  name) const
virtual

Implements Net::AdminHandler.

Definition at line 147 of file adminhandler.cpp.

148 {
149 }

◆ monsterInfo()

void TmwAthena::AdminHandler::monsterInfo ( const std::string &  name) const
virtual

Implements Net::AdminHandler.

Definition at line 131 of file adminhandler.cpp.

132 {
133 }

◆ mute()

void TmwAthena::AdminHandler::mute ( const Being *const  being,
const int  type,
const int  limit 
) const
virtual

Implements Net::AdminHandler.

Definition at line 104 of file adminhandler.cpp.

107 {
108 }

◆ muteName()

void TmwAthena::AdminHandler::muteName ( const std::string &  name) const
virtual

Implements Net::AdminHandler.

Definition at line 110 of file adminhandler.cpp.

111 {
112 }

◆ npcMove()

void TmwAthena::AdminHandler::npcMove ( const std::string &  name,
const int  x,
const int  y 
) const
virtual

Implements Net::AdminHandler.

Definition at line 265 of file adminhandler.cpp.

268 {
269 }

◆ nuke()

void TmwAthena::AdminHandler::nuke ( const std::string &  name) const
virtual

Implements Net::AdminHandler.

Definition at line 249 of file adminhandler.cpp.

250 {
251 }

◆ partyRecall()

void TmwAthena::AdminHandler::partyRecall ( const std::string &  name) const
virtual

Implements Net::AdminHandler.

Definition at line 283 of file adminhandler.cpp.

284 {
285 }

◆ playerCharGmCommands()

void TmwAthena::AdminHandler::playerCharGmCommands ( const std::string &  name) const
virtual

Implements Net::AdminHandler.

Definition at line 155 of file adminhandler.cpp.

156 {
157 }

◆ playerGmCommands()

void TmwAthena::AdminHandler::playerGmCommands ( const std::string &  name) const
virtual

Implements Net::AdminHandler.

Definition at line 151 of file adminhandler.cpp.

152 {
153 }

◆ randomWarp()

void TmwAthena::AdminHandler::randomWarp ( const std::string &  name) const
virtual

Implements Net::AdminHandler.

Definition at line 211 of file adminhandler.cpp.

212 {
213 }

◆ recallName()

void TmwAthena::AdminHandler::recallName ( const std::string &  name) const
virtual

Implements Net::AdminHandler.

Definition at line 99 of file adminhandler.cpp.

100 {
101  Gm::runCommand("recall", name);
102 }

References Gm::runCommand().

◆ requestLogin()

void TmwAthena::AdminHandler::requestLogin ( const Being *const  being) const
virtual

Implements Net::AdminHandler.

Definition at line 114 of file adminhandler.cpp.

115 {
116 }

◆ requestStats()

void TmwAthena::AdminHandler::requestStats ( const std::string &  name) const
virtual

Implements Net::AdminHandler.

Definition at line 127 of file adminhandler.cpp.

128 {
129 }

◆ resetCooldowns()

void TmwAthena::AdminHandler::resetCooldowns ( ) const
virtual

Implements Net::AdminHandler.

Definition at line 304 of file adminhandler.cpp.

305 {
306 }

◆ resetSkills()

void TmwAthena::AdminHandler::resetSkills ( ) const
virtual

Implements Net::AdminHandler.

Definition at line 90 of file adminhandler.cpp.

91 {
92 }

◆ resetStats()

void TmwAthena::AdminHandler::resetStats ( ) const
virtual

Implements Net::AdminHandler.

Definition at line 86 of file adminhandler.cpp.

87 {
88 }

◆ savePosition()

void TmwAthena::AdminHandler::savePosition ( const std::string &  name) const
virtual

Implements Net::AdminHandler.

Definition at line 203 of file adminhandler.cpp.

204 {
205 }

◆ setTileType()

void TmwAthena::AdminHandler::setTileType ( const int  x,
const int  y,
const int  type 
) const
virtual

Implements Net::AdminHandler.

Definition at line 118 of file adminhandler.cpp.

120 {
121 }

◆ showAccountInfo()

void TmwAthena::AdminHandler::showAccountInfo ( const std::string &  name) const
virtual

Implements Net::AdminHandler.

Definition at line 183 of file adminhandler.cpp.

184 {
185 }

◆ showCartList()

void TmwAthena::AdminHandler::showCartList ( const std::string &  name) const
virtual

Implements Net::AdminHandler.

Definition at line 171 of file adminhandler.cpp.

172 {
173 }

◆ showInventoryList()

void TmwAthena::AdminHandler::showInventoryList ( const std::string &  name) const
virtual

Implements Net::AdminHandler.

Definition at line 175 of file adminhandler.cpp.

176 {
177 }

◆ showLevel()

void TmwAthena::AdminHandler::showLevel ( const std::string &  name) const
virtual

Implements Net::AdminHandler.

Definition at line 159 of file adminhandler.cpp.

160 {
161 }

◆ showNpc()

void TmwAthena::AdminHandler::showNpc ( const std::string &  name) const
virtual

Implements Net::AdminHandler.

Definition at line 275 of file adminhandler.cpp.

276 {
277 }

◆ showStats()

void TmwAthena::AdminHandler::showStats ( const std::string &  name) const
virtual

Implements Net::AdminHandler.

Definition at line 163 of file adminhandler.cpp.

164 {
165 }

◆ showStorageList()

void TmwAthena::AdminHandler::showStorageList ( const std::string &  name) const
virtual

Implements Net::AdminHandler.

Definition at line 167 of file adminhandler.cpp.

168 {
169 }

◆ slide()

void TmwAthena::AdminHandler::slide ( const int  x,
const int  y 
) const
virtual

Implements Net::AdminHandler.

Definition at line 295 of file adminhandler.cpp.

296 {
297  warp(Game::instance()->getCurrentMapName(), x, y);
298 }
static Game * instance()
Definition: game.h:82
void warp(const std::string &map, const int x, const int y) const

References Game::instance(), warp(), x, and y.

◆ spawnClone()

void TmwAthena::AdminHandler::spawnClone ( const std::string &  name) const
virtual

Implements Net::AdminHandler.

Definition at line 191 of file adminhandler.cpp.

192 {
193 }

◆ spawnEvilClone()

void TmwAthena::AdminHandler::spawnEvilClone ( const std::string &  name) const
virtual

Implements Net::AdminHandler.

Definition at line 199 of file adminhandler.cpp.

200 {
201 }

◆ spawnSlave()

void TmwAthena::AdminHandler::spawnSlave ( const std::string &  name) const
virtual

Implements Net::AdminHandler.

Definition at line 187 of file adminhandler.cpp.

188 {
189 }

◆ spawnSlaveClone()

void TmwAthena::AdminHandler::spawnSlaveClone ( const std::string &  name) const
virtual

Implements Net::AdminHandler.

Definition at line 195 of file adminhandler.cpp.

196 {
197 }

◆ unequipAll()

void TmwAthena::AdminHandler::unequipAll ( const Being *const  being) const
virtual

Implements Net::AdminHandler.

Definition at line 123 of file adminhandler.cpp.

124 {
125 }

◆ unjail()

void TmwAthena::AdminHandler::unjail ( const std::string &  name) const
virtual

Implements Net::AdminHandler.

Definition at line 261 of file adminhandler.cpp.

262 {
263 }

◆ warp()

void TmwAthena::AdminHandler::warp ( const std::string &  map,
const int  x,
const int  y 
) const
virtual

Implements Net::AdminHandler.

Definition at line 80 of file adminhandler.cpp.

81 {
82  Gm::runCommand("warp",
83  strprintf("%s %d %d", map.c_str(), x, y));
84 }
std::string strprintf(const char *const format,...)

References Gm::runCommand(), strprintf(), x, and y.

Referenced by slide().

◆ whoDrops()

void TmwAthena::AdminHandler::whoDrops ( const std::string &  name) const
virtual

Implements Net::AdminHandler.

Definition at line 139 of file adminhandler.cpp.

140 {
141 }

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