modules/echo.php
changeset 40 1855846cbdab
parent 39 4027a5b47db5
child 41 1d854f22ac5a
--- a/modules/echo.php	Wed Dec 31 21:54:19 2008 -0500
+++ b/modules/echo.php	Thu Jan 01 00:18:34 2009 -0500
@@ -17,16 +17,16 @@
 {
   global $privileged_list;
   
-  if ( in_array($message['nick'], $privileged_list) && preg_match("/^\!echo-([^\007, \r\n\a\t]+) /", $message['message'], $match) )
+  if ( in_array($message['nick'], $privileged_list) && preg_match("/^(?:\!echo-|\/msg )([^\007, \r\n\a\t]+) /", $message['message'], $match) )
   {
     global $libirc_channels;
     $channel_name =& $match[1];
     if ( isset($libirc_channels[$channel_name]) && is_object($libirc_channels[$channel_name]) )
     {
-      $libirc_channels[$channel_name]->msg(eb_censor_words(preg_replace("/^\!echo-([^\007, \r\n\a\t]+) /", '', $message['message'])), true);
+      $libirc_channels[$channel_name]->msg(eb_censor_words(preg_replace("/^(?:\!echo-|\/msg )((?:#|&)[^\007, \r\n\a\t]+) /", '', $message['message'])), true);
     }
   }
-  else if ( in_array($message['nick'], $privileged_list) && preg_match("/^\!pm ([^\007, \r\n\a\t]+) (.+)/", $message['message'], $match) )
+  else if ( in_array($message['nick'], $privileged_list) && preg_match("/^(?:\!pm|\/msg) ([^\007, \r\n\a\t]+) (.+)/", $message['message'], $match) )
   {
     global $irc;
     $irc->privmsg($match[1], eb_censor_words($match[2]));