summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-11 21:22:03 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-11 21:26:53 +0300
commitbe214fb83a0207e6675f08d299cd30d575371794 (patch)
tree5611aaf6433964cbbc370d9bf12fb7bb75dfe4a0 /src
parentc54d7e82f0f05f51ce45db59d14e1b70fe33ef3b (diff)
downloadplus-be214fb83a0207e6675f08d299cd30d575371794.tar.gz
plus-be214fb83a0207e6675f08d299cd30d575371794.tar.bz2
plus-be214fb83a0207e6675f08d299cd30d575371794.tar.xz
plus-be214fb83a0207e6675f08d299cd30d575371794.zip
add packet CMSG_IGNORE_NICK 0x00cf.
Diffstat (limited to 'src')
-rw-r--r--src/net/chathandler.h4
-rw-r--r--src/net/eathena/chathandler.cpp15
-rw-r--r--src/net/eathena/chathandler.h4
-rw-r--r--src/net/eathena/protocol.h1
-rw-r--r--src/net/tmwa/chathandler.cpp14
-rw-r--r--src/net/tmwa/chathandler.h4
-rw-r--r--src/net/tmwa/protocol.h2
7 files changed, 44 insertions, 0 deletions
diff --git a/src/net/chathandler.h b/src/net/chathandler.h
index 0246978df..c0bef3855 100644
--- a/src/net/chathandler.h
+++ b/src/net/chathandler.h
@@ -58,6 +58,10 @@ class ChatHandler notfinal
virtual void unIgnoreAll() const = 0;
+ virtual void ignore(const std::string &nick) const = 0;
+
+ virtual void unIgnore(const std::string &nick) const = 0;
+
virtual void clear() = 0;
virtual void createChatRoom(const std::string &title, const std::string &password, const int limit, const bool isPublic) = 0;
diff --git a/src/net/eathena/chathandler.cpp b/src/net/eathena/chathandler.cpp
index 60b93f89e..8013513a1 100644
--- a/src/net/eathena/chathandler.cpp
+++ b/src/net/eathena/chathandler.cpp
@@ -221,6 +221,21 @@ 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,
const std::string &password,
const int limit,
diff --git a/src/net/eathena/chathandler.h b/src/net/eathena/chathandler.h
index 119651ef4..78da589ab 100644
--- a/src/net/eathena/chathandler.h
+++ b/src/net/eathena/chathandler.h
@@ -64,6 +64,10 @@ class ChatHandler final : public MessageHandler, public Ea::ChatHandler
static void processRaw(MessageOut &restrict outMsg,
const std::string &restrict line);
+ 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/eathena/protocol.h b/src/net/eathena/protocol.h
index d16fd66ad..e5fdfc683 100644
--- a/src/net/eathena/protocol.h
+++ b/src/net/eathena/protocol.h
@@ -334,6 +334,7 @@
#define CMSG_SOLVE_CHAR_NAME 0x0368
#define CMSG_IGNORE_ALL 0x00d0
+#define CMSG_IGNORE_NICK 0x00cf
#define CMSG_REQUEST_RANKS 0x097c
#define CMSG_SET_SHORTCUTS 0x02ba
#define CMSG_NPC_COMPLETE_PROGRESS_BAR 0x02f1
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