cvs: pearbot / PEARbot.php config.php

[email protected] ("James Cox") Sun, 02 Feb 2003 14:14:33 -0000
Newsgroups php.pear.bot
Message-ID <cvsimajes1044195273@cvsserver>
imajes		Sun Feb  2 09:14:33 2003 EDT

  Modified files:              
    /pearbot	PEARbot.php config.php 
  Log:
  some updates to the header, and beginning of abstraction of config opts.
  
  
Index: pearbot/PEARbot.php
diff -u pearbot/PEARbot.php:1.2 pearbot/PEARbot.php:1.3
--- pearbot/PEARbot.php:1.2	Sun Feb  2 08:48:15 2003
+++ pearbot/PEARbot.php	Sun Feb  2 09:14:33 2003
@@ -1,19 +1,16 @@
 #!/home/meebey/PEARbot/php
 <?php
 /**
- * $Id: PEARbot.php,v 1.2 2003/02/02 13:48:15 meebey Exp $
- * $Revision: 1.2 $
- * $Author: meebey $
- * $Date: 2003/02/02 13:48:15 $
+ * $Id: PEARbot.php,v 1.3 2003/02/02 14:14:33 imajes Exp $
  * 
  * PEARbot
- * this is the IRC service bot for #pear writtin in PHP
+ * this is an IRC service bot for #pear written in PHP
  * 
  * Copyright (C) 2003:
  * Mirco 'MEEBEY' Bauer <[email protected]>
  * James 'imajes' Cox <[email protected]>
  * 
- * Full GPL License: <http://www.meebey.net/gpl.txt>
+ * Full GPL License: < http://www.gnu.org/licenses/gpl.txt>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -137,8 +134,8 @@
 $irc->setUseSockets(true);
 $irc->registerActionhandler(SMARTIRC_TYPE_JOIN, '.*', $bot, 'onjoin');
 $irc->connect('efnet.skynet.be', 6668);
-$irc->login('PEARbot2', 'PEAR IRC service bot for #pear', 8, 'PEARbot');
+$irc->login($config['nick'], $config['real_name'], 8, $config['alt_nick']);
 $irc->join('#pear');
 $irc->listen();
 $irc->disconnect();
-?>
\ No newline at end of file
+?>
Index: pearbot/config.php
diff -u pearbot/config.php:1.1.1.1 pearbot/config.php:1.2
--- pearbot/config.php:1.1.1.1	Sun Feb  2 08:38:09 2003
+++ pearbot/config.php	Sun Feb  2 09:14:33 2003
@@ -1,6 +1,46 @@
 <?php
+/**
+ * $Id: config.php,v 1.2 2003/02/02 14:14:33 imajes Exp $
+ *
+ * PEARbot
+ * this is the IRC service bot for #pear writtin in PHP
+ *
+ * Copyright (C) 2003:
+ * Mirco 'MEEBEY' Bauer <[email protected]>
+ * James 'imajes' Cox <[email protected]>
+ *
+ * Full GPL License: < http://www.gnu.org/licenses/gpl.txt >
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+/* database settings */
+
 $mysql_server = '10.0.0.5';
 $mysql_username = 'pearbot';
 $mysql_password = 'x';
 $mysql_db = 'pearbot';
-?>
\ No newline at end of file
+
+/* general settings */
+
+$config = array();
+
+$config['real_name'] = 'PEAR IRC service bot for #pear <[email protected]>';
+$config['nick'] = 'PEARbot';
+$config['alt_nick'] = 'PEARbot2';
+
+/*XXX: change the nicks into an array of preferred nicks, and maybe a regex style match of alternative dynamic ones */
+?>