modules/autoop.php
author Dan
Sat, 11 Oct 2008 23:09:13 +0000
changeset 14 506a7e0fb106
parent 8 0acb8d9a3194
child 51 508400fc5282
permissions -rw-r--r--
Disabled "snippet not found" message, for now
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
8
0acb8d9a3194 Welcome, modularization and stats.
Dan
parents:
diff changeset
     1
<?php
0acb8d9a3194 Welcome, modularization and stats.
Dan
parents:
diff changeset
     2
0acb8d9a3194 Welcome, modularization and stats.
Dan
parents:
diff changeset
     3
eb_hook('event_join', 'autoop_event($chan, $message);');
0acb8d9a3194 Welcome, modularization and stats.
Dan
parents:
diff changeset
     4
0acb8d9a3194 Welcome, modularization and stats.
Dan
parents:
diff changeset
     5
function autoop_event(&$chan, &$message)
0acb8d9a3194 Welcome, modularization and stats.
Dan
parents:
diff changeset
     6
{
0acb8d9a3194 Welcome, modularization and stats.
Dan
parents:
diff changeset
     7
  global $privileged_list;
0acb8d9a3194 Welcome, modularization and stats.
Dan
parents:
diff changeset
     8
  
0acb8d9a3194 Welcome, modularization and stats.
Dan
parents:
diff changeset
     9
  $channelname = $chan->get_channel_name();
0acb8d9a3194 Welcome, modularization and stats.
Dan
parents:
diff changeset
    10
  
0acb8d9a3194 Welcome, modularization and stats.
Dan
parents:
diff changeset
    11
  // if a known op joins the channel, send mode +o
0acb8d9a3194 Welcome, modularization and stats.
Dan
parents:
diff changeset
    12
  if ( in_array($message['nick'], $privileged_list) )
0acb8d9a3194 Welcome, modularization and stats.
Dan
parents:
diff changeset
    13
  {
0acb8d9a3194 Welcome, modularization and stats.
Dan
parents:
diff changeset
    14
    $chan->parent->put("MODE $channelname +o {$message['nick']}\r\n");
0acb8d9a3194 Welcome, modularization and stats.
Dan
parents:
diff changeset
    15
  }
0acb8d9a3194 Welcome, modularization and stats.
Dan
parents:
diff changeset
    16
}