summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-03-29 12:53:28 +0300
committerAndrei Karas <akaras@inbox.ru>2015-03-29 12:53:28 +0300
commit5ff2a20caeba3a245458adc890b853caf4944992 (patch)
treedbc99b7605c8864194a21c165ed860fa807e4c1b /src/net
parent6eb5d96b568de3632ba755ff7e794a59083d1f62 (diff)
downloadmv-5ff2a20caeba3a245458adc890b853caf4944992.tar.gz
mv-5ff2a20caeba3a245458adc890b853caf4944992.tar.bz2
mv-5ff2a20caeba3a245458adc890b853caf4944992.tar.xz
mv-5ff2a20caeba3a245458adc890b853caf4944992.zip
eathena: add packet CMSG_KICK_FROM_CHAT_ROOM 0x00e2.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/chathandler.h2
-rw-r--r--src/net/eathena/chathandler.cpp6
-rw-r--r--src/net/eathena/chathandler.h2
-rw-r--r--src/net/eathena/protocol.h1
-rw-r--r--src/net/tmwa/chathandler.cpp4
-rw-r--r--src/net/tmwa/chathandler.h2
6 files changed, 17 insertions, 0 deletions
diff --git a/src/net/chathandler.h b/src/net/chathandler.h
index 2452aecb1..f8659a8b2 100644
--- a/src/net/chathandler.h
+++ b/src/net/chathandler.h
@@ -92,6 +92,8 @@ class ChatHandler notfinal
const std::string &title) const = 0;
virtual void setChatRoomOwner(const std::string &nick) const = 0;
+
+ virtual void kickFromChatRoom(const std::string &nick) const = 0;
};
} // namespace Net
diff --git a/src/net/eathena/chathandler.cpp b/src/net/eathena/chathandler.cpp
index 3fb487a3a..f0587602d 100644
--- a/src/net/eathena/chathandler.cpp
+++ b/src/net/eathena/chathandler.cpp
@@ -965,4 +965,10 @@ void ChatHandler::setChatRoomOwner(const std::string &nick) const
outMsg.writeString(nick, 24, "nick");
}
+void ChatHandler::kickFromChatRoom(const std::string &nick) const
+{
+ createOutPacket(CMSG_KICK_FROM_CHAT_ROOM);
+ outMsg.writeString(nick, 24, "nick");
+}
+
} // namespace EAthena
diff --git a/src/net/eathena/chathandler.h b/src/net/eathena/chathandler.h
index 87599fd20..3fd70290a 100644
--- a/src/net/eathena/chathandler.h
+++ b/src/net/eathena/chathandler.h
@@ -96,6 +96,8 @@ class ChatHandler final : public MessageHandler, public Ea::ChatHandler
void setChatRoomOwner(const std::string &nick) const override final;
+ void kickFromChatRoom(const std::string &nick) const 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 e95a5716e..5cea63669 100644
--- a/src/net/eathena/protocol.h
+++ b/src/net/eathena/protocol.h
@@ -496,6 +496,7 @@
#define CMSG_LEAVE_CHAT_ROOM 0x00e3
#define CMSG_SET_CHAT_ROOM_OPTIONS 0x00de
#define CMSG_SET_CHAT_ROOM_OWNER 0x00e0
+#define CMSG_KICK_FROM_CHAT_ROOM 0x00e2
#define CMSG_SKILL_LEVELUP_REQUEST 0x0112
#define CMSG_STAT_UPDATE_REQUEST 0x00bb
diff --git a/src/net/tmwa/chathandler.cpp b/src/net/tmwa/chathandler.cpp
index f54d2cac0..c60c1f600 100644
--- a/src/net/tmwa/chathandler.cpp
+++ b/src/net/tmwa/chathandler.cpp
@@ -703,4 +703,8 @@ void ChatHandler::setChatRoomOwner(const std::string &nick A_UNUSED) const
{
}
+void ChatHandler::kickFromChatRoom(const std::string &nick A_UNUSED) const
+{
+}
+
} // namespace TmwAthena
diff --git a/src/net/tmwa/chathandler.h b/src/net/tmwa/chathandler.h
index dee315352..58c292275 100644
--- a/src/net/tmwa/chathandler.h
+++ b/src/net/tmwa/chathandler.h
@@ -94,6 +94,8 @@ class ChatHandler final : public MessageHandler, public Ea::ChatHandler
void setChatRoomOwner(const std::string &nick) const override final;
+ void kickFromChatRoom(const std::string &nick) const override final;
+
protected:
static void processChat(Net::MessageIn &msg);