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: Persistent Whois cache with out-of-bot upgrading  (Read 85101 times)

0 Members and 4 Guests are viewing this topic.

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: Persistent Whois cache with out-of-bot upgrading
« Reply #90 on: October 03, 2006, 07:27:12 pm »
Just stumbled over an old error report with a similar problem:
It seems some mysql setups are more strict concerning field types, so '' won't be accepted as a number.

Both .phps files updated with a simple check - if the id is empty it gets set to 0. This is done for org_id, rank_id and at number to be save.

Just redownload the .phps files, should solve your problem.

Offline Dabaron

  • BeBot Apprentice
  • ***
  • Posts: 163
  • Karma: +0/-0
Re: Persistent Whois cache with out-of-bot upgrading
« Reply #91 on: October 04, 2006, 04:15:07 am »
So anyone have a clue as to what I'm doing wrong with trying to get them all in one database?  I still can't figure out why its just appending the database I put for the file onto my bots main database (instead of aoglobal.whois its trying to use bebot.aoglobal.whois).

Offline jjones666

  • Contributor
  • *******
  • Posts: 353
  • Karma: +0/-0
Re: Persistent Whois cache with out-of-bot upgrading
« Reply #92 on: October 04, 2006, 08:51:32 am »
conf file:
$tablename = "cache.whois";   // name of the whois table

php file:
$lookup = $this -> bot -> db -> select("SELECT * FROM cache.whois WHERE nickname = '" . $name . "'");
etc etc (just took out manually the table lookup stuff as I'm running slightly older bebot)

that's how mine is setup and works fine for 3 bots.

-jj-

Offline neongen

  • BeBot User
  • **
  • Posts: 64
  • Karma: +0/-0
Re: Persistent Whois cache with out-of-bot upgrading
« Reply #93 on: October 04, 2006, 08:02:56 pm »
i tryed to download the updated files but i get to many error and problems with it so for now i'll just stay with the old one, till i can find out of installing mysql better (or there come a idiot proof install guide)  ;D

Offline Dabaron

  • BeBot Apprentice
  • ***
  • Posts: 163
  • Karma: +0/-0
Re: Persistent Whois cache with out-of-bot upgrading
« Reply #94 on: October 05, 2006, 04:10:57 am »
in my whois-update.conf file I have:

$dbname = "aoglobal";
$tablename = "whois";

In theWhoisCache.php I have this:

$lookup = $this -> bot -> db -> select("SELECT * FROM " . aoglobal.whois . " WHERE name = '" . $name . "'");

Slightly different than yours in the php file.  I'll try making the small change to what you have and see if it makes a difference (looking at it it should be the exact same thing but I guess the bot might be interpreting it differently for some reason).

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: Persistent Whois cache with out-of-bot upgrading
« Reply #95 on: October 05, 2006, 01:30:07 pm »
In theWhoisCache.php I have this:

$lookup = $this -> bot -> db -> select("SELECT * FROM " . aoglobal.whois . " WHERE name = '" . $name . "'");
I believe the aoglobal.whois has to be inside the "" too.

Offline neongen

  • BeBot User
  • **
  • Posts: 64
  • Karma: +0/-0
Re: Persistent Whois cache with out-of-bot upgrading
« Reply #96 on: October 05, 2006, 03:24:48 pm »
Dabaron you have to put it in this way

Quote
$lookup = $this -> bot -> db -> select("SELECT * FROM aoglobal.whois WHERE name = '" . $name . "'");

 for it to work

Offline jjones666

  • Contributor
  • *******
  • Posts: 353
  • Karma: +0/-0
Re: Persistent Whois cache with out-of-bot upgrading
« Reply #97 on: October 05, 2006, 09:09:26 pm »
New version seems to be crashing if it doesn't find someone in database.  Cannot use string as an offset, bot dies...

got round it by only doing the $whoold if something is found in lookup but this kinda defeats the new code...

if (!empty($lookup))
{
$this -> bot -> log("WHOIS", "STATUS", "entry found in lookup database");
$whoold["nick"] = $lookup[0][1];

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: Persistent Whois cache with out-of-bot upgrading
« Reply #98 on: October 05, 2006, 10:49:01 pm »
Updated my version, same link in first post.

Basically I'm doing the same as you, I've pulled the (!empty($lookup)) out of the stale test to the front. If it's not in the table yet it doesn't need to be checked for outdated info anyways.

Offline jjones666

  • Contributor
  • *******
  • Posts: 353
  • Karma: +0/-0
Re: Persistent Whois cache with out-of-bot upgrading
« Reply #99 on: October 05, 2006, 10:59:06 pm »
Thanks for quick help :-)

-jj-

Offline neongen

  • BeBot User
  • **
  • Posts: 64
  • Karma: +0/-0
Re: Persistent Whois cache with out-of-bot upgrading
« Reply #100 on: October 07, 2006, 02:41:18 am »
oki gone over to the updated version now but when i do a update i get

Quote
PHP Warning: include<whois-update.addons>: failed to open stream: No such file or directory in c:\php\w_update.php on line 197
PHP Warning: include<>: Failed opening 'whois-update.addons' for inclusion <include_path='.;c:\php5\pear'> in c:\php\w_update.php on line 197

did i do something rong with the musql and|or php again ???

Offline Dabaron

  • BeBot Apprentice
  • ***
  • Posts: 163
  • Karma: +0/-0
Re: Persistent Whois cache with out-of-bot upgrading
« Reply #101 on: October 07, 2006, 10:01:12 am »
That worked.  Thanks guys, you ROCK

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: Persistent Whois cache with out-of-bot upgrading
« Reply #102 on: October 07, 2006, 12:12:46 pm »
oki gone over to the updated version now but when i do a update i get

Quote
PHP Warning: include<whois-update.addons>: failed to open stream: No such file or directory in c:\php\w_update.php on line 197
PHP Warning: include<>: Failed opening 'whois-update.addons' for inclusion <include_path='.;c:\php5\pear'> in c:\php\w_update.php on line 197

did i do something rong with the musql and|or php again ???
No, not at all.

I just added an include "whois-update.addons" at the end of file for possible further processing (which I'm doing).
The warning just tells you that the file doesn't exist (which is no problem at all). If you want to get rid of it either remove the include line or create an empty whois-update.addons file. I'll try to get around and add an exist-check for the file before the include in the next version.

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: Persistent Whois cache with out-of-bot upgrading
« Reply #103 on: October 07, 2006, 05:08:05 pm »
whois-update.php updated with an exist/readable check on the addons file.

Should remove the warnings even without the file.

Offline neongen

  • BeBot User
  • **
  • Posts: 64
  • Karma: +0/-0
Re: Persistent Whois cache with out-of-bot upgrading
« Reply #104 on: October 10, 2006, 11:58:11 pm »
oki thx

 

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