public function handleNick(
        \Erebot\Interfaces\EventHandler $handler,
        \Erebot\Interfaces\Event\Nick   $event
    ) {
        $oldNick    = (string) $event->getSource();
        $newNick    = (string) $event->getTarget();

        $collator       = $this->connection->getCollator();
        $normOldNick    = $collator->normalizeNick($oldNick);
        $normNewNick    = $collator->normalizeNick($newNick);
        $key = array_search($normOldNick, $this->nicks);
        if ($key === false) {
            return;
        }

        $this->realRemoveUser($normNewNick);
        $this->nicks[$key]         = $normNewNick;
        $this->ial[$key]['nick']   = $newNick;
    }
public function handleNick(
        \Erebot\Interfaces\EventHandler $handler,
        \Erebot\Interfaces\Event\Nick   $event
    ) {
        $oldNick    = (string) $event->getSource();
        $newNick    = (string) $event->getTarget();

        $collator       = $this->connection->getCollator();
        $normOldNick    = $collator->normalizeNick($oldNick);
        $normNewNick    = $collator->normalizeNick($newNick);
        $key = array_search($normOldNick, $this->nicks);
        if ($key === false) {
            return;
        }

        $this->realRemoveUser($normNewNick);
        $this->nicks[$key]         = $normNewNick;
        $this->ial[$key]['nick']   = $newNick;
    }
public function handleNick ( \ Erebot \ Interfaces \ EventHandler $ handler , \ Erebot \ Interfaces \ Event \ Nick $ event ) { $ oldNick = ( string ) $ event -> getSource ( ) ; $ newNick = ( string ) $ event -> getTarget ( ) ; $ collator = $ this -> connection -> getCollator ( ) ; $ normOldNick = $ collator -> normalizeNick ( $ oldNick ) ; $ normNewNick = $ collator -> normalizeNick ( $ newNick ) ; $ key = array_search ( $ normOldNick , $ this -> nicks ) ; if ( $ key === false ) { return ; } $ this -> realRemoveUser ( $ normNewNick ) ; $ this -> nicks [ $ key ] = $ normNewNick ; $ this -> ial [ $ key ] [ 'nick' ] = $ newNick ; }
Handles a nick change.

\param Erebot::Interfaces::EventHandler $handler
Handler that triggered this event.

\param Erebot::Interfaces::Event::Nick $event
Nick change event.

@SuppressWarnings(PHPMD.UnusedFormalParameter)
Handles a nick change .