mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2025-11-16 15:00:09 +00:00
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:
@@ -172,6 +172,18 @@ void GroupManager::chatGroup(CNSocket* sock, CNPacketData* data) {
|
||||
|
||||
std::string fullChat = ChatManager::sanitizeText(U16toU8(chat->szFreeChat));
|
||||
|
||||
if (fullChat.length() > 1 && fullChat[0] == CMD_PREFIX) { // PREFIX
|
||||
ChatManager::runCmd(fullChat, sock);
|
||||
return;
|
||||
}
|
||||
|
||||
if (plr->iSpecialState & CN_SPECIAL_STATE_FLAG__MUTE_FREECHAT)
|
||||
return;
|
||||
|
||||
std::string logLine = "[GroupChat] " + PlayerManager::getPlayerName(plr, true) + ": " + fullChat;
|
||||
std::cout << logLine << std::endl;
|
||||
ChatManager::dump.push_back(logLine);
|
||||
|
||||
// send to client
|
||||
INITSTRUCT(sP_FE2CL_REP_SEND_ALL_GROUP_FREECHAT_MESSAGE_SUCC, resp);
|
||||
|
||||
@@ -194,6 +206,10 @@ void GroupManager::menuChatGroup(CNSocket* sock, CNPacketData* data) {
|
||||
return;
|
||||
|
||||
std::string fullChat = ChatManager::sanitizeText(U16toU8(chat->szFreeChat));
|
||||
std::string logLine = "[GroupMenuChat] " + PlayerManager::getPlayerName(plr, true) + ": " + fullChat;
|
||||
|
||||
std::cout << logLine << std::endl;
|
||||
ChatManager::dump.push_back(logLine);
|
||||
|
||||
// send to client
|
||||
INITSTRUCT(sP_FE2CL_REP_SEND_ALL_GROUP_MENUCHAT_MESSAGE_SUCC, resp);
|
||||
|
||||
Reference in New Issue
Block a user