--- a/enanobot.php Wed Dec 31 21:54:19 2008 -0500
+++ b/enanobot.php Thu Jan 01 00:18:34 2009 -0500
@@ -76,6 +76,8 @@
require('config.php');
require('database.php');
+$enanobot_version = '0.5-unstable';
+
@ini_set('display_errors', 'on');
error_reporting(E_ALL);
@@ -182,6 +184,20 @@
$irc->close($quitmessage, true);
return 'BREAK';
}
+ else if ( in_array($message['nick'], $privileged_list) && preg_match('/^re(?:hash|load)?(?:config)?(?: |$)/', $message['message']) )
+ {
+ require('config.php');
+ $GLOBALS['privileged_list'] = $privileged_list;
+ $GLOBALS['alert_list'] = $alert_list;
+ $irc->privmsg($message['nick'], "Reloaded privileged_list and alert_list. privileged = " . str_replace("\n", '', print_r($privileged_list, true)) . "; alert = " . str_replace("\n", '', print_r($alert_list, true)));
+ }
+ else if ( substr($message['message'], 0, 1) == "\x01" && substr($message['message'], -1) == "\x01" )
+ {
+ $msg = trim($message['message'], "\x01");
+ list($ctcp) = explode(' ', $msg);
+ $params = substr($msg, strlen($ctcp)+1);
+ eval(eb_fetch_hook('event_ctcp'));
+ }
else if ( $message['action'] == 'PRIVMSG' )
{
eval(eb_fetch_hook('event_privmsg'));