SOURCES: eventum-irc-config.patch - fix irc config reading

glen glen at pld-linux.org
Sat Sep 17 16:32:22 CEST 2005


Author: glen                         Date: Sat Sep 17 14:32:22 2005 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- fix irc config reading

---- Files affected:
SOURCES:
   eventum-irc-config.patch (1.6 -> 1.7) 

---- Diffs:

================================================================
Index: SOURCES/eventum-irc-config.patch
diff -u SOURCES/eventum-irc-config.patch:1.6 SOURCES/eventum-irc-config.patch:1.7
--- SOURCES/eventum-irc-config.patch:1.6	Sat Aug 20 13:34:46 2005
+++ SOURCES/eventum-irc-config.patch	Sat Sep 17 16:32:17 2005
@@ -1,30 +1,56 @@
---- ./misc/irc/bot.php.bak	2005-08-20 05:28:05.000000000 +0300
-+++ ./misc/irc/bot.php	2005-08-20 05:33:35.000000000 +0300
-@@ -28,7 +28,6 @@
+--- 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:28:53.000000000 +0300
+@@ -27,8 +27,9 @@
+ //
  // @(#) $Id$
  //
++require_once('/etc/eventum/core.php');
++include_once('/etc/eventum/irc.php');
  
 -include_once("../../config.inc.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");
-@@ -41,8 +40,8 @@
+@@ -38,22 +39,19 @@
+ 
+ ini_set("memory_limit", "256M");
+ 
++// 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;
++}
++
  // the following is the list of IRC channels that the bot should connect to,
  // and the associated project name
- $channels = array(
+-$channels = array(
 -    Project::getID('Default Project') => array(
 -        '#issues',
-+    Project::getID($irc_default_project) => array(
-+        $irc_default_channel,
-     )
- );
- $irc_server_hostname = 'localhost';
-@@ -54,6 +53,8 @@
- $username = '';
- $password = '';
- 
-+include_once('/etc/eventum/irc.php');
-+
+-    )
+-);
+-$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] = $chan;
++}
  
  // ============================================
  // ============================================
+@@ -269,7 +267,7 @@
+     function _getChannels($prj_id)
+     {
+         global $channels;
+-        return $channels[$prj_id];
++        return @$channels[$prj_id];
+     }
+     
+     
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/eventum-irc-config.patch?r1=1.6&r2=1.7&f=u




More information about the pld-cvs-commit mailing list