diff options
Diffstat (limited to 'src/net/tmwa/chatrecv.cpp')
-rw-r--r-- | src/net/tmwa/chatrecv.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/net/tmwa/chatrecv.cpp b/src/net/tmwa/chatrecv.cpp index e044d5877..b9dd73af5 100644 --- a/src/net/tmwa/chatrecv.cpp +++ b/src/net/tmwa/chatrecv.cpp @@ -44,11 +44,18 @@ #include "net/tmwa/guildmanager.h" +#include "utils/gettext.h" + #include "debug.h" namespace TmwAthena { +namespace ChatRecv +{ + std::string mShopRequestName; +} // namespace ChatRecv + void ChatRecv::processChat(Net::MessageIn &msg) { BLOCK_START("ChatRecv::processChat") @@ -248,6 +255,16 @@ void ChatRecv::processWhisperContinue(const std::string &nick, && chatMsg.find("\302\202") == 0) { chatMsg = chatMsg.erase(0, 2); + if (mShopRequestName != nick) + { + debugMsg(strprintf( + // TRANSLATORS: message about spam player + _("Detected spam from: %s"), + nick.c_str())); + BLOCK_END("ChatRecv::processWhisper") + return; + } + mShopRequestName.clear(); if (showMsg && chatWindow != nullptr) { chatWindow->addWhisper(nick, |