diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-03-29 12:36:24 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-03-29 12:36:24 +0300 |
commit | 23b0787ad33fc01e3a65bd53f2d8bc9f52a91224 (patch) | |
tree | 4cf293d3c4afd9a9c40b454b811a62f70a296818 /src/net/eathena | |
parent | 523c9239668819844966097bd82445863d89103f (diff) | |
download | plus-23b0787ad33fc01e3a65bd53f2d8bc9f52a91224.tar.gz plus-23b0787ad33fc01e3a65bd53f2d8bc9f52a91224.tar.bz2 plus-23b0787ad33fc01e3a65bd53f2d8bc9f52a91224.tar.xz plus-23b0787ad33fc01e3a65bd53f2d8bc9f52a91224.zip |
eathena: add packet CMSG_SET_CHAT_ROOM_OPTIONS 0x00de.
Diffstat (limited to 'src/net/eathena')
-rw-r--r-- | src/net/eathena/chathandler.cpp | 14 | ||||
-rw-r--r-- | src/net/eathena/chathandler.h | 5 | ||||
-rw-r--r-- | src/net/eathena/protocol.h | 1 |
3 files changed, 20 insertions, 0 deletions
diff --git a/src/net/eathena/chathandler.cpp b/src/net/eathena/chathandler.cpp index 78e909d62..ad30750a5 100644 --- a/src/net/eathena/chathandler.cpp +++ b/src/net/eathena/chathandler.cpp @@ -944,4 +944,18 @@ void ChatHandler::leaveChatRoom() const createOutPacket(CMSG_LEAVE_CHAT_ROOM); } +void ChatHandler::setChatRoomOptions(const int limit, + const bool isPublic, + const std::string &password, + const std::string &title) const +{ + createOutPacket(CMSG_SET_CHAT_ROOM_OPTIONS); + const int sz = title.size(); + outMsg.writeInt16(15 + sz, "len"); + outMsg.writeInt16(static_cast<int16_t>(limit), "limit"); + outMsg.writeInt8(static_cast<int8_t>(isPublic ? 1 : 0), "type"); + outMsg.writeString(password, 8, "password"); + outMsg.writeString(title, sz, "title"); +} + } // namespace EAthena diff --git a/src/net/eathena/chathandler.h b/src/net/eathena/chathandler.h index 174c70bfa..89fc7f43c 100644 --- a/src/net/eathena/chathandler.h +++ b/src/net/eathena/chathandler.h @@ -89,6 +89,11 @@ class ChatHandler final : public MessageHandler, public Ea::ChatHandler void leaveChatRoom() const override final; + void setChatRoomOptions(const int limit, + const bool isPublic, + const std::string &password, + const std::string &title) 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 d290e3a20..d1b37bdbf 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -494,6 +494,7 @@ #define CMSG_CREAYE_CHAT_ROOM 0x00d5 #define CMSG_LEAVE_CHAT_ROOM 0x00e3 +#define CMSG_SET_CHAT_ROOM_OPTIONS 0x00de #define CMSG_SKILL_LEVELUP_REQUEST 0x0112 #define CMSG_STAT_UPDATE_REQUEST 0x00bb |