1 --- eventum-1.6.1/misc/irc/bot.php.orig 2005-09-17 17:28:04.000000000 +0300
2 +++ eventum-1.6.1/misc/irc/bot.php 2005-09-17 17:49:09.000000000 +0300
5 ini_set("memory_limit", "256M");
7 +// compat with earlier releases where didn't have array -glen
8 +if (empty($irc_channels)) {
9 + $irc_channels = array();
10 + $irc_channels[$irc_default_project] = $irc_default_channel;
13 // the following is the list of IRC channels that the bot should connect to,
14 // and the associated project name
16 - Project::getID('Default Project') => array(
20 -$irc_server_hostname = 'localhost';
21 -$irc_server_port = 6667;
22 -$nickname = 'EventumBOT';
23 -$realname = 'Eventum Issue Tracking System';
24 -// do you need a username/password to connect to this server? if
25 -// so, fill in the next two variables
30 +foreach ($irc_channels as $proj => $chan) {
31 + $proj_id = Project::getID($proj);
32 + $channels[$proj_id] = is_array($chan) ? $chan : array($chan);
35 // ============================================
36 // ============================================
38 function _getChannels($prj_id)
41 - return $channels[$prj_id];
42 + return @$channels[$prj_id];
47 $irc->registerActionhandler(SMARTIRC_TYPE_QUERY, '^!?list-quarantined', $bot, 'listQuarantinedIssues');
49 $irc->connect($irc_server_hostname, $irc_server_port);
50 -if (!empty($username)) {
51 - $irc->login($nickname, $realname, 0, $username, $password);
53 +if (empty($username)) {
54 $irc->login($nickname, $realname);
55 +} elseif (empty($password)) {
56 + $irc->login($nickname, $realname, 0, $username);
58 + $irc->login($nickname, $realname, 0, $username, $password);
64 Lock::release('irc_bot');
66 \ No newline at end of file
68 --- eventum-1.7.0/misc/irc/bot.php~ 2005-12-30 00:22:37.000000000 +0200
69 +++ eventum-1.7.0/misc/irc/bot.php 2005-12-30 00:23:17.000000000 +0200
71 ini_set("memory_limit", "256M");
73 include_once("../../config.inc.php");
74 +include_once('/etc/eventum/irc.php');
75 include_once(APP_INC_PATH . "db_access.php");
76 include_once(APP_INC_PATH . "class.auth.php");
77 include_once(APP_INC_PATH . "class.lock.php");