/** * Identifies the user to a server. * * @param \Phergie\Irc\ConnectionInterface $connection Connection on which * to identify the user * @param \Phergie\Irc\Client\React\WriteStream $writeStream Stream to * receive commands identifying the user */ protected function identifyUser(ConnectionInterface $connection, WriteStream $writeStream) { $password = $connection->getPassword(); if ($password) { $writeStream->ircPass($password); } $writeStream->ircUser($connection->getUsername(), $connection->getHostname(), $connection->getServername(), $connection->getRealname()); $writeStream->ircNick($connection->getNickname()); }