Advertisement
Eeems

Untitled

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