rendered paste body private function trigger()
{
$this->raw_parts = explode(' ', rtrim($this->line));
if($this->raw_parts[0] == 'PING')
{
$this->send('PONG '.$this->raw_parts[1]);
return true;
}
ereg("([[:print:]]+)!([[:print:]]+)@([[:print:]]+)$", $this->raw_parts[0], $this->parsed[u_info]);
$this->parsed[nick] = str_replace(':', '', $this->parsed[u_info][1]);
$this->parsed[user] = $this->parsed[u_info][2];
$this->parsed[host] = $this->parsed[u_info][3];
$this->parsed[cmd] = $this->raw_parts[1];
if($this->parsed[cmd] == 'PRIVMSG' || $this->parsed[cmd] == 'NOTICE'){
$this->parsed[msg] = str_replace($this->raw_parts[0].' '.$this->raw_parts[1].' '.$this->raw_parts[2].' :', '',$this->line);
if(substr($this->raw_parts[2], 0,1) == '#'){ $this->parsed[chan] = true; }else{ $this->parsed[chan] = false; }
$this->trig_privmsg();
}
if(is_numeric($this->parsed[cmd]))
{
$this->trig_serv_msg();
}
if($this->parsed[cmd] == 'KICK')
{
$this->trig_kick();
}
}