"PASS :%s", "SERVER" => "SERVER %s 1 %s %s J10 %s]]] +s6 :%s", "ERROR" => "ERROR :%s" ); 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); } } ?>