MantisBT - Zandronum
View Issue Details
0003894Zandronum[All Projects] Suggestionpublic2021-08-05 15:082021-12-12 23:05
DrinkyBird 
DrinkyBird 
normalminorN/A
resolvedfixed 
3.1-beta 
3.13.1 
0003894: Allow servers to present their country to launchers
Many launchers display a country flag next to servers in their server list. Currently, they use IP geolocation to determine which country the server in - but this method is often inaccurate: for example, some geolocation services detect Blue Firestick's current host as being in France, despite being in the UK. Indeed, our previous host used to be detected by Doom Explorer as being in the US - an entire ocean's distance!

I propose that Zandronum allow server hosts to set their server's country themselves, so that hosts can ensure their servers appear as in the correct location.

This would involve adding a new sv_country server CVAR. I suggest this CVAR accept ISO 3166-1 alpha-3 country codes - as Doomseeker and doomlist.net already use this format for their flags. In addition, the CVAR could accept two special values, "unknown", which tells the launcher to display a generic unknown flag, and "automatic", to tell the launcher it should attempt IP geolocation. "automatic" should be the default value for this CVAR.

This would also require the addition of a new field to the launcher protocol, which can simply contain three characters:
 * If the value of sv_country is three characters long, send the uppercase value of the CVAR. If the value is not a valid country code, or the launcher is missing the flag for that given country, it should display the unknown flag (as a result Zandronum won't need to verify that the value of sv_country is a valid country code)
 * If the value of sv_country is "automatic" (case insensitive) then this field's value should be XIP, and the launcher should attempt geolocation. If geolocation is unimplementated, disabled, or fails, it shoud display the unknown flag
 * Otherwise, send XUN, and display the unknown flag
The ISO 3166-1 alpha-3 reserves any country codes within the range XAA-XZZ so we can safely use these for special values.
GoldSrc and Source engine games have been doing something similar forever, with Garry's Mod doing exactly as I propose here.

I can't see this causing issues for players, even if a host lied about their server's location, the latency when in-game might reveal that. Launchers could possibly offer the option to always use geolocation if a player distrust hosts enough.
No tags attached.
related to 0003939closed Zalewa Doomseeker Add support for Zandronum's SQF2_COUNTRY 
Issue History
2021-08-05 15:08DrinkyBirdNew Issue
2021-08-08 20:03Torr SamahoNote Added: 0021701
2021-09-08 02:22KaminskyNote Added: 0021755
2021-09-08 02:22KaminskyStatusnew => needs testing
2021-09-08 02:23KaminskyProduct Version => 3.1
2021-09-08 02:23KaminskyTarget Version => 3.1
2021-09-08 02:24KaminskyProduct Version3.1 => 3.1-beta
2021-11-17 08:08DrinkyBirdNote Added: 0021835
2021-11-17 08:08DrinkyBirdStatusneeds testing => resolved
2021-11-17 08:08DrinkyBirdFixed in Version => 3.1
2021-11-17 08:08DrinkyBirdResolutionopen => fixed
2021-11-17 08:08DrinkyBirdAssigned To => DrinkyBird
2021-12-12 23:05WaTaKiDRelationship addedrelated to 0003939

Notes
(0021701)
Torr Samaho   
2021-08-08 20:03   
Sounds reasonable to me.
(0021755)
Kaminsky   
2021-09-08 02:22   
3.1 now allows the server to choose their country with the new CVar "sv_country". It's also available in the latest unofficial 3.1 beta build: 200702-2143.
(0021835)
DrinkyBird   
2021-11-17 08:08   
Marking this as resolved as everything's done and working on Zandronum's end - now all we need is for server browsers to implement this feature...