protected function _connect() { try { if (!$this->socket->open()) { return false; } } catch (Exception $e) { Logger::warning($e->getMessage()); return false; } $this->_write('NICK', "{$this->_nick}"); $this->_write('USER', "{$this->_nick} {$this->_config['host']} IRC BOT"); return true; }