fixed: Warcraft Instant Messenger is causing massive spam by sending bots WIM-specific commands such as handshakes which can not be processed by the bot.

This commit is contained in:
Ben Wagner
2024-07-13 00:24:04 +02:00
parent 2b62329b58
commit 06ca0e14e5

View File

@@ -352,10 +352,16 @@ void PlayerbotAI::UpdateAIInternal([[maybe_unused]] uint32 elapsed, bool minimal
Player* owner = holder.GetOwner(); Player* owner = holder.GetOwner();
if (!helper.ParseChatCommand(command, owner) && holder.GetType() == CHAT_MSG_WHISPER) if (!helper.ParseChatCommand(command, owner) && holder.GetType() == CHAT_MSG_WHISPER)
{ {
std::ostringstream out; // To prevent spam caused by WIM
out << "Unknown command " << command; if (!(command.rfind("WIM", 0) == 0) &&
TellMaster(out); !(command.rfind("QHpr", 0) == 0)
helper.ParseChatCommand("help"); )
{
std::ostringstream out;
out << "Unknown command " << command;
TellMaster(out);
helper.ParseChatCommand("help");
}
} }
chatCommands.pop(); chatCommands.pop();