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

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

Author Topic: Persistent Whois cache with out-of-bot upgrading  (Read 54107 times)

0 Members and 3 Guests are viewing this topic.

Offline Xenixa

  • Contributor
  • *******
  • Posts: 307
  • Karma: +0/-0
Re: Persistent Whois cache with out-of-bot upgrading
« Reply #45 on: May 27, 2006, 03:05:15 pm »
Speaking of a settings module. I was thinking along the same lines. I couldn't help but notice I kept having to make changes to different versions of bot.php in reguards to get and set settings. Started to work on a core/ module that would handle that stuff including the table name stuff for multi-bot databases.

Haven't had alot of time to work on it though as of late but it is something I'd like to see 'officialized' with the bot. Whois in the Bot.php makes sense to me also as thats the original place for it even though I'm using Already's stand alone version.

BTW, Core modules are treated as part of the Bot Class when they're loaded aren't they? Just have to add the new core class var to the Bot class when you drop one into the core/ folder.
<<< Hack's in Zend Studio

All my Custom Bebot files may be Found Here <-clicky

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: Persistent Whois cache with out-of-bot upgrading
« Reply #46 on: May 27, 2006, 04:26:44 pm »
BTW, Core modules are treated as part of the Bot Class when they're loaded aren't they? Just have to add the new core class var to the Bot class when you drop one into the core/ folder.
Yes and no.

Yes for all modules.

In core modules you have to be a bit more carefull. You should not call functions out of other core modules outside the class declaration (where all the create table calls are atm), nor in the constructor. As you cannot predict the orders the modules are loaded in you cannot guarantee that the functions are available at the needed places. After the contruction phase you don't have this problem anymore.

Offline Barvaz

  • BeBot Rookie
  • *
  • Posts: 12
  • Karma: +0/-0
Re: Persistent Whois cache with out-of-bot upgrading
« Reply #47 on: July 21, 2006, 01:01:55 pm »
great module :D

but from what i understand, it takes several number of ppl from FC db and put it in the whois table, right?

if so.. how does it know when someone that already in the whois table lvled up or rerolled?

oh, and why it takes 6 minutes+ to load the bot every time? :/

Edit:

now the bot not loading at all
giving me this errors

Code: [Select]
Warning: fopen(http://www.anarchy-online.com/character/bio/d/1/name/wergggg/bio.xml): failed to open stream: HTTP request failed! HTTP/1.0 503 Service Unavailable
 in C:\red\modules\whois-update.php on line 7

Warning: fgets(): supplied argument is not a valid stream resource in C:\red\modules\whois-update.php on line 10
« Last Edit: July 21, 2006, 01:51:33 pm by Barvaz »

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: Persistent Whois cache with out-of-bot upgrading
« Reply #48 on: July 21, 2006, 03:34:06 pm »
Guess you started the bot during FCs site update - it will time out then if it has to lookup the FC site.

Rerolls will be detected as soon as FC updates the entry, it will just be replaced then.

Offline jjones666

  • Contributor
  • *******
  • Posts: 353
  • Karma: +0/-0
Re: Persistent Whois cache with out-of-bot upgrading
« Reply #49 on: July 21, 2006, 03:49:59 pm »
Umm just a quick note - make sure the php-update file isn't in the bebot modules directory - it should not be loaded at bot startup but rather run manually every day or so.  This could explain why the bot takes so long to startup (I think my update script can take up to an hour to process fully).  I put my update script in the bebot root directory.

This module has been replaced by a built in who function in the new version of Bebot (unreleased) and I believe that automatically updates itself.

Cheers,

-jj-
« Last Edit: July 21, 2006, 03:53:11 pm by jjones666 »

Offline Barvaz

  • BeBot Rookie
  • *
  • Posts: 12
  • Karma: +0/-0
Re: Persistent Whois cache with out-of-bot upgrading
« Reply #50 on: July 21, 2006, 05:46:30 pm »
nah Already, it wasnt during fc db update

but what happended is what jj said :D

thanks =)

will move it from there :)

should i keep the whoiscache.php in module dir?

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: Persistent Whois cache with out-of-bot upgrading
« Reply #51 on: July 21, 2006, 06:51:41 pm »
This module has been replaced by a built in who function in the new version of Bebot (unreleased) and I believe that automatically updates itself.
Only partly true.

Both versions will try to update an entry after some time without update.

But only the script does mass updates, the other way only updates entries when they are queried.

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: Persistent Whois cache with out-of-bot upgrading
« Reply #52 on: July 21, 2006, 06:52:44 pm »
should i keep the whoiscache.php in module dir?
I've got mine in core/, but module/ should work too. It has to be in one of those two though.

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: Persistent Whois cache with out-of-bot upgrading
« Reply #53 on: July 21, 2006, 06:55:19 pm »
nah Already, it wasnt during fc db update

but what happended is what jj said :D
Added a note in my first post about this.

joey12344

  • Guest
Re: Persistent Whois cache with out-of-bot upgrading
« Reply #54 on: July 22, 2006, 01:06:07 pm »
Do you have to create tables in the database or does it do it automatically because mines asking for some tables  ???

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: Persistent Whois cache with out-of-bot upgrading
« Reply #55 on: July 22, 2006, 03:10:03 pm »
The module creates one table for the whois queries.

Offline Barvaz

  • BeBot Rookie
  • *
  • Posts: 12
  • Karma: +0/-0
Re: Persistent Whois cache with out-of-bot upgrading
« Reply #56 on: July 22, 2006, 06:17:46 pm »
The module creates one table for the whois queries.

it didnt create the whois table for me, had to create it manually..

when i ran the whois-update.php it said it cant find redbotdb.whois table

when i ran the whoiscache.php it said it cant connect or something..

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: Persistent Whois cache with out-of-bot upgrading
« Reply #57 on: July 22, 2006, 08:28:38 pm »
Strange.

The WhoisCache module contains a CREATE TABLE query, which should create the table.

And as the module is using the same functions all other bebot modules are using, it shouldn't create any errors.

Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Re: Persistent Whois cache with out-of-bot upgrading
« Reply #58 on: July 23, 2006, 07:54:24 pm »
0.3 svn has been updated to include Alreadythere's latest changes, and it has been moved into a core module.
The two versions are now almost fully interoperable, however some of the return values in the official version is different due to consistancy concerns.
BeBot Founder and Fixer Kingpin

Offline Jaqueme

  • BeBot Rookie
  • *
  • Posts: 14
  • Karma: +0/-0
Re: Persistent Whois cache with out-of-bot upgrading
« Reply #59 on: August 15, 2006, 02:12:44 am »
I'm trying to add this to my bot, but Ive encountered a problem.  I'm using Bebot_v0.2.6, and this is the first module I'm trying to add.  I'm getting this error after running start.bat:

Fatal error: Call to undefined method Bot::define_tablename() in C:\BeBot2\modul
es\WhoisCache.php on line 12


Any ideas what I did wrong?

On a possible related note, I found no instances of get_site() in any of the php files.  I'm using the "Find" command in notepad.  Is this an example of my being a stupid noob at this?  Or is it not unusual to not need to do any of those changes?

 

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


0.8.x updates for AoC by bitnykk
[January 30, 2024, 11:16:08 pm]


0.8.x updates for AO by bitnykk
[January 30, 2024, 11:15:37 pm]


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


Bebot and Rasberry by bitnykk
[November 29, 2023, 11:04:14 pm]

* Who's Online
  • Dot Guests: 535
  • 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