Пример #1
0
 public function process(&$ircdata, $startup = false)
 {
     self::log_changes(&$ircdata, $startup);
     // log peoples hostnames, used for bans etc.
     if (self::max_users(&$ircdata)) {
         return true;
     }
     // check for max users.
     if (self::flood_check(&$ircdata)) {
         return true;
     }
     // this just does some checking, this is quite
     // important as it deals with the main anti-flood support
     ircd::ping(&$ircdata);
     // pingpong my name is tingtong
     if (commands::ctcp(&$ircdata)) {
         return true;
     }
     // ctcp stuff :D
     if (commands::motd(&$ircdata)) {
         return true;
     }
     // motd
     if (ircd::on_timeset(&$ircdata) && $ircdata[3] == 'FORCE') {
         self::$network_time = $ircdata[2];
     }
     // we're getting a new time, update it
     if ($ircdata[0] == 'ERROR') {
         self::alog('ERROR: ' . self::get_data_after($ircdata, 1), 'BASIC');
         self::save_logs();
         ircd::shutdown('ERROR', true);
     }
     // act upon ERROR messages.
     foreach (modules::$list as $module => $data) {
         if ($data['type'] == 'core') {
             modules::$list[$module]['class']->main(&$ircdata, $startup);
         }
     }
     // any core modules? humm
     foreach (self::$service_bots as $bot) {
         $this->{$bot}->main(&$ircdata, $startup);
     }
     // we hook to each of our bots
 }