From 9ee88d0b1068599f60710a13551257f044722a9d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 13 Oct 2014 01:39:00 +0300 Subject: In chatHandler add function to join channel. --- src/net/eathena/chathandler.cpp | 7 +++++++ src/net/eathena/chathandler.h | 2 ++ 2 files changed, 9 insertions(+) (limited to 'src/net/eathena') 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; -- cgit v1.2.3-70-g09d2