summaryrefslogtreecommitdiff
path: root/src/net/eathena
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-12-03 22:12:17 +0300
committerAndrei Karas <akaras@inbox.ru>2014-12-03 22:12:17 +0300
commit565e617983d0eaa52131056cd2bc15c9e4a1bece (patch)
treeeb3993bbc44f3176e62a7e901e760296af09941e /src/net/eathena
parent9a62661a3b833f7f74f65c1733af8d3a25af9702 (diff)
downloadmanaplus-565e617983d0eaa52131056cd2bc15c9e4a1bece.tar.gz
manaplus-565e617983d0eaa52131056cd2bc15c9e4a1bece.tar.bz2
manaplus-565e617983d0eaa52131056cd2bc15c9e4a1bece.tar.xz
manaplus-565e617983d0eaa52131056cd2bc15c9e4a1bece.zip
eathena: add packet CMSG_CHAT_PART_CHANNEL 0x0b09.
Diffstat (limited to 'src/net/eathena')
-rw-r--r--src/net/eathena/chathandler.cpp9
-rw-r--r--src/net/eathena/chathandler.h2
-rw-r--r--src/net/eathena/protocol.h1
3 files changed, 12 insertions, 0 deletions
diff --git a/src/net/eathena/chathandler.cpp b/src/net/eathena/chathandler.cpp
index 4c3340836..37f63fbcb 100644
--- a/src/net/eathena/chathandler.cpp
+++ b/src/net/eathena/chathandler.cpp
@@ -646,4 +646,13 @@ void ChatHandler::processJoinChannel(Net::MessageIn &msg)
}
}
+void ChatHandler::partChannel(const std::string &channel)
+{
+ if (serverFeatures->haveJoinChannel())
+ {
+ createOutPacket(CMSG_CHAT_PART_CHANNEL);
+ outMsg.writeString(channel, 24, "channel name");
+ }
+}
+
} // namespace EAthena
diff --git a/src/net/eathena/chathandler.h b/src/net/eathena/chathandler.h
index f3893521e..1d2b03e73 100644
--- a/src/net/eathena/chathandler.h
+++ b/src/net/eathena/chathandler.h
@@ -82,6 +82,8 @@ class ChatHandler final : public MessageHandler, public Ea::ChatHandler
void joinChat(const ChatObject *const chat,
const std::string &password) const override final;
+ void partChannel(const std::string &channel) override final;
+
protected:
static std::string extractChannelFromMessage(std::string &chatMsg);
diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h
index 7834b3c14..d8212d647 100644
--- a/src/net/eathena/protocol.h
+++ b/src/net/eathena/protocol.h
@@ -349,6 +349,7 @@
#define CMSG_CHAT_WHO 0x00c1
#define CMSG_CHAT_JOIN 0x00d9
#define CMSG_CHAT_JOIN_CHANNEL 0x0b07
+#define CMSG_CHAT_PART_CHANNEL 0x0b09
#define CMSG_BATTLE_CHAT_MESSAGE 0x02db
#define CMSG_CREAYE_CHAT_ROOM 0x00d5