Advertisement
Eeems

Untitled

May 15th, 2011
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.52 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.             if(count($matches){
  9.                 out(trim($data));
  10.                 $t = explode($t[4], " ");
  11.                 foreach($t as $u){
  12.                     out('Adding user: '.trim($u));
  13.                 $this->channels[count($this->channels)-1]->addUser(trim($t[$u]));
  14.                 }
  15.                 print_r($this->channels);
  16.             }
  17.         }
  18.     }
  19.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement