BeBot - An Anarchy Online and Age Of Conan chat automaton
Development => Coding and development discussion => Topic started by: MajorOutage on March 29, 2007, 11:12:22 am
-
Whenever you add a member or guest without using the 'add' command, you get both a success msg and an error msg. Also, if you put a command but not a name, you get 2 error messages.
This is caused by lines 102-105 (for member) and 151-154 (for guest) in Modules/Roster.php
if (empty($vars[2]))
{
$this -> bot -> send_output($source, "You have to provide a character name", $type);
}
This is redundant code, as there are already error handlers in place for each command, and should be removed.
-
Not sure if it's redundant or a true bug.
That part of the code is supposed to handle !guest|member [add] name commands, which means the username could be in vars[1] or vars[2].
-
This is a bug.
Upon the first error you should bail.