diff --git a/xqf/ChangeLog b/xqf/ChangeLog index 24f7742..57958f2 100644 --- a/xqf/ChangeLog +++ b/xqf/ChangeLog @@ -1,3 +1,7 @@ +Oct 10, 2004: Ludwig Nussel +- Show UT200[34] mutators as tree like dmflags +- Add gslist master for RTCW + Oct 09, 2004: Ludwig Nussel - Descent3: use Gamespy protocol instead of PXO protocol, remove no longer working masters, use custom launch function (uses --directip), fix saving of diff --git a/xqf/src/game.c b/xqf/src/game.c index 37ac999..8447882 100644 --- a/xqf/src/game.c +++ b/xqf/src/game.c @@ -631,6 +631,9 @@ static void un_analyze_serverinfo (struct server *s) { else if (strcmp (*info_ptr, "hostport") == 0) { hostport = atoi(info_ptr[1]); } + else if (strcmp (*info_ptr, "Mutator") == 0 && strstr(info_ptr[1], "AntiTCC")) { + s->flags |= SERVER_PUNKBUSTER; + } else if ((s->type == UT2004_SERVER || s->type == UT2_SERVER) && strcmp (*info_ptr, "ServerVersion") == 0 && strlen(info_ptr[1]) == 4) @@ -3263,6 +3266,7 @@ static void quake_save_info (FILE *f, struct server *s) { case UN_SERVER: case UT2_SERVER: + case UT2004_SERVER: case RUNE_SERVER: case POSTAL2_SERVER: case AAO_SERVER: diff --git a/xqf/src/server.c b/xqf/src/server.c index 021b320..b99b755 100644 --- a/xqf/src/server.c +++ b/xqf/src/server.c @@ -292,7 +292,7 @@ struct server* server_change_port (struct server* s, int newport) int node; if(!newport || !s) - return s; + return s; node = server_hash_func (s->host, s->port); servers.nodes[node] = g_slist_remove (servers.nodes[node], s); diff --git a/xqf/src/source.c b/xqf/src/source.c index b625c48..b1c7986 100644 --- a/xqf/src/source.c +++ b/xqf/src/source.c @@ -1157,6 +1157,7 @@ static char *builtin_gslist_masters_update_info[] = { "ADD QWS gslist://master.gamespy.com;gsmtype=quakeworld Gslist", "ADD Q2S gslist://master.gamespy.com;gsmtype=quake2 Gslist", "ADD Q3S gslist://master.gamespy.com;gsmtype=quake3 Gslist", + "ADD WOS gslist://master.gamespy.com;gsmtype=rtcw Gslist", "ADD DM3S gslist://master.gamespy.com;gsmtype=doom3 Gslist", "ADD RUNESRV gslist://master.gamespy.com;portadjust=-1;gsmtype=rune Gslist", "ADD UT2004S gslist://master.gamespy.com;portadjust=-10;gsmtype=ut2004 Gslist", diff --git a/xqf/src/srv-info.c b/xqf/src/srv-info.c index 4b217c8..1d1e1f7 100644 --- a/xqf/src/srv-info.c +++ b/xqf/src/srv-info.c @@ -486,6 +486,26 @@ static void show_extended_flags (const char *str, char *names[], int size, } } +static void show_split_value (const char *str, const char* separator, GtkCTreeNode *parent) +{ + char** values; + char* text[2]; + unsigned i; + + values = g_strsplit(str, separator, 0); + + for(i=0; values && values[i]; ++i) + { + text[0] = values[i]; + text[1] = NULL; + gtk_ctree_insert_node (srvinf_ctree, parent, NULL, text, 4, + NULL, NULL, + NULL, NULL, + TRUE, FALSE); + } + + g_strfreev(values); +} // TODO: get rid of switch, put game specific functions into game struct void srvinf_ctree_set_server (struct server *s) { @@ -628,6 +648,13 @@ void srvinf_ctree_set_server (struct server *s) { } break; + case UT2_SERVER: + case UT2004_SERVER: + if (info[0] && !g_strcasecmp (info[0], "mutator")) + { + show_split_value(info[1], "|", node); + } + break; default: break; diff --git a/xqf/src/stat.c b/xqf/src/stat.c index a9acb07..ccb4f26 100644 --- a/xqf/src/stat.c +++ b/xqf/src/stat.c @@ -704,9 +704,6 @@ static void parse_qstat_record_part2 (GSList *strings, struct server *s) { s->info = parse_serverinfo (token, n); - if (games[s->type].analyze_serverinfo) - (*games[s->type].analyze_serverinfo) (s); - strings = strings->next; if (strings && games[s->type].parse_player) { @@ -723,6 +720,9 @@ static void parse_qstat_record_part2 (GSList *strings, struct server *s) { s->players = g_slist_reverse (plist); } + if (games[s->type].analyze_serverinfo) + (*games[s->type].analyze_serverinfo) (s); + if(s->type == WO_SERVER || s->type == WOET_SERVER) { static char* teamnames[2] = { N_("Allies"), N_("Axis") };