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: Updated Quotes Module  (Read 13648 times)

0 Members and 1 Guest are viewing this topic.

Offline Glarawyn

  • BeBot Hero
  • ******
  • Posts: 521
  • Karma: +0/-0
Re: Updated Quotes Module
« Reply #15 on: February 27, 2007, 09:14:07 pm »
You might get that in php5 if you don't have any quotes in your db. If you don't, add one then try.

Looking at the code, the only way you could get this message is if you tried to delete a quote when you had no quotes in the database.

Possible Fix: Replace Lines 206-210 with the following code:
Code: [Select]
} else {
         $res = $this -> bot -> db -> select("SELECT id FROM quotes ORDER BY id DESC");
         if (empty($res))
         {
             $out = " No quotes exisit in the database.";
         }
         else
         {
             $out = " (Highest quote ID is " . $res[0][0] . ".)";
         }
         $reply = "Quote with id of " . $qnum . " not found. (Highest quote ID is " . $out . ".)";
      }

Offline Malosar

  • BeBot Expert
  • ****
  • Posts: 259
  • Karma: +0/-0
    • http://www.lowerdimension.com
Re: Updated Quotes Module
« Reply #16 on: February 27, 2007, 10:14:44 pm »
If he was using your original quotes module yes. But I assumed he was referring to JJ's updated version posted just before, which 210 refers to this section:

Code: [Select]
function send_quote($qnum)
{
$strquote = "";
if($qnum == -1)
{
$num = $this -> bot -> db -> select("SELECT id FROM quotes ORDER BY id DESC");
$result = $this -> bot -> db -> select("SELECT * FROM quotes");
           
if($num[0][0] > 0) <--- line 210
Eternalist
General of The Syndicate

Offline jjones666

  • Contributor
  • *******
  • Posts: 353
  • Karma: +0/-0
Re: Updated Quotes Module
« Reply #17 on: February 27, 2007, 10:37:15 pm »
Yah, i'd suspect its due to auto spam being turned on by default and no quotes in db with php5.

-jj-

Offline Ozball

  • BeBot Rookie
  • *
  • Posts: 15
  • Karma: +0/-0
Re: Updated Quotes Module
« Reply #18 on: February 28, 2007, 03:13:53 am »
I'll try it again but i thought I'd turned autospam off (it was the first thing i thought might be a problem).

and yes it was the updated one from JJ


EDIT: Ok tested it seems to be that it is the no quotes in the DB problem. But tried useing !settings quotes auto off (using the page from !settings quotes) to turn off the spam... and it continued to spam.
« Last Edit: February 28, 2007, 04:53:30 am by Ozball »
Slynthia - General and Botmaster of Terminal Velocity - RK1

Offline jjones666

  • Contributor
  • *******
  • Posts: 353
  • Karma: +0/-0
Re: Updated Quotes Module
« Reply #19 on: February 28, 2007, 08:05:04 am »
Try changing line 210 from:
if($num[0][0] > 0)
To:
if (!empty($num))

This SHOULD fix the string offset crash (PHP5 h8).

I tried the !settings and it works perfectly fine here - please make sure you are using the last Module Settings plugin (2.03) at the following link:

http://bebot.link/index.php/topic,607.0.html

Please let me know outcome and I'll update the plugin after work.  I'll also set it to default to spam off for new users.

Cheers,

-jj-

Offline Ozball

  • BeBot Rookie
  • *
  • Posts: 15
  • Karma: +0/-0
Re: Updated Quotes Module
« Reply #20 on: March 10, 2007, 09:07:25 pm »
Sorry for the late reply.

Also I'm using the lates Settings module. When I put the quotes module back in (took out the _) the spam is set to off(probably left over from last time it was in) and is still spamming..

With the changes to the php file you suggested... I get "[Terminal Velocity] Tvbot: No quotes exist. Add some!" in org chat for the spam. and !quotes works ok (in both tells and gc).

So looks like the only problem atm is the spamming when its set to not spam.
« Last Edit: March 10, 2007, 09:13:35 pm by Ozball »
Slynthia - General and Botmaster of Terminal Velocity - RK1

 

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