libirc.php
changeset 40 1855846cbdab
parent 38 e6a4b7f91e91
child 51 508400fc5282
--- a/libirc.php	Wed Dec 31 21:54:19 2008 -0500
+++ b/libirc.php	Thu Jan 01 00:18:34 2009 -0500
@@ -239,6 +239,23 @@
   }
   
   /**
+   * Sends a notice.
+   * @param string Nick or channel
+   * @param string Message
+   */
+  
+  public function notice($nick, $message)
+  {
+    $message = str_replace("\r\n", "\n", $message);
+    $message = explode("\n", $message);
+    foreach ( $message as $line )
+    {
+      $line = $this->filter_message($line);
+      $this->put("NOTICE $nick :$line\r\n");
+    }
+  }
+  
+  /**
    * Parse bold (<b>...</b>) tags and color tags in a text into IRC speak, and process /me commands. Colors are <cyan>...</cyan>, specify background with <fg:bg>...</fgcolor:bgcolor>. Valid colors are white, black, navy, green, red, maroon, purple, orange, yellow, lime, teal, aqua, cyan, blue, pink, grey, and silver
    * @param string Text to filter
    * @return string