From f1beb8d910253a31b9dd239071effa2d518ceee0 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 23 Oct 2011 00:25:26 +0300 Subject: Add chat commands for using server side ignore for all whispers. Commands: /serverignoreall and /serverunignoreall --- src/net/tmwa/chathandler.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'src/net/tmwa/chathandler.cpp') diff --git a/src/net/tmwa/chathandler.cpp b/src/net/tmwa/chathandler.cpp index 4e4318595..fe6592d93 100644 --- a/src/net/tmwa/chathandler.cpp +++ b/src/net/tmwa/chathandler.cpp @@ -60,6 +60,7 @@ ChatHandler::ChatHandler() SMSG_WHISPER_RESPONSE, SMSG_GM_CHAT, SMSG_MVP, // MVP + SMSG_IGNORE_ALL_RESPONSE, 0 }; handledMessages = _messages; @@ -96,6 +97,9 @@ void ChatHandler::handleMessage(Net::MessageIn &msg) processMVP(msg); break; + case SMSG_IGNORE_ALL_RESPONSE: + processIgnoreAllResponse(msg); + default: break; } @@ -249,5 +253,16 @@ void ChatHandler::processRaw(MessageOut &outMsg, std::string &line) } } -} // namespace TmwAthena +void ChatHandler::ignoreAll() +{ + MessageOut outMsg(CMSG_IGNORE_ALL); + outMsg.writeInt8(0); +} +void ChatHandler::unIgnoreAll() +{ + MessageOut outMsg(CMSG_IGNORE_ALL); + outMsg.writeInt8(1); +} + +} // namespace TmwAthena -- cgit v1.2.3-60-g2f50