BeBot - An Anarchy Online and Age Of Conan chat automaton
Development => Coding and development discussion => Topic started by: Alreadythere on December 03, 2005, 11:25:18 pm
-
When the blobsize gets too large on sending something, bebot produces infinite loops for me - till the bot crashs.
Looks like this then:
(http://img525.imageshack.us/img525/5294/glitch6cr.jpg) (http://imageshack.us)
Always happens when bebot thinks it needs at least 3 pages.
I think the error is in the cut_size() function in Bot.php - but haven't gotten around to check more exactly yet.
-
You're probably using <br> in the blob. You need to modify the cut_size function in bot.php
function cut_size($msg, $type, $to="", $pri=0)
{
preg_match("/^(.*)<a href=\"(.+)\">(.*)$/isU", $msg, $info);
$info[2] = str_replace("<br>","\n",$info[2]);
$content = explode("\n", $info[2]);
.... (original code past this point)
-
Thanks, worked like a charm.
-
Comitted to SVN. Thanx.
-
Im having trouble seeing where to put this fix, i see the "cut_size" text in the bot.php but im not sure where i put this fix,
"{
$this -> cut_size($msg, "tell", $to, $low);
$send = false;
}"
thats whats in there at the moment, do i replace it with the new coding or what?
Also how do i get it to work on Guildbot?
-
This fix has been in the bot for almost a year soon, so unless you are running a really really really old version of the bot, it's already in there.
An additional bug in Bot Help was fixed fairly recently.
Regardless, the function cut_size is still in Bot.php, you are just looking at one location where the function is called, not the actual function.
-
how come !memberlist doesnt work?
-
Memberlist is not a part of the core bot, so i can't say.
JJ just pointed out that the fix has somehow managed to be omitted from the 0.2 branch. My apologies for the major oversight.