modules/echo.php
changeset 41 1d854f22ac5a
parent 40 1855846cbdab
child 42 c24a2311f232
equal deleted inserted replaced
40:1855846cbdab 41:1d854f22ac5a
    15 
    15 
    16 function echo_event_privmsg($message)
    16 function echo_event_privmsg($message)
    17 {
    17 {
    18   global $privileged_list;
    18   global $privileged_list;
    19   
    19   
    20   if ( in_array($message['nick'], $privileged_list) && preg_match("/^(?:\!echo-|\/msg )([^\007, \r\n\a\t]+) /", $message['message'], $match) )
    20   if ( in_array($message['nick'], $privileged_list) && preg_match("/^(?:\!echo-|\/msg )([^\007, \r\n\a\t]+) (.+)/", $message['message'], $match) )
    21   {
    21   {
    22     global $libirc_channels;
    22     global $libirc_channels;
    23     $channel_name =& $match[1];
    23     $channel_name =& $match[1];
    24     if ( isset($libirc_channels[$channel_name]) && is_object($libirc_channels[$channel_name]) )
    24     if ( isset($libirc_channels[$channel_name]) && is_object($libirc_channels[$channel_name]) )
    25     {
    25     {
    26       $libirc_channels[$channel_name]->msg(eb_censor_words(preg_replace("/^(?:\!echo-|\/msg )((?:#|&)[^\007, \r\n\a\t]+) /", '', $message['message'])), true);
    26       echo "!!! {$match[2]}\n";
       
    27       $libirc_channels[$channel_name]->msg(eb_censor_words($match[2]), true);
    27     }
    28     }
    28   }
    29   }
    29   else if ( in_array($message['nick'], $privileged_list) && preg_match("/^(?:\!pm|\/msg) ([^\007, \r\n\a\t]+) (.+)/", $message['message'], $match) )
    30   else if ( in_array($message['nick'], $privileged_list) && preg_match("/^(?:\!pm|\/msg) ([^\007, \r\n\a\t]+) (.+)/", $message['message'], $match) )
    30   {
    31   {
    31     global $irc;
    32     global $irc;