diff -ru xqf-0.9.4.orig/src/game.c xqf-0.9.4/src/game.c --- xqf-0.9.4.orig/src/game.c Sun Feb 20 16:40:32 2000 +++ xqf-0.9.4/src/game.c Fri May 19 15:23:03 2000 @@ -71,6 +71,9 @@ static int q3_exec (const struct condef *con, int forkit); #endif static int q2_exec_generic (const struct condef *con, int forkit); +#ifdef QSTAT_HAS_UNREAL_SUPPORT +static int un_exec (const struct condef *con, int forkit); +#endif static GList *q1_custom_cfgs (char *dir, char *game); static GList *qw_custom_cfgs (char *dir, char *game); @@ -347,7 +350,7 @@ NULL, config_is_valid_generic, NULL, - q2_exec_generic, + un_exec, NULL, quake_save_info }, @@ -1471,6 +1474,34 @@ } +#ifdef QSTAT_HAS_UNREAL_SUPPORT +static int un_exec (const struct condef *con, int forkit) { + char *argv[32]; + int argi = 0; + char *cmd; + struct game *g = &games[con->s->type]; + int retval; + + cmd = strdup_strip (g->cmd); + + argv[argi++] = strtok (cmd, delim); + while ((argv[argi] = strtok (NULL, delim)) != NULL) + argi++; + + if (con->server) { + argv[argi++] = con->server; + } + + argv[argi] = NULL; + + retval = client_launch_exec (forkit, g->real_dir, argv, con->s); + + g_free (cmd); + return retval; +} +#endif + + static char *dir_custom_cfg_filter (const char *dir, const char *str) { static const char *cfgext[] = { ".cfg", ".scr", ".rc", NULL }; const char **ext; diff -ru xqf-0.9.4.orig/src/xqf.c xqf-0.9.4/src/xqf.c --- xqf-0.9.4.orig/src/xqf.c Tue Feb 22 17:40:17 2000 +++ xqf-0.9.4/src/xqf.c Thu May 18 20:16:32 2000 @@ -562,7 +562,7 @@ } } - con->server = g_strdup_printf ("%s:%5d", inet_ntoa (s->host->ip), s->port); + con->server = g_strdup_printf ("%s:%d", inet_ntoa (s->host->ip), s->port); con->gamedir = g_strdup (s->game); if (props && props->rcon_password)