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: Blob code isn't working  (Read 2477 times)

0 Members and 1 Guest are viewing this topic.

Offline GBH

  • BeBot Hero
  • ******
  • Posts: 69
  • Karma: +0/-0
Blob code isn't working
« on: November 12, 2010, 01:37:13 pm »
Hi,

Second one for today.

Normally, I set up a blob, feed the lines in and it all works fine. I have this bit of code which used to work ok which for some reason isn't working any more

This code is part of a much larger module which keeps a track of raiders in pugs allocating them to the shitlist or to the good list. This function is to just dump a list of the shit raiders into a blob.

Code: (php) [Select]

function shitlist_list($name)
{
$getmembers=($this -> bot -> db -> select("SELECT * FROM #___raider_tracker WHERE raider_goodshit='Shit' ORDER BY raider_name"));
$blob = "<font color='SILVER' face='hyborianlarge'>:: Shitlist Members (Online) ::</font><br />";
$blob .= "<br />";
if (!empty($getmembers))
{
foreach ($getmembers as $ml)
{
$blob .= "<font color='PURPLE'>$ml[1]</font> : <font color='YELLOW'>$ml[2]</font> : $ml[8]<br />" ;
}
return $this -> bot -> core("tools") -> make_blob("Shitlist", $blob);
}
else
{
return "I'm sorry there are no shitlisted people";
}
}

The issue is that the blob that gets returned is corrupted.

The list is long enough to warrant 2 blob links but the tells I'm sent give

Bot [TELL]  [OUT]   -> GBH: <a href="">Shitlist[/link] (page 1 of 2)
Bot [TELL]  [OUT]   -> GBH: [link]Shitlist[/link] (page 2 of 2)

As you can see the first link has a rogue "a href" in it that not only fails to work but actually disconnects me from the chat server. I usually don't get the second tell at all but on the one occasion I did get it, I received the full list exactly how I would expect it.

If I strip out all the formatting so I get a raw list of names, it works fine and creates the blob without problems. It is something specific about creating a multi page blob with formatting. however other modules which have multi page lists (like the guild members list) seem to work fine.

Anyone have any ideas why the blobbing just doesn't work any more in this function?

G

Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Re: Blob code isn't working
« Reply #1 on: November 12, 2010, 08:56:29 pm »
Never played with blobs in AoC, but something you could try is using the ##color## tags instead of your <font> tags and see if that makes any difference.

Offhand I cannot spot any reason for this to break though.
BeBot Founder and Fixer Kingpin

Offline GBH

  • BeBot Hero
  • ******
  • Posts: 69
  • Karma: +0/-0
Re: Blob code isn't working
« Reply #2 on: November 13, 2010, 10:03:40 pm »
Tried it no different

Removed all the formatting except for the page heading and it's fine/ If I do any sort of formatting in the page itself the response errors.

Very very strange :/

G

Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Re: Blob code isn't working
« Reply #3 on: November 15, 2010, 04:50:59 pm »
Could you provide me with the entire module along with a database dump of the table relating to the module with enough entries to trigger the behaviour?
BeBot Founder and Fixer Kingpin

Offline GBH

  • BeBot Hero
  • ******
  • Posts: 69
  • Karma: +0/-0
Re: Blob code isn't working
« Reply #4 on: November 15, 2010, 05:05:53 pm »
Will do, I'll sent it in a PM

G

Offline GBH

  • BeBot Hero
  • ******
  • Posts: 69
  • Karma: +0/-0
Re: Blob code isn't working
« Reply #5 on: November 22, 2010, 11:21:34 am »
Sent the files did you need anything else or get any joy with figuring out the problems?

G

Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Re: Blob code isn't working
« Reply #6 on: November 27, 2010, 10:56:15 pm »
tbh I have not yet had a chance to look into this.

Midterms are closing in quickly and it has left me with precious little time to spend on the computer.

I will try to see if I can sneak in some time to look into this tomorrow, else I cannot guarantee anything until after the 7th of December when my Math midterms are over.
BeBot Founder and Fixer Kingpin

Offline GBH

  • BeBot Hero
  • ******
  • Posts: 69
  • Karma: +0/-0
Re: Blob code isn't working
« Reply #7 on: December 04, 2010, 01:19:46 pm »
Midterms are closing in quickly and it has left me with precious little time to spend on the computer.

I will try to see if I can sneak in some time to look into this tomorrow, else I cannot guarantee anything until after the 7th of December when my Math midterms are over.

RL absolutely takes priority. Can wait until whenever :)

G

Offline GBH

  • BeBot Hero
  • ******
  • Posts: 69
  • Karma: +0/-0
Re: Blob code isn't working
« Reply #8 on: January 10, 2011, 02:08:22 pm »
Hiya Khalem. No hassle just bringing this to the top of the pile.

Any movement with this?

Cheers

GBH

 

* 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: 219
  • 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