enanobot.php
changeset 41 1d854f22ac5a
parent 40 1855846cbdab
child 49 4c4d69b2cd4d
equal deleted inserted replaced
40:1855846cbdab 41:1d854f22ac5a
   178     $part_cache = array();
   178     $part_cache = array();
   179   }
   179   }
   180   else if ( in_array($message['nick'], $privileged_list) && preg_match('/^Shutdown(?: (.+))?$/i', $message['message'], $match) && $message['action'] == 'PRIVMSG' )
   180   else if ( in_array($message['nick'], $privileged_list) && preg_match('/^Shutdown(?: (.+))?$/i', $message['message'], $match) && $message['action'] == 'PRIVMSG' )
   181   {
   181   {
   182     $GLOBALS['_shutdown'] = true;
   182     $GLOBALS['_shutdown'] = true;
   183     $quitmessage = empty($match[1]) ? "Remote bot shutdown ordered by {$message['nick']}" : $match[1];
   183     $quitmessage = empty($match[1]) ? "Remote bot shutdown requested by {$message['nick']}" : $match[1];
   184     $irc->close($quitmessage, true);
   184     $irc->close($quitmessage, true);
   185     return 'BREAK';
   185     return 'BREAK';
   186   }
   186   }
   187   else if ( in_array($message['nick'], $privileged_list) && preg_match('/^re(?:hash|load)?(?:config)?(?: |$)/', $message['message']) )
   187   else if ( in_array($message['nick'], $privileged_list) && preg_match('/^re(?:hash|load)?(?:config)?(?: |$)/', $message['message']) )
   188   {
   188   {