public function addChannels($channels)
    {
        foreach ($channels as $k => $v) {
            if (preg_match('/^[0-9]+$/', $k)) {
                $this->addChannel($v);
            } else {
                $this->addChannel($k, $v);
            }
        }
        return $this;
    }
public function addChannels($channels)
    {
        foreach ($channels as $k => $v) {
            if (preg_match('/^[0-9]+$/', $k)) {
                $this->addChannel($v);
            } else {
                $this->addChannel($k, $v);
            }
        }
        return $this;
    }
public function addChannels ( $ channels ) { foreach ( $ channels as $ k => $ v ) { if ( preg_match ( '/^[0-9]+$/' , $ k ) ) { $ this -> addChannel ( $ v ) ; } else { $ this -> addChannel ( $ k , $ v ) ; } } return $ this ; }
Add channels to auto join
@param array $channels Array of channels to join. Available formats:
array('#channel1', '#channel2') or
array('#channel1', '#channel2' => 'password') or
array('#channel1' => null, '#channel2' => 'password')
@return $this
Add channels to auto join