]> git.pld-linux.org Git - packages/eventum.git/blob - eventum-irc-config.patch
- add svn support to -scm package
[packages/eventum.git] / eventum-irc-config.patch
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
3 @@ -38,22 +39,19 @@
4  
5  ini_set("memory_limit", "256M");
6  
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;
11 +}
12 +
13  // the following is the list of IRC channels that the bot should connect to,
14  // and the associated project name
15 -$channels = array(
16 -    Project::getID('Default Project') => array(
17 -        '#issues',
18 -    )
19 -);
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
26 -$username = '';
27 -$password = '';
28 -
29 +$channels = array();
30 +foreach ($irc_channels as $proj => $chan) {
31 +    $proj_id = Project::getID($proj);
32 +    $channels[$proj_id] = is_array($chan) ? $chan : array($chan);
33 +}
34  
35  // ============================================
36  // ============================================
37 @@ -269,7 +267,7 @@
38      function _getChannels($prj_id)
39      {
40          global $channels;
41 -        return $channels[$prj_id];
42 +        return @$channels[$prj_id];
43      }
44      
45      
46 @@ -410,14 +408,16 @@
47  $irc->registerActionhandler(SMARTIRC_TYPE_QUERY, '^!?list-quarantined', $bot, 'listQuarantinedIssues');
48  
49  $irc->connect($irc_server_hostname, $irc_server_port);
50 -if (!empty($username)) {
51 -    $irc->login($nickname, $realname, 0, $username, $password);
52 -} else {
53 +if (empty($username)) {
54      $irc->login($nickname, $realname);
55 +} elseif (empty($password)) {
56 +    $irc->login($nickname, $realname, 0, $username);
57 +} else {
58 +    $irc->login($nickname, $realname, 0, $username, $password);
59  }
60  $irc->listen();
61  $irc->disconnect();
62  
63  // release the lock
64  Lock::release('irc_bot');
65 -?>
66 \ No newline at end of file
67 +?>
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
70 @@ -31,6 +31,7 @@
71  ini_set("memory_limit", "256M");
72  
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");
This page took 0.058496 seconds and 3 git commands to generate.