[Squalk-cvs] ircbot ircbot.cfg,1.2,1.3 ircbot.php,1.3,1.4
Status: Inactive
Brought to you by:
mkavanagh
From: Matthew K. <mka...@us...> - 2004-05-01 14:07:00
|
Update of /cvsroot/squalk/ircbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14133 Modified Files: ircbot.cfg ircbot.php Log Message: functionality..of a sort ;) Index: ircbot.php =================================================================== RCS file: /cvsroot/squalk/ircbot/ircbot.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ircbot.php 15 Apr 2004 16:52:03 -0000 1.3 --- ircbot.php 1 May 2004 14:06:51 -0000 1.4 *************** *** 24,46 **** require_once(LIB_PATH . 'class_irc.php'); ! if(isset($_SERVER)) { panic('Will not run in web environment!'); } $config = get_config('ircbot.cfg'); - foreach($config as $setting => $value) { - $$setting = $value; - echo $setting.' = '.$value."\n"; - } $irc = new irc(); ! if($irc->connect($server, $port, $username, $realname)) { ! $irc->nick($nickname); ! foreach($modules as $module) { include_once($module); } ! foreach($channels as $channel) { $irc->join($channel); } --- 24,42 ---- require_once(LIB_PATH . 'class_irc.php'); ! if(isset($_SERVER['REMOTE_HOST'])) { panic('Will not run in web environment!'); } $config = get_config('ircbot.cfg'); $irc = new irc(); ! if($irc->connect($config['server'], $config['port'], $config['username'], $config['realname'])) { ! $irc->nick($config['nickname']); ! foreach($config['modules'] as $module) { include_once($module); } ! foreach($config['channels'] as $channel) { $irc->join($channel); } Index: ircbot.cfg =================================================================== RCS file: /cvsroot/squalk/ircbot/ircbot.cfg,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ircbot.cfg 9 Apr 2004 01:13:43 -0000 1.2 --- ircbot.cfg 1 May 2004 14:06:51 -0000 1.3 *************** *** 1,12 **** ;// $Id$ [user_section] ! username = "bot" ! realname = "bot" ! nickname = "bot" [server_section] ! server = "irc.example.net" port = 6667 [channel_section] ! channels = "|#example|" [module_section] ! modules = "|modules/log.php|" --- 1,14 ---- ;// $Id$ + ;change this for yourself..I can't be bothered to set sensible + ;defaults ;) [user_section] ! username = "ptibot" ! realname = "ptibot" ! nickname = "ptibot" [server_section] ! server = "irc.freenode.net" port = 6667 [channel_section] ! channels = "|#ptibot|#phpbbchat|" [module_section] ! modules = "|modules/log.php|modules/misc.php|modules/lesbian.php|modules/attack.php|" \ No newline at end of file |