Bot makes spam war with /afk users on non-English AoC servers
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
BeBot |
Confirmed
|
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/
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!
Changed in bebot: | |
importance: | Undecided → High |
status: | New → Confirmed |