Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function join($chan){
- $this->send('JOIN',$chan);
- $this->channels[] = new channel($chan);
- $matches = array();
- $data = '';
- do {
- $data = trim(fgets($this->socket, 128));
- preg_match_all('/:([\S]+) (353) [\S]+ (?:=|@) #([\S]+) :(.+)/',$data,$matches);
- out($data);
- if(count($matches)>0){
- $t = explode(" ",$matches[4][0]);
- print_r($t);
- foreach($t as $u){
- out('Adding user: '.trim($u));
- $this->channels[count($this->channels)-1]->addUser(trim($t[$u]));
- }
- }
- } while(count($matches) < 1);
- print_r($this->channels);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement