private function join()
    {
        if (!is_array($this->config['channels'])) {
            $this->config['channels'] = array($this->config['channels']);
        }

        $channels = array();
        $passwords = array();
        $without_passwords = array();

        // Separate them into groups to make it easier to deal with
        foreach ($this->config['channels'] as $channel) {
            if (is_array($channel)) {
                foreach($channel as $chan => $pass) {
                    $channels[] = $chan;
                    $passwords[] = $pass;
                }
            } else {
                $without_passwords[] = $channel;
            }
        }
        $join = sprintf('%s %s',
            implode(',', array_merge($channels, $without_passwords)),
            implode(',', $passwords)
        );

        $this->send(Response::join($join));
    }
private function join()
    {
        if (!is_array($this->config['channels'])) {
            $this->config['channels'] = array($this->config['channels']);
        }

        $channels = array();
        $passwords = array();
        $without_passwords = array();

        // Separate them into groups to make it easier to deal with
        foreach ($this->config['channels'] as $channel) {
            if (is_array($channel)) {
                foreach($channel as $chan => $pass) {
                    $channels[] = $chan;
                    $passwords[] = $pass;
                }
            } else {
                $without_passwords[] = $channel;
            }
        }
        $join = sprintf('%s %s',
            implode(',', array_merge($channels, $without_passwords)),
            implode(',', $passwords)
        );

        $this->send(Response::join($join));
    }
private function join ( ) { if ( ! is_array ( $ this -> config [ 'channels' ] ) ) { $ this -> config [ 'channels' ] = array ( $ this -> config [ 'channels' ] ) ; } $ channels = array ( ) ; $ passwords = array ( ) ; $ without_passwords = array ( ) ; // Separate them into groups to make it easier to deal with foreach ( $ this -> config [ 'channels' ] as $ channel ) { if ( is_array ( $ channel ) ) { foreach ( $ channel as $ chan => $ pass ) { $ channels [ ] = $ chan ; $ passwords [ ] = $ pass ; } } else { $ without_passwords [ ] = $ channel ; } } $ join = sprintf ( '%s %s' , implode ( ',' , array_merge ( $ channels , $ without_passwords ) ) , implode ( ',' , $ passwords ) ) ; $ this -> send ( Response :: join ( $ join ) ) ; }
Joins the channels specified in the config.
Joins the channels specified in the config .