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);
- $data = '';
- $matches = array();
- while(preg_match_all(":([\\S]+) (353) [\\S]+ (?:=|@) #([\\S]+) :(.+)", $data, $matches) < 1){
- $data = fgets($this->socket, 128);
- if(count($matches){
- out(trim($data));
- $t = explode($t[4], " ");
- foreach($t as $u){
- out('Adding user: '.trim($u));
- $this->channels[count($this->channels)-1]->addUser(trim($t[$u]));
- }
- print_r($this->channels);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement