Well, it mostly works now.
Changes made were:
1. Error in Core/Roster.php, need more ()
--- 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.
--- 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)
--- 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
?>