Etienne Kneuss

home » repository » php » ircbot » modules » class.Module_Perform.php
Tree:
school
mp3
php
sample
publications
Math_Derivative
Math_Expression
ircbot
libraries
modules
class.Module_Invite.php
class.Module_Auth.php
class.Module_Control.php
class.Module_Protocol.php
class.Module.php
class.Module_Output.php
class.Module_Knowledge.php
class.Module_Perform.php
exceptions
bot.php
plopbot.sql
php.net
images
dump

Source code raw phps

    <?php require_once 'modules/class.Module.php'; class Module_Perform extends Module {     protected $_channels = array();     public function __construct()     {         foreach(func_get_args() as $arg) {             if (preg_match('/^#[a-z0-9._-]+$/', $arg)) {                 $this->_channels[] = $arg;             }         }     }     public function update(Observed $bot, $raw, $type) {                   if (($type & Bot::U_INPUT) != Bot::U_INPUT) {             return Bot::E_CONTINUE;         }                  $raw_pieces = explode(' ', $raw);                  if ($raw_pieces[1] == '376' && !empty($this->_channels)) { // end of motd                      $bot->send('JOIN '.implode(',',$this->_channels));         }         return Bot::E_CONTINUE;     } }

Comments

There is currently no comment here.

Add a comment

Username:

Spam Challenge: 13+20=?

Comment: