private static $commands = array(
"PASS" => "PASS :%s",
"SERVER" => "SERVER %s 1 %s %s J10 %s]]] +s6 :%s",
- "ERROR" => "ERROR :%s"
+ "ERROR" => "ERROR :%s",
+ "Z" => "{num} Z %s",
+ null => null
);
public static function formatCMD($numeric, $command, $args) {
$this->recv_error($from, $arguments);
break;
//P10 Session
+ case "S":
+ $this->recv_server($from, $arguments);
+ break;
+ case "G":
+ $this->recv_ping($from, $arguments);
+ break;
+ //default
default:
//unknown cmd
break;
}
}
+ private function recv_ping($from, $args) {
+ $this->send("Z", $args[0]); //simply PONG
+ }
+
}
?>
\ No newline at end of file