@@ 381-387 (lines=7) @@ | ||
378 | } |
|
379 | } elseif ($cmd === 'PING') { |
|
380 | $this->writeln(isset($args[0]) ? 'PONG :' . $args[0] : 'PONG'); |
|
381 | } elseif ($cmd === 'PONG') { |
|
382 | if ($this->lastPingTS) { |
|
383 | $this->latency = microtime(true) - $this->lastPingTS; |
|
384 | $this->lastPingTS = null; |
|
385 | } |
|
386 | return; |
|
387 | } |
|
388 | if ($this->pool->protologging) { |
|
389 | Daemon::$process->log('<-<-<-< ' . $cmd . ': ' . json_encode($args) . ' (' . json_encode($from['orig']) . ') (' . json_encode($this->lastLine) . ')'); |
|
390 | } |
@@ 213-220 (lines=8) @@ | ||
210 | } elseif ($cmd === 'PING') { |
|
211 | $this->writeln(isset($args[0]) ? 'PONG :' . $args[0] : 'PONG'); |
|
212 | return; |
|
213 | } elseif ($cmd === 'PONG') { |
|
214 | if ($this->lastPingTS) { |
|
215 | $this->latency = microtime(true) - $this->lastPingTS; |
|
216 | $this->lastPingTS = null; |
|
217 | $this->event('lantency'); |
|
218 | } |
|
219 | return; |
|
220 | } elseif ($cmd === 'NICK') { |
|
221 | return; |
|
222 | } elseif ($cmd === 'PRIVMSG') { |
|
223 | list($target, $msg) = $args; |