diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/net/chathandler.h | 2 | ||||
-rw-r--r-- | src/net/eathena/chathandler.cpp | 7 | ||||
-rw-r--r-- | src/net/eathena/chathandler.h | 2 | ||||
-rw-r--r-- | src/net/tmwa/chathandler.cpp | 4 | ||||
-rw-r--r-- | src/net/tmwa/chathandler.h | 2 |
5 files changed, 17 insertions, 0 deletions
diff --git a/src/net/chathandler.h b/src/net/chathandler.h index 133b64c87..770f27e91 100644 --- a/src/net/chathandler.h +++ b/src/net/chathandler.h @@ -56,6 +56,8 @@ class ChatHandler notfinal virtual void channelMessage(const std::string &restrict channel, const std::string &restrict text) = 0; + virtual void joinChannel(const std::string &channel) = 0; + virtual void who() const = 0; virtual void sendRaw(const std::string &args) const = 0; diff --git a/src/net/eathena/chathandler.cpp b/src/net/eathena/chathandler.cpp index b10224c4a..ac626fd71 100644 --- a/src/net/eathena/chathandler.cpp +++ b/src/net/eathena/chathandler.cpp @@ -517,4 +517,11 @@ void ChatHandler::processChatLeave(Net::MessageIn &msg) msg.readUInt8("flag"); // 0 - left, 1 - kicked } +void ChatHandler::joinChannel(const std::string &channel) +{ + // to join channel need use gm commands or send something. + // here we sending invisible message. + channelMessage(channel, "\302\202G"); +} + } // namespace EAthena diff --git a/src/net/eathena/chathandler.h b/src/net/eathena/chathandler.h index 82abae9a1..418250eb1 100644 --- a/src/net/eathena/chathandler.h +++ b/src/net/eathena/chathandler.h @@ -51,6 +51,8 @@ class ChatHandler final : public MessageHandler, public Ea::ChatHandler void channelMessage(const std::string &restrict channel, const std::string &restrict text) override final; + void joinChannel(const std::string &channel) override final; + void who() const override final; void sendRaw(const std::string &args) const override final; diff --git a/src/net/tmwa/chathandler.cpp b/src/net/tmwa/chathandler.cpp index 68ceb0d8d..b2f14e027 100644 --- a/src/net/tmwa/chathandler.cpp +++ b/src/net/tmwa/chathandler.cpp @@ -462,4 +462,8 @@ void ChatHandler::joinChat(const ChatObject *const chat A_UNUSED, { } +void ChatHandler::joinChannel(const std::string &channel A_UNUSED) +{ +} + } // namespace TmwAthena diff --git a/src/net/tmwa/chathandler.h b/src/net/tmwa/chathandler.h index fff0432fe..791ad11f3 100644 --- a/src/net/tmwa/chathandler.h +++ b/src/net/tmwa/chathandler.h @@ -51,6 +51,8 @@ class ChatHandler final : public MessageHandler, public Ea::ChatHandler void channelMessage(const std::string &restrict channel, const std::string &restrict text) override final; + void joinChannel(const std::string &channel) override final; + void who() const override final; void sendRaw(const std::string &args) const; |