Ejemplo n.º 1
0
 public static function log_changes(&$ircdata, $startup = false)
 {
     if (ircd::on_server(&$ircdata)) {
         ircd::handle_on_server(&$ircdata);
     }
     // let's us keep track of the linked servers
     if (ircd::on_squit(&$ircdata)) {
         ircd::handle_on_squit(&$ircdata);
     }
     // let's us keep track of the linked servers
     if (ircd::on_connect(&$ircdata)) {
         ircd::handle_on_connect(&$ircdata, $startup);
     }
     // log shit on connect, basically the users host etc.
     if (ircd::on_nick_change(&$ircdata)) {
         ircd::handle_nick_change(&$ircdata, $startup);
     }
     // on nick change, make sure the variable changes too.
     if (ircd::on_quit(&$ircdata)) {
         ircd::handle_quit(&$ircdata, $startup);
     }
     // on quit.
     if (ircd::on_fhost(&$ircdata)) {
         ircd::handle_host_change(&$ircdata);
     }
     // on hostname change.
     if (ircd::on_ident_change(&$ircdata)) {
         ircd::handle_ident_change(&$ircdata);
     }
     // on ident change
     if (ircd::on_gecos_change(&$ircdata)) {
         ircd::handle_gecos_change(&$ircdata);
     }
     // on realname (gecos) change
     if (ircd::on_mode(&$ircdata)) {
         ircd::handle_mode(&$ircdata);
     }
     // on mode
     if (ircd::on_ftopic(&$ircdata)) {
         ircd::handle_ftopic(&$ircdata);
     }
     // on ftopic
     if (ircd::on_topic(&$ircdata)) {
         ircd::handle_topic(&$ircdata);
     }
     // on topic
     if (ircd::on_chan_create(&$ircdata)) {
         ircd::handle_channel_create(&$ircdata);
     }
     // on channel create
     if (ircd::on_join(&$ircdata)) {
         ircd::handle_join(&$ircdata);
     }
     // on join
     if (ircd::on_part(&$ircdata)) {
         ircd::handle_part(&$ircdata);
     }
     // and on part.
     if (ircd::on_kick(&$ircdata)) {
         ircd::handle_kick(&$ircdata);
     }
     // and on kick.
     if (ircd::on_oper_up(&$ircdata)) {
         ircd::handle_oper_up(&$ircdata);
     }
     // on oper ups
 }
Ejemplo n.º 2
0
 public function main(&$ircdata, $startup = false)
 {
     if (ircd::on_topic(&$ircdata) || ircd::on_ftopic(&$ircdata)) {
         $chan = core::get_chan(&$ircdata, 2);
         $topic = core::$chans[$chan]['topic'];
         $setter = core::$chans[$chan]['topic_setter'];
         // i forgot this was done by the protocol modules
         if ($channel = services::chan_exists($chan, array('channel', 'topic'))) {
             if (chanserv::check_flags($chan, array('T')) && chanserv::check_flags($chan, array('K')) && $channel->topic != $topic) {
                 ircd::topic(core::$config->chanserv->nick, $channel->channel, $channel->topic);
                 database::update('chans', array('topic_setter' => core::$config->chanserv->nick), array('channel', '=', $chan));
                 return false;
                 // reset it i reckon.
             } elseif ($channel->topiclock == 0) {
                 database::update('chans', array('topic' => $topic, 'topic_setter' => $setter), array('channel', '=', $chan));
                 // OTHERWISE, update it.
             }
             // some housekeepin.
         }
         // make sure the channel exists.
     }
     // now we check for topiclocking
     // moved this from cs_set to here
     // there was 2 versions O.o
 }