summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
Diffstat (limited to 'src/net')
-rw-r--r--src/net/chathandler.h9
-rw-r--r--src/net/ea/chathandler.cpp5
-rw-r--r--src/net/ea/chathandler.h3
-rw-r--r--src/net/eathena/chathandler.cpp6
-rw-r--r--src/net/eathena/chathandler.h6
-rw-r--r--src/net/tmwa/chathandler.cpp10
-rw-r--r--src/net/tmwa/chathandler.h6
7 files changed, 16 insertions, 29 deletions
diff --git a/src/net/chathandler.h b/src/net/chathandler.h
index 4ffa62cd8..5c236b4f4 100644
--- a/src/net/chathandler.h
+++ b/src/net/chathandler.h
@@ -43,16 +43,13 @@ class ChatHandler notfinal
virtual ~ChatHandler()
{ }
- virtual void talk(const std::string &restrict text,
- const std::string &restrict channel) const = 0;
+ virtual void talk(const std::string &restrict text) const = 0;
- virtual void talkPet(const std::string &restrict text,
- const std::string &restrict channel) const = 0;
+ virtual void talkPet(const std::string &restrict text) const = 0;
virtual void talkRaw(const std::string &text) const = 0;
- virtual void me(const std::string &restrict text,
- const std::string &restrict channel) const = 0;
+ virtual void me(const std::string &restrict text) const = 0;
virtual void privateMessage(const std::string &restrict recipient,
const std::string &restrict text)
diff --git a/src/net/ea/chathandler.cpp b/src/net/ea/chathandler.cpp
index 6b0d4bd2a..d616ab4ec 100644
--- a/src/net/ea/chathandler.cpp
+++ b/src/net/ea/chathandler.cpp
@@ -52,12 +52,11 @@ void ChatHandler::clear() const
ChatRecv::mSkipping = true;
}
-void ChatHandler::me(const std::string &restrict text,
- const std::string &restrict channel) const
+void ChatHandler::me(const std::string &restrict text) const
{
// here need string duplication
std::string action = strprintf("*%s*", text.c_str());
- talk(action, channel);
+ talk(action);
}
} // namespace Ea
diff --git a/src/net/ea/chathandler.h b/src/net/ea/chathandler.h
index a7fdb0e88..da6d1397c 100644
--- a/src/net/ea/chathandler.h
+++ b/src/net/ea/chathandler.h
@@ -41,8 +41,7 @@ class ChatHandler notfinal : public Net::ChatHandler
~ChatHandler() override;
- void me(const std::string &restrict text,
- const std::string &restrict channel) const override final;
+ void me(const std::string &restrict text) const override final;
void clear() const override final;
};
diff --git a/src/net/eathena/chathandler.cpp b/src/net/eathena/chathandler.cpp
index 10f55bba4..22a84e32f 100644
--- a/src/net/eathena/chathandler.cpp
+++ b/src/net/eathena/chathandler.cpp
@@ -54,8 +54,7 @@ ChatHandler::~ChatHandler()
chatHandler = nullptr;
}
-void ChatHandler::talk(const std::string &restrict text,
- const std::string &restrict channel A_UNUSED) const
+void ChatHandler::talk(const std::string &restrict text) const
{
if (localPlayer == nullptr)
return;
@@ -287,8 +286,7 @@ void ChatHandler::partChannel(const std::string &channel) const
}
}
-void ChatHandler::talkPet(const std::string &restrict text,
- const std::string &restrict channel A_UNUSED) const
+void ChatHandler::talkPet(const std::string &restrict text) const
{
if (text.empty())
return;
diff --git a/src/net/eathena/chathandler.h b/src/net/eathena/chathandler.h
index e62cbb7d2..8e116ffc5 100644
--- a/src/net/eathena/chathandler.h
+++ b/src/net/eathena/chathandler.h
@@ -38,8 +38,7 @@ class ChatHandler final : public Ea::ChatHandler
~ChatHandler() override final;
- void talk(const std::string &restrict text,
- const std::string &restrict channel) const override final;
+ void talk(const std::string &restrict text) const override final;
void talkRaw(const std::string &text) const override final;
@@ -79,8 +78,7 @@ class ChatHandler final : public Ea::ChatHandler
void partChannel(const std::string &channel) const override final;
- void talkPet(const std::string &restrict text,
- const std::string &restrict channel) const override final;
+ void talkPet(const std::string &restrict text) const override final;
void leaveChatRoom() const override final;
diff --git a/src/net/tmwa/chathandler.cpp b/src/net/tmwa/chathandler.cpp
index 0efc12a27..4acf65ddd 100644
--- a/src/net/tmwa/chathandler.cpp
+++ b/src/net/tmwa/chathandler.cpp
@@ -52,8 +52,7 @@ ChatHandler::~ChatHandler()
chatHandler = nullptr;
}
-void ChatHandler::talk(const std::string &restrict text,
- const std::string &restrict channel A_UNUSED) const
+void ChatHandler::talk(const std::string &restrict text) const
{
if (localPlayer == nullptr)
return;
@@ -98,7 +97,7 @@ void ChatHandler::channelMessage(const std::string &restrict channel,
const std::string &restrict text) const
{
if (channel == TRADE_CHANNEL)
- talk("\302\202" + text, GENERAL_CHANNEL);
+ talk("\302\202" + text);
else if (channel == GM_CHANNEL)
Gm::runCommand("wgm", text);
}
@@ -230,12 +229,11 @@ void ChatHandler::partChannel(const std::string &channel A_UNUSED) const
{
}
-void ChatHandler::talkPet(const std::string &restrict text,
- const std::string &restrict channel) const
+void ChatHandler::talkPet(const std::string &restrict text) const
{
// here need string duplication
std::string action = strprintf("\302\202\303 %s", text.c_str());
- talk(action, channel);
+ talk(action);
}
void ChatHandler::leaveChatRoom() const
diff --git a/src/net/tmwa/chathandler.h b/src/net/tmwa/chathandler.h
index 58400b265..ec5fb9bf3 100644
--- a/src/net/tmwa/chathandler.h
+++ b/src/net/tmwa/chathandler.h
@@ -38,8 +38,7 @@ class ChatHandler final : public Ea::ChatHandler
~ChatHandler() override final;
- void talk(const std::string &restrict text,
- const std::string &restrict channel) const override final;
+ void talk(const std::string &restrict text) const override final;
void talkRaw(const std::string &text) const override final;
@@ -79,8 +78,7 @@ class ChatHandler final : public Ea::ChatHandler
void partChannel(const std::string &channel) const override final;
- void talkPet(const std::string &restrict text,
- const std::string &restrict channel) const override final;
+ void talkPet(const std::string &restrict text) const override final;
void leaveChatRoom() const override final;