summaryrefslogtreecommitdiff
path: root/src/net/eathena
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/eathena')
-rw-r--r--src/net/eathena/chathandler.cpp14
-rw-r--r--src/net/eathena/chathandler.h5
-rw-r--r--src/net/eathena/protocol.h1
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