diff options
Diffstat (limited to 'src/net/tmwa')
-rw-r--r-- | src/net/tmwa/chathandler.cpp | 14 | ||||
-rw-r--r-- | src/net/tmwa/chathandler.h | 4 | ||||
-rw-r--r-- | src/net/tmwa/protocol.h | 2 |
3 files changed, 20 insertions, 0 deletions
diff --git a/src/net/tmwa/chathandler.cpp b/src/net/tmwa/chathandler.cpp index 197661d08..1635cdbc1 100644 --- a/src/net/tmwa/chathandler.cpp +++ b/src/net/tmwa/chathandler.cpp @@ -246,6 +246,20 @@ void ChatHandler::unIgnoreAll() const outMsg.writeInt8(1, "flag"); } +void ChatHandler::ignore(const std::string &nick) const +{ + MessageOut outMsg(CMSG_IGNORE_NICK); + outMsg.writeString(nick, 24, "nick"); + outMsg.writeInt8(0, "flag"); +} + +void ChatHandler::unIgnore(const std::string &nick) const +{ + MessageOut outMsg(CMSG_IGNORE_NICK); + outMsg.writeString(nick, 24, "nick"); + outMsg.writeInt8(1, "flag"); +} + void ChatHandler::createChatRoom(const std::string &title A_UNUSED, const std::string &password A_UNUSED, const int limit A_UNUSED, diff --git a/src/net/tmwa/chathandler.h b/src/net/tmwa/chathandler.h index 52b88ebd7..95989835f 100644 --- a/src/net/tmwa/chathandler.h +++ b/src/net/tmwa/chathandler.h @@ -64,6 +64,10 @@ class ChatHandler final : public MessageHandler, public Ea::ChatHandler const int limit, const bool isPublic) override final; + void ignore(const std::string &nick) const override final; + + void unIgnore(const std::string &nick) const override final; + protected: void processChat(Net::MessageIn &msg); diff --git a/src/net/tmwa/protocol.h b/src/net/tmwa/protocol.h index f3652da7d..0b158c342 100644 --- a/src/net/tmwa/protocol.h +++ b/src/net/tmwa/protocol.h @@ -287,7 +287,9 @@ #define CMSG_GUILD_ALLIANCE_DELETE 0x0183 #define CMSG_SOLVE_CHAR_NAME 0x0193 +#define CMSG_IGNORE_NICK 0x00cf #define SMSG_SOLVE_CHAR_NAME 0x0194 + #define CMSG_CLIENT_DISCONNECT 0x7532 #define SMSG_SKILL_CASTING 0x013e #define SMSG_SKILL_CAST_CANCEL 0x01b9 |