Implement most of the remaining client-side GM commands

* Muting a player's freechat
* Kicking players
* Querying info about a player
* Teleporting yourself to a player
* Teleporting a player to yourself
* Teleporting a player to another player
* Teleporting a player to arbitrary coords
* Teleporting a player to arbitrary coords in an arbitrary mapnum
* /unstick

Also:
* Renamed misleading setSpecialPlayer() to setValuePlayer()
* Revamped monitor logic
* Added server-side checks to account level 50 commands
* Made sure even trade chat is run through sanitizeText()
* Moved setSpecialState() closer to its calling functions
* Interpret client commands even in Buddy and Group chat (but not in
Trade chat)
This commit is contained in:
2020-12-31 02:13:43 +01:00
parent c78b3ca69f
commit a12acbb68f
9 changed files with 349 additions and 71 deletions

View File

@@ -21,6 +21,7 @@ namespace ChatManager {
extern std::vector<std::string> dump;
void init();
bool runCmd(std::string full, CNSocket* sock);
void registerCommand(std::string cmd, int requiredLevel, CommandHandler handlr, std::string help = "");
void chatHandler(CNSocket* sock, CNPacketData* data);