MantisBT - Zandronum
View Issue Details
0001230Zandronum[All Projects] Suggestionpublic2012-12-28 21:382018-09-30 20:21
Qent 
Torr Samaho 
normalfeatureN/A
closedfixed 
MicrosoftWindowsXP/Vista/7
1.1-beta 
1.11.1 
0001230: Allow players to opt out of releasing their country codes
'https://bitbucket.org/Torr_Samaho/zandronum/commits/f59b40146a3225632d103bd76779e41e53ac72c8 [^]' is based on Konar6's patch that shares a player's country when connecting. This has been a problem when only a few active players come from a given country, because it makes it harder to be anonymous, which can also make it harder to moderate servers.

I think it would be better if there were a cvar like cl_hidecountry that allowed players to opt out of sharing their country if they chose, or when necessary. In the majority of cases it's not an issue, so the cvar could default to false.
No tags attached.
Issue History
2012-12-28 21:38QentNew Issue
2012-12-28 21:48Konar6Note Added: 0005600
2012-12-28 22:09DuskNote Added: 0005601
2012-12-28 22:16QentNote Added: 0005602
2012-12-28 22:18QentNote Edited: 0005602bug_revision_view_page.php?bugnote_id=5602#r3067
2012-12-28 22:18QentNote Edited: 0005602bug_revision_view_page.php?bugnote_id=5602#r3068
2012-12-29 07:34ToxicityNote Added: 0005609
2012-12-29 10:31Konar6Note Added: 0005610
2012-12-29 14:40QentNote Added: 0005611
2012-12-29 14:43Torr SamahoNote Added: 0005612
2012-12-29 15:18DuskNote Added: 0005613
2012-12-29 15:19DuskNote Edited: 0005613bug_revision_view_page.php?bugnote_id=5613#r3078
2012-12-29 15:30Torr SamahoNote Edited: 0005612bug_revision_view_page.php?bugnote_id=5612#r3080
2012-12-29 20:17hjalgNote Added: 0005614
2012-12-29 20:24hjalgNote Edited: 0005614bug_revision_view_page.php?bugnote_id=5614#r3082
2012-12-30 11:54Torr SamahoNote Added: 0005617
2012-12-30 12:32hjalgNote Added: 0005622
2012-12-30 13:37DuskNote Added: 0005624
2012-12-31 10:04Torr SamahoNote Added: 0005638
2013-01-02 12:18Torr SamahoAssigned To => Torr Samaho
2013-01-02 12:18Torr SamahoStatusnew => needs testing
2013-01-02 12:19Torr SamahoProduct Version1.0 => 1.1-beta
2013-01-02 12:19Torr SamahoTarget Version => 1.1
2013-01-02 15:07Konar6Note Added: 0005658
2013-01-02 16:31Torr SamahoNote Added: 0005661
2013-01-02 18:34Konar6Note Added: 0005669
2013-01-02 18:41Torr SamahoNote Added: 0005670
2013-04-06 14:12ArcoNote Added: 0006248
2013-04-06 16:45DuskStatusneeds testing => resolved
2013-04-06 16:45DuskFixed in Version => 1.1
2013-04-06 16:45DuskResolutionopen => fixed
2018-09-30 20:21Blzut3Statusresolved => closed

Notes
(0005600)
Konar6   
2012-12-28 21:48   
If those few (3?) players wanted to be "more anonymous" by disabling their country being shown, they would actually end up even less anonymous because of their count.
If you consider a country to be classified information, better implement a server side switch, and let the paranoid ones play on servers which don't enable it. From Torr Samaho's implementation it could be easily achieved by simply not installing the database onto the server.
(0005601)
Dusk   
2012-12-28 22:09   
I was playing with this stuff once and I had my own implementation of IP2C that only relied on a CSV database and not any external library. With modifications it could even read from Doomseeker's IP2C database file.

Re: actual ticket, I do agree with the concerns of remaining anonymous, it has opened up the possibility of rule breakers guessing through aliases. Not quite sure about this move, which was kinda the reason I didn't post my implementation to begin with. I can still post it, if desired.
(0005602)
Qent   
2012-12-28 22:16   
(edited on: 2012-12-28 22:18)
@Konar6, although that's a good reason to let the cvar default to true, I would have expected there to be a few more paranoid players from common countries like the US. Also it would be impossible for players to tell the difference between someone who has hid his country, and another whose IP is just missing from the database.

I don't see how disabling it server-side is a help at all. It's the players whose countries are being revealed, not the servers.

Besides, what's wrong with simply giving players the option not to have their country shown? If they think it will actually make them less anonymous, then they don't have to do it.

(0005609)
Toxicity   
2012-12-29 07:34   
Howbout ... Instead of not having it display your country at all, if you decide to "opt out", then it will just default to saying that you're from the US or UK or other common country.

Or just say what continent you're from. That removes the specificness from your location.
(0005610)
Konar6   
2012-12-29 10:31   
Such changes to consistency depreciate the meaning of the feature (esp. lying about the country, heh). I wouldn't consider a player's country as some secret info. Other games/internet services show countries. One more positive point about this is it makes impersonation less of a problem. I think the server should ultimately decide whether to broadcast countries, and clients that really don't want their country being shown can decide to play on servers with this feature off (not different from how the server decides settings and dmflags). What's with the paranoia anyway Qent, GV runs this for many months and everyone either loves it or doesn't care about it.
(0005611)
Qent   
2012-12-29 14:40   
This is for when knowing the country actually tells you the identity of a player, so it boils down to whether you think aliasing should be a privilege afforded to all players, or just a side effect of the lax player name system.

Yes, it could help to fight impersonation sometimes, or the server could have a bad database. Ultimately you still need to check the IP.

This is not really comparable to deciding which servers to avoid based on DMFlags; it's more like deciding based on which servers allow you to disable skins (all of them).

I suggested this same thing for GV. I just think it's more important now that it's going in the official build.
(0005612)
Torr Samaho   
2012-12-29 14:43   
(edited on: 2012-12-29 15:30)
I have to admit that I didn't think about potential privacy issues. The main question is whether we want the server admin to have the last word on this (which they have at the moment) or the individual clients.

Quote from Dusk
I was playing with this stuff once and I had my own implementation of IP2C that only relied on a CSV database and not any external library.
FYI, I added the necessary parts of the GeoIP library to Zandronum's source, so it's not necessary to install any additional files to build the source or to run the server. You only need to add the database file to your binary directory if you want the countries to be shown.

(0005613)
Dusk   
2012-12-29 15:18   
(edited on: 2012-12-29 15:19)
'http://pastebin.com/EDC1G7qb [^]'
Here's my implementation nevertheless, for whatever interest it could generate. It reads from a CSV database (which is quite slow, should use the binary format but eh), and also had netcode to show flags on the scoreboard. :V

(0005614)
hjalg   
2012-12-29 20:17   
(edited on: 2012-12-29 20:24)
Strongly agree. You should not force the players to show their countries/IPs. Let them decide.

(0005617)
Torr Samaho   
2012-12-30 11:54   
Quote from hjalg
You should not force the players to show their countries/IPs. Let them decide.

To clarify, a client's IP is never revealed to the other clients. Only the country code is shown.

Anyway, I renovated how Zandronum handles client connect flags and added the requested flag cl_hidecountry while I was at it.

Quote from Dusk
also had netcode to show flags on the scoreboard.

That's neat. Did you also write the code that reads the flag icons and draws them on the scoreboard?
(0005622)
hjalg   
2012-12-30 12:32   
Quote from "Torr Samaho"
I renovated how Zandronum handles client connect flags and added the requested flag cl_hidecountry


Great!
(0005624)
Dusk   
2012-12-30 13:37   
Yeah, and I also got flag graphics for over half of the countries, most of the ones missing flags are Africa or some small islands. I got public-domain flag images from Wikipedia and added a shading layer on them. Which were not in public domain I drew myself.

Also said flags appear on my modded scoreboard but I could easily add them to the default one too.
(0005638)
Torr Samaho   
2012-12-31 10:04   
Sounds promising. Do you have a screenie at hand?
(0005658)
Konar6   
2013-01-02 15:07   
Regarding this commit

'https://bitbucket.org/Torr_Samaho/zandronum/commits/2f7e1f9518bbd8c1c552906eab913db66005cd86 [^]'


on Linux (verified on Debian and Ubuntu), the country database is deployed to /usr/share/GeoIP/ or /usr/local/share/GeoIP/ as part of the libgeoip1 package (which is pre-installed on some systems).

Maybe it's possible to make Zandronum look in those directories apart from the current directory?
(0005661)
Torr Samaho   
2013-01-02 16:31   
Quote from Konar6
Maybe it's possible to make Zandronum look in those directories apart from the current directory?

Sure. Replacing
g_GeoIPDB = GeoIP_new ( GEOIP_STANDARD );

with
#ifdef unix
        if ( FileExists ( "/usr/share/GeoIP/GeoIP.dat" ) )
          g_GeoIPDB = GeoIP_open ( "/usr/share/GeoIP/GeoIP.dat", GEOIP_STANDARD );
        else if ( FileExists ( "/usr/local/share/GeoIP/GeoIP.dat" ) )
          g_GeoIPDB = GeoIP_open ( "/usr/local/share/GeoIP/GeoIP.dat" ), GEOIP_STANDARD );
#endif
        if ( g_GeoIPDB == NULL )
            g_GeoIPDB = GeoIP_new ( GEOIP_STANDARD );

should take care of this (you also need to include "cmdlib.h" in network.cpp). Can't test this myself at the moment though. If you can confirm that it works like this, I'll commit the change to the Zandronum repository.
(0005669)
Konar6   
2013-01-02 18:34   
Yeah, that works as expected in all scenarios, I didn't have to copy the database into the current directory anymore.

Just note that you overlooked an additional parenthesis on line 5 of the code.
(0005670)
Torr Samaho   
2013-01-02 18:41   
Thanks for checking! The updated code is now in the repository.
(0006248)
Arco   
2013-04-06 14:12   
Works as intended.