"PASS :%s", "SERVER" => "SERVER %s 1 %s %s J10 %s]]] +s6 :%s", "ERROR" => "ERROR :%s", "Z" => "{num} Z %s", "N" => "{num} N %s 1 %s %s %s %s %s %s :%s", "EB" => "{num} EB", "EA" => "{num} EA", null => null ); public static function formatCMD($numeric, $command, $args) { if(array_key_exists($command, self::$commands)) { $command = self::$commands[$command]; $command = vsprintf($command, $args); } else { $command = vsprintf($command, $args); } return str_replace("{num}", $numeric, $command); } } ?>