diff options
Diffstat (limited to 'src/net/ea')
-rw-r--r-- | src/net/ea/adminhandler.cpp | 10 | ||||
-rw-r--r-- | src/net/ea/chathandler.cpp | 3 | ||||
-rw-r--r-- | src/net/ea/chathandler.h | 3 |
3 files changed, 9 insertions, 7 deletions
diff --git a/src/net/ea/adminhandler.cpp b/src/net/ea/adminhandler.cpp index 542937008..f6450a225 100644 --- a/src/net/ea/adminhandler.cpp +++ b/src/net/ea/adminhandler.cpp @@ -31,9 +31,11 @@ namespace Ea { +const std::string GENERAL_CHANNEL = "\000\000\000"; + void AdminHandler::kickName(const std::string &name) { - Net::getChatHandler()->talk("@kick " + name); + Net::getChatHandler()->talk("@kick " + name, GENERAL_CHANNEL); } void AdminHandler::ban(int playerId A_UNUSED) @@ -43,7 +45,7 @@ void AdminHandler::ban(int playerId A_UNUSED) void AdminHandler::banName(const std::string &name) { - Net::getChatHandler()->talk("@ban " + name); + Net::getChatHandler()->talk("@ban " + name, GENERAL_CHANNEL); } void AdminHandler::unban(int playerId A_UNUSED) @@ -53,7 +55,7 @@ void AdminHandler::unban(int playerId A_UNUSED) void AdminHandler::unbanName(const std::string &name) { - Net::getChatHandler()->talk("@unban " + name); + Net::getChatHandler()->talk("@unban " + name, GENERAL_CHANNEL); } void AdminHandler::mute(int playerId A_UNUSED, int type A_UNUSED, @@ -65,7 +67,7 @@ void AdminHandler::mute(int playerId A_UNUSED, int type A_UNUSED, void AdminHandler::warp(std::string map, int x, int y) { Net::getChatHandler()->talk(strprintf( - "@warp %s %d %d", map.c_str(), x, y)); + "@warp %s %d %d", map.c_str(), x, y), GENERAL_CHANNEL); } } // namespace Ea diff --git a/src/net/ea/chathandler.cpp b/src/net/ea/chathandler.cpp index c6e490b00..7be94ca3e 100644 --- a/src/net/ea/chathandler.cpp +++ b/src/net/ea/chathandler.cpp @@ -49,8 +49,7 @@ ChatHandler::ChatHandler() void ChatHandler::me(const std::string &text) { std::string action = strprintf("*%s*", text.c_str()); - - talk(action); + talk(action, GENERAL_CHANNEL); } void ChatHandler::channelList() diff --git a/src/net/ea/chathandler.h b/src/net/ea/chathandler.h index ca753169f..301289084 100644 --- a/src/net/ea/chathandler.h +++ b/src/net/ea/chathandler.h @@ -40,7 +40,8 @@ class ChatHandler : public Net::ChatHandler A_DELETE_COPY(ChatHandler) - virtual void talk(const std::string &text) = 0; + virtual void talk(const std::string &text, + const std::string &channel) = 0; virtual void talkRaw(const std::string &text) = 0; |