protected processInput ( array $message, Phergie\Irc\Client\React\WriteStream $write, Phergie\Irc\ConnectionInterface $connection ) | ||
$message | array | Parser output |
$write | Phergie\Irc\Client\React\WriteStream | Write stream corresponding to the read stream on which the event occurred |
$connection | Phergie\Irc\ConnectionInterface | Connection on which the event occurred |
protected function processInput(array $message, WriteStream $write, ConnectionInterface $connection)
{
switch ($message['command']) {
// Update connection's internal nickname when changed
case 'NICK':
if ($connection->getNickname() === $message['nick']) {
$connection->setNickname($message['params']['nickname']);
}
break;
// Play client-server ping-pong
// Play client-server ping-pong
case 'PING':
$write->ircPong($message['params']['server1']);
break;
}
}