Bot makes spam war with /afk users on non-English AoC servers

Bug #397085 reported by DJKRose on 2009-07-08
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
BeBot
High
Unassigned

Bug Description

If a user is /afk and tells something to the bot, this would normally lead to a spam war between the user and the bot. The user is automatically replying that he is AFK, the bot is replying that he couldn't understand the command, and so on...

To prevent this, Bot.php, line 860 contains a little filter:

if (!preg_match("/is AFK .Away from keyboard./i", $args[1]) && !preg_match("/.tell (.+)help/i",$args[1]) && !preg_match("/I only listen to members of this bot/i",$args[1] ) && !preg_match("/I am away from my keyboard right now,(.+)your message has been logged./i",$args[1]) && !preg_match("/Away From Keyboard/i", $args[1]))

However this works only in AO and on English AoC servers, because on other servers the afk message is different, like in the German servers: "Superman ist AFK." - which doesn't match any pattern. In Spanish, French, etc. this would be even "more different".

Therefore the different afk messages from all server languages should be collected and filtered in BeBot. I think this shouldn't go into one huge if-statement, but be defined in an array, or constant, or somewhere externally, so that it can be easily changed.

Lets collect the different afk messages here!

DJKRose (dj-krose) on 2009-07-12
Changed in bebot:
importance: Undecided → High
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers