modules/autoop.php
changeset 8 0acb8d9a3194
child 51 508400fc5282
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/autoop.php	Mon Aug 25 12:34:26 2008 -0400
@@ -0,0 +1,16 @@
+<?php
+
+eb_hook('event_join', 'autoop_event($chan, $message);');
+
+function autoop_event(&$chan, &$message)
+{
+  global $privileged_list;
+  
+  $channelname = $chan->get_channel_name();
+  
+  // if a known op joins the channel, send mode +o
+  if ( in_array($message['nick'], $privileged_list) )
+  {
+    $chan->parent->put("MODE $channelname +o {$message['nick']}\r\n");
+  }
+}