Advertisement
Eeems

Untitled

May 15th, 2011
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.55 KB | None | 0 0
  1.     function join($chan){
  2.         $this->send('JOIN',$chan);
  3.         $this->channels[] =  new channel($chan);
  4.         $data = '';
  5.         $matches = array();
  6.         while(preg_match_all('/:([\S]+) (353) [\S]+ (?:=|@) #([\S]+) :(.+)/',$data,$matches) < 1){
  7.             $data = fgets($this->socket, 128);
  8.             out(trim($data));
  9.             if(count($matches)>0){
  10.                 print_r($matches,true);
  11.                 $t = explode($matches[4], " ");
  12.                 foreach($t as $u){
  13.                     out('Adding user: '.trim($u));
  14.                     $this->channels[count($this->channels)-1]->addUser(trim($t[$u]));
  15.                 }
  16.                 print_r($this->channels);
  17.             }
  18.         }
  19.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement