modules/autoop.php
author Dan
Tue, 20 Jan 2009 22:08:07 -0500
changeset 51 508400fc5282
parent 8 0acb8d9a3194
permissions -rw-r--r--
Major change to permissions backend - performs whois check (only supported blitzed and freenode right now) and advanced permissions supported.

<?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 ( check_permissions($message['nick'], array('context' => 'channel', 'channel' => $channelname)))
  {
    $chan->parent->put("MODE $channelname +o {$message['nick']}\r\n");
  }
}