L* R*
HOME FORUM DOWNLOADS
Content
  Links
     Browse SVN
     SVN Commit log
     Documentation (Wiki)
  Developers
     Taskmanager
User
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 01, 2008, 01:11:29 PM

Login with username, password and session length
Search



Advanced search
Support GoPHP5.org
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Development > Coding and development discussion > Topic: Online db
Pages: [1]   Go Down
« previous next »
Print
Author Topic: Online db  (Read 339 times)
0 Members and 1 Guest are viewing this topic.
kuznechik
BeBot Contributor
Rookie
*******
Offline Offline

Gender: Male
Posts: 60



Online db
« on: April 05, 2007, 05:24:42 AM »

I'm trying to use onlinedb version of online, man, it's buggy Smiley
Hoping to nail some of it this week...
Usual online was working fine for me tho.
Logged

Kuznechik, proud bot admin of Disciples of Omni-Tek, Rimor.
kuznechik
BeBot Contributor
Rookie
*******
Offline Offline

Gender: Male
Posts: 60



Re: Online db
« Reply #1 on: April 09, 2007, 02:01:06 PM »

Well, it mostly works now.
Changes made were:

1. Error in Core/Roster.php, need more ()
Code:
--- Roster.php.orig     Wed Feb 21 21:36:18 2007
+++ Roster.php  Sun Apr  8 13:13:54 2007
@@ -211,7 +211,7 @@
                                        $this -> add ("Roster-XML", $member["id"], $member["nickname"], "from XML");
                                }

-                               else if ($db_member[0][2] == 1 || ($db_member[0][2] == 0 && (($db_member[0][3] + 172800) <= time())))
+                               else if ($db_member[0][2] == 1 || (($db_member[0][2] == 0) && (($db_member[0][3] + 172800) <= time())))
                                {
                                        $this -> add ("Roster-XML", $member["id"], $member["nickname"], "from XML");
                                }


2. /Modules/Is.php, need to remove buddy if he was in org and recently left.
Code:
--- Is.php.orig Wed Feb 21 21:46:27 2007
+++ Is.php      Sun Apr  8 14:10:10 2007
@@ -158,6 +158,8 @@

                                unset($this -> query[$name]);
                        }
+                        $this -> bot -> aoc -> buddy_remove($name);
                }
        }
 }

3. Fix in Core/OnlineDB.php to add online handler and fix default mysql state for online status for newly joined ppl (added a lot of ghosts otherwise)
Code:
--- OnlineDB.php.orig   Mon Apr  2 16:17:54 2007
+++ OnlineDB.php        Sun Apr  8 15:40:33 2007
@@ -19,13 +19,13 @@
              profession VARCHAR(25) NOT NULL DEFAULT '?',
              level INT NOT NULL DEFAULT 0,
              ailevel INT NOT NULL DEFAULT 0,
-             status_gc INT(1) DEFAULT '1',
+             status_gc INT(1) DEFAULT '0',
              org_rank VARCHAR(25) NOT NULL DEFAULT '?',
              org_name VARCHAR(25) NOT NULL DEFAULT '?',
              status_gc_changetime INT(11) DEFAULT '0',
-             status_pg INT(1) DEFAULT '1',
+             status_pg INT(1) DEFAULT '0',
              status_pg_changetime INT(11) DEFAULT '0',
-             status_irc INT(1) DEFAULT '1',
+             status_irc INT(1) DEFAULT '0',
              status_irc_changetime INT(11) DEFAULT '0',
              PRIMARY KEY (nickname, botname))");

@@ -37,6 +37,7 @@
 $commands["disconnect"][] = &$OnlineDB;

 $cron["24hour"][] = &$OnlineDB;
+/* uncomment if you wanna use it as online module, disable Online.php then
+$bot -> online = &$OnlineDB;
+*/
 /*
 The Class itself...
@@ -198,5 +199,10 @@
                }
        } // End function cleanup_table()

+       function logoff($name)
+       {
+       $this -> status_change($name, "gc", 0);
+       }
+
 } // End of Class
 ?>
Logged

Kuznechik, proud bot admin of Disciples of Omni-Tek, Rimor.
Pages: [1]   Go Up
Print
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Development > Coding and development discussion > Topic: Online db
« previous next »
 
Jump to:  

Recent
[request] Raid timers
by Alreadythere
[Today at 11:42:32 AM]

Shared DB online list
by Temar
[Today at 01:55:47 AM]

relay colors
by Temar
[Today at 01:54:56 AM]

BeBot v0.6.0 released
by Alreadythere
[November 30, 2008, 05:32:00 PM]

Change to Bid.php
by Temar
[November 30, 2008, 11:41:44 AM]

OnlineOrg
by Jiheld
[November 29, 2008, 12:44:27 PM]

Silly Newbie Question.
by Temar
[November 29, 2008, 12:00:02 PM]

massive_pvp_time_table 1
by gerborg
[November 29, 2008, 06:55:35 AM]

Bot not see Guild Chat
by Delvar
[November 28, 2008, 08:30:34 AM]

Starting Bot
by Allisande
[November 28, 2008, 07:08:21 AM]
Stats
Members
Total Members: 1243
Latest: Whackoeng
Stats
Total Posts: 11143
Total Topics: 1505
Online Today: 21
Online Ever: 168
(July 01, 2007, 09:30:02 PM)
Users Online
Users: 2
Guests: 9
Total: 11
egrath
Temar

Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC
TinyPortal v0.9.8 © Bloc | NewDef design by Bloc
Page created in 0.632 seconds with 28 queries. (Pretty URLs adds 0.027s, 4q)
Loading...