summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui/widgets/tabs/chat/channeltab.cpp2
-rw-r--r--src/net/chathandler.h3
-rw-r--r--src/net/eathena/chathandler.cpp6
-rw-r--r--src/net/eathena/chathandler.h3
-rw-r--r--src/net/tmwa/chathandler.cpp5
-rw-r--r--src/net/tmwa/chathandler.h3
6 files changed, 21 insertions, 1 deletions
diff --git a/src/gui/widgets/tabs/chat/channeltab.cpp b/src/gui/widgets/tabs/chat/channeltab.cpp
index 6f7242578..cf8e2443f 100644
--- a/src/gui/widgets/tabs/chat/channeltab.cpp
+++ b/src/gui/widgets/tabs/chat/channeltab.cpp
@@ -50,7 +50,7 @@ void ChannelTab::handleInput(const std::string &msg)
{
std::string newMsg;
newMsg = ChatWindow::doReplace(msg);
- chatHandler->privateMessage(mChannelName, newMsg);
+ chatHandler->channelMessage(mChannelName, newMsg);
}
bool ChannelTab::handleCommand(const std::string &restrict type,
diff --git a/src/net/chathandler.h b/src/net/chathandler.h
index ede516f06..133b64c87 100644
--- a/src/net/chathandler.h
+++ b/src/net/chathandler.h
@@ -53,6 +53,9 @@ class ChatHandler notfinal
virtual void privateMessage(const std::string &restrict recipient,
const std::string &restrict text) = 0;
+ virtual void channelMessage(const std::string &restrict channel,
+ const std::string &restrict text) = 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 cff13879f..b10224c4a 100644
--- a/src/net/eathena/chathandler.cpp
+++ b/src/net/eathena/chathandler.cpp
@@ -184,6 +184,12 @@ void ChatHandler::privateMessage(const std::string &restrict recipient,
mSentWhispers.push(recipient);
}
+void ChatHandler::channelMessage(const std::string &restrict channel,
+ const std::string &restrict text)
+{
+ privateMessage(channel, text);
+}
+
void ChatHandler::who() const
{
createOutPacket(CMSG_WHO_REQUEST);
diff --git a/src/net/eathena/chathandler.h b/src/net/eathena/chathandler.h
index 77484c946..82abae9a1 100644
--- a/src/net/eathena/chathandler.h
+++ b/src/net/eathena/chathandler.h
@@ -48,6 +48,9 @@ class ChatHandler final : public MessageHandler, public Ea::ChatHandler
void privateMessage(const std::string &restrict recipient,
const std::string &restrict text) override final;
+ void channelMessage(const std::string &restrict channel,
+ const std::string &restrict text) 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 051443318..68ceb0d8d 100644
--- a/src/net/tmwa/chathandler.cpp
+++ b/src/net/tmwa/chathandler.cpp
@@ -163,6 +163,11 @@ void ChatHandler::privateMessage(const std::string &restrict recipient,
mSentWhispers.push(recipient);
}
+void ChatHandler::channelMessage(const std::string &restrict channel A_UNUSED,
+ const std::string &restrict text A_UNUSED)
+{
+}
+
void ChatHandler::who() const
{
createOutPacket(CMSG_WHO_REQUEST);
diff --git a/src/net/tmwa/chathandler.h b/src/net/tmwa/chathandler.h
index 15777c1e3..fff0432fe 100644
--- a/src/net/tmwa/chathandler.h
+++ b/src/net/tmwa/chathandler.h
@@ -48,6 +48,9 @@ class ChatHandler final : public MessageHandler, public Ea::ChatHandler
void privateMessage(const std::string &restrict recipient,
const std::string &restrict text) override final;
+ void channelMessage(const std::string &restrict channel,
+ const std::string &restrict text) override final;
+
void who() const override final;
void sendRaw(const std::string &args) const;