Example #1
0
$config = new SimpleXMLElement($_config);
if ( !$config )
{
	echo "Error! Could not parse XML file.";
	die();
}


$module_config = array();
foreach ( $config->module as $mod )
{
	if ( file_exists("modules/".$mod['name']."/".$mod['name'].".php") )
	{
		include("modules/".$mod['name']."/".$mod['name'].".php");
		$module_config = array_merge(call_user_func($mod['name']."_config"), $module_config);
	}
}

include "parse.php";
include "modemgr.php";

include "irc.php";


$phpirc = new ircbot;

$phpirc->init($config, $module_config);
$phpirc->mainloop();

?>