collapse collapse
* User Info
 
 
Welcome, Guest. Please login or register.
* Search

* Board Stats
  • stats Total Members: 989
  • stats Total Posts: 18366
  • stats Total Topics: 2501
  • stats Total Categories: 7
  • stats Total Boards: 35
  • stats Most Online: 1144

Author Topic: send_* runs into infinite loop on too large blobs  (Read 9838 times)

0 Members and 1 Guest are viewing this topic.

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
send_* runs into infinite loop on too large blobs
« 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:


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.

Offline Wolfbiter

  • Contributor
  • *******
  • Posts: 149
  • Karma: +0/-0
    • KAZE
send_* runs into infinite loop on too large blobs
« Reply #1 on: December 04, 2005, 06:32:01 am »
You're probably using <br> in the blob. You need to modify the cut_size function in bot.php

Code: [Select]
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)
Too many toons.

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
send_* runs into infinite loop on too large blobs
« Reply #2 on: December 04, 2005, 01:51:40 pm »
Thanks, worked like a charm.

Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
send_* runs into infinite loop on too large blobs
« Reply #3 on: December 04, 2005, 06:14:54 pm »
Comitted to SVN. Thanx.
BeBot Founder and Fixer Kingpin

Offline Hotshot

  • BeBot User
  • **
  • Posts: 21
  • Karma: +0/-0
Re: send_* runs into infinite loop on too large blobs
« Reply #4 on: September 09, 2006, 02:15:30 pm »
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?
« Last Edit: September 09, 2006, 02:28:39 pm by Hotshot »

Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Re: send_* runs into infinite loop on too large blobs
« Reply #5 on: September 09, 2006, 08:11:51 pm »
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.
BeBot Founder and Fixer Kingpin

Offline Hotshot

  • BeBot User
  • **
  • Posts: 21
  • Karma: +0/-0
Re: send_* runs into infinite loop on too large blobs
« Reply #6 on: September 10, 2006, 03:30:59 pm »
how come !memberlist doesnt work?

Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Re: send_* runs into infinite loop on too large blobs
« Reply #7 on: September 21, 2006, 04:59:52 pm »
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.
BeBot Founder and Fixer Kingpin

 

* Recent Posts
Com bot module by bitnykk
[November 25, 2024, 05:36:11 pm ]


0.8.x updates for AO by bitnykk
[June 23, 2024, 03:19:47 pm ]


0.8.x updates for AoC by bitnykk
[June 23, 2024, 03:19:44 pm ]


[AoC] special char for items module by bitnykk
[February 09, 2024, 09:41:18 pm ]


BeBot still alive & kicking ! by bitnykk
[December 17, 2023, 12:58:44 am ]

* Who's Online
  • Dot Guests: 150
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.
* Forum Staff
bitnykk admin bitnykk
Administrator
Khalem admin Khalem
Administrator
WeZoN gmod WeZoN
Global Moderator
SimplePortal 2.3.7 © 2008-2024, SimplePortal