src/Plugin.php
public function handleNick(UserEvent $event, Queue $queue)
    {
        $connection = $event->getConnection();
        if (strcasecmp($event->getNick(), $connection->getNickname()) === 0) {
            $params = $event->getParams();
            $connection->setNickname($params['nickname']);
        }
    }
public function handleNick(UserEvent $event, Queue $queue)
    {
        $connection = $event->getConnection();
        if (strcasecmp($event->getNick(), $connection->getNickname()) === 0) {
            $params = $event->getParams();
            $connection->setNickname($params['nickname']);
        }
    }
public function handleNick ( UserEvent $ event , Queue $ queue ) { $ connection = $ event -> getConnection ( ) ; if ( strcasecmp ( $ event -> getNick ( ) , $ connection -> getNickname ( ) ) === 0 ) { $ params = $ event -> getParams ( ) ; $ connection -> setNickname ( $ params [ 'nickname' ] ) ; } }
Changes the nick associated with the bot in local memory when a change
to it is successfully registered with the server.

@param \Phergie\Irc\Event\UserEventInterface $event
@param \Phergie\Irc\Bot\React\EventQueueInterface $queue
Changes the nick associated with the bot in local memory when a change to it is successfully registered with the server .