]> git.pld-linux.org Git - packages/eventum.git/blobdiff - eventum-irc-config.patch
- bugfixes
[packages/eventum.git] / eventum-irc-config.patch
index a36e3a72806d589c7382f96223646ef3a636c976..d314dc8b0448b98801d09c42c28978dbf81fe67b 100644 (file)
@@ -1,35 +1,77 @@
---- ../BUILD/eventum-1.4/misc/irc/bot.php      2005-01-05 01:06:16.000000000 +0200
-+++ a/misc/irc/bot.php 2005-01-18 16:09:13.000000000 +0200
-@@ -52,10 +52,12 @@
-     exit;
- }
+--- eventum-1.6.1/misc/irc/bot.php.orig        2005-09-17 17:28:04.000000000 +0300
++++ eventum-1.6.1/misc/irc/bot.php     2005-09-17 17:49:09.000000000 +0300
+@@ -38,22 +39,19 @@
+ ini_set("memory_limit", "256M");
  
-+include '/etc/eventum/irc.php';
++// compat with earlier releases where didn't have array -glen
++if (empty($irc_channels)) {
++    $irc_channels = array();
++    $irc_channels[$irc_default_project] = $irc_default_channel;
++}
 +
- // SETUP: need to change the project name in here
- $channels = array(
-     Project::getID('Default Project') => array(
+ // the following is the list of IRC channels that the bot should connect to,
+ // and the associated project name
+-$channels = array(
+-    Project::getID('Default Project') => array(
 -        '#issues',
-+        $irc_default_channel,
-     )
- );
+-    )
+-);
+-$irc_server_hostname = 'localhost';
+-$irc_server_port = 6667;
+-$nickname = 'EventumBOT';
+-$realname = 'Eventum Issue Tracking System';
+-// do you need a username/password to connect to this server? if 
+-// so, fill in the next two variables
+-$username = '';
+-$password = '';
+-
++$channels = array();
++foreach ($irc_channels as $proj => $chan) {
++    $proj_id = Project::getID($proj);
++    $channels[$proj_id] = is_array($chan) ? $chan : array($chan);
++}
  
-@@ -355,9 +357,8 @@
- $irc->registerActionhandler(SMARTIRC_TYPE_QUERY, '^!?list-clocked-in', $bot, 'listClockedInUsers');
+ // ============================================
+ // ============================================
+@@ -269,7 +267,7 @@
+     function _getChannels($prj_id)
+     {
+         global $channels;
+-        return $channels[$prj_id];
++        return @$channels[$prj_id];
+     }
+     
+     
+@@ -410,14 +408,16 @@
  $irc->registerActionhandler(SMARTIRC_TYPE_QUERY, '^!?list-quarantined', $bot, 'listQuarantinedIssues');
  
--
--$irc->connect('localhost', 6667);
--$irc->login('EventumBOT', 'EventumBOT', 0, 'EventumBOT');
-+$irc->connect($irc_host, $irc_port);
-+$irc->login($irc_nick, $irc_realname, 0, $irc_username);
- foreach ($channels as $prj_id => $channel_list) {
-     $irc->join($channel_list);
+ $irc->connect($irc_server_hostname, $irc_server_port);
+-if (!empty($username)) {
+-    $irc->login($nickname, $realname, 0, $username, $password);
+-} else {
++if (empty($username)) {
+     $irc->login($nickname, $realname);
++} elseif (empty($password)) {
++    $irc->login($nickname, $realname, 0, $username);
++} else {
++    $irc->login($nickname, $realname, 0, $username, $password);
  }
-@@ -366,4 +367,4 @@
+ $irc->listen();
+ $irc->disconnect();
  
  // release the lock
  Lock::release('irc_bot');
 -?>
 \ No newline at end of file
 +?>
+--- eventum-1.7.0/misc/irc/bot.php~    2005-12-30 00:22:37.000000000 +0200
++++ eventum-1.7.0/misc/irc/bot.php     2005-12-30 00:23:17.000000000 +0200
+@@ -31,6 +31,7 @@
+ ini_set("memory_limit", "256M");
+ include_once("../../config.inc.php");
++include_once('/etc/eventum/irc.php');
+ include_once(APP_INC_PATH . "db_access.php");
+ include_once(APP_INC_PATH . "class.auth.php");
+ include_once(APP_INC_PATH . "class.lock.php");
This page took 0.041845 seconds and 4 git commands to generate.