Esempio n. 1
0
 public function CommandIrcco($player, $args)
 {
     LeelaBotIrc::send('NAMES ' . $this->config['MainChannel']);
     $continue = TRUE;
     while ($continue) {
         $ret = rtrim(LeelaBotIrc::get());
         if ($ret) {
             $data = explode(':', $ret);
             $cmd = explode(' ', $data[1]);
             if ($cmd[1] == '353') {
                 $nicks .= ' ' . $data[2];
             } elseif ($cmd[1] == '366') {
                 $continue = FALSE;
             }
         }
     }
     $nicks = str_replace(array('@', '+', '~'), array('', '', ''), $nicks);
     Rcon::tell($player, 'People connected to IRC : $nicks', array('nicks' => $nicks));
 }