src/Plugin.php
protected function listCommands(CommandEvent $event, EventQueueInterface $queue)
    {
        $targets = $event->getTargets();
        $target = reset($targets);
        $nick = $event->getNick();

        if ($target === $event->getConnection()->getNickname()) {
            $target = $nick;
            $address = '';
        } else {
            $address = $nick . ': ';
        }

        $method = 'irc' . $event->getCommand();
        $message = $address . $this->listText . implode(' ', $this->commands);
        $queue->$method($target, $message);
    }
protected function listCommands(CommandEvent $event, EventQueueInterface $queue)
    {
        $targets = $event->getTargets();
        $target = reset($targets);
        $nick = $event->getNick();

        if ($target === $event->getConnection()->getNickname()) {
            $target = $nick;
            $address = '';
        } else {
            $address = $nick . ': ';
        }

        $method = 'irc' . $event->getCommand();
        $message = $address . $this->listText . implode(' ', $this->commands);
        $queue->$method($target, $message);
    }
protected function listCommands ( CommandEvent $ event , EventQueueInterface $ queue ) { $ targets = $ event -> getTargets ( ) ; $ target = reset ( $ targets ) ; $ nick = $ event -> getNick ( ) ; if ( $ target === $ event -> getConnection ( ) -> getNickname ( ) ) { $ target = $ nick ; $ address = '' ; } else { $ address = $ nick . ': ' ; } $ method = 'irc' . $ event -> getCommand ( ) ; $ message = $ address . $ this -> listText . implode ( ' ' , $ this -> commands ) ; $ queue -> $ method ( $ target , $ message ) ; }
Responds to a parameter-less help command with a list of available
commands.

@param \Phergie\Irc\Plugin\React\Command\CommandEvent $event
@param \Phergie\Irc\Bot\React\EventQueueInterface $queue
Responds to a parameter - less help command with a list of available commands .