If you have obtained any of my premium add-ons from another site, you DO NOT have a valid license for those add-ons and no support will be given to you. The only place that can sell licenses for my premium add-ons is this site.
If you are upgrading, the XF 1 data/countryflags files must be present on your server. The XF 2 version uses those files and does not re-install them during an upgrade.
If you do NOT have the XF 1 data/countryflags files on your server and the XF 1 version shows as being a Legacy add-on in XF 2, uninstall it BEFORE uploading the XF 2 version files to your server. That will force a re-install of the data files. You will not lose any data from the database if you do this. The database will still have all of the data from the XF 1 version and it will be used by the XF 2 version.
South Africa shows fine. A user here is from South Africa and I can see his flag without a problem.
"Reserved" means that either the IP address being used by the user is faked to a reserved IP address (https://en.wikipedia.org/wiki/Reserved_IP_addresses) or your server is returning a reserved address for "$_SERVER['HTTP_CLIENT_IP']", "$_SERVER['HTTP_FORWARDED_FOR']", "$_SERVER['HTTP_FORWARDED']" or "$_SERVER['HTTP_X_FORWARDED_FOR']". You would need to refer to your server documentation to fix that.
IP addresses that are reserved in the 10., 172.16 to 31 and 192.168. ranges would show up with an "i" like mine does here. Those are local network addresses. All others show up with a "r".
I use apache here in it's default configuration with no problems.
The only thing I can suggest is to turn on IP logging in the add-on options and then after a few people with the 'Reserved' flag log on send me the log file by PC so I can have a look at it. At least that way I can tell you the IP address being returned and that may give you an idea where to look.
Just be sure to turn off logging and delete the log after you send it to me.
For everyone's benefit @Vasilis is running behind the OVH SSL portal which is a proxy in itself.
If you are running behind a proxy, try checking the 'This site is using SiteLock' option in the add-on options. That disables proxy detection in the add-on because the server itself is behind a proxy which will result in the 'R' flag being displayed for all users.
Now that the GDPR is around the corner, I might think that this addon could be potentially problematic.
Cause revealing one's country is definitely revealing personal information, which means we would need consent from the user.
What I propose is the following change.
When the addon is enabled (and the permissions set), instead of displaying the country flags by default, let users choose first.
Right now we can let users hide their flags, if we want. But still by default the flags are shown first. People need to change in the account/privacy settings not to show them, if they wish. But we didn't have their consent in first place. So when the addon is enabled, instead of having all flags shown by default to all visitors, make it to "nobody". And let people actively change them to "all visitors" if they wish to let people see their countries. By that method we would have their consent, as they decided to show them, we didn't made them to show.
I think this is the better approach. What do you think?
Despite what people think, the country a person is in is not considered personally identifiable information due to the size of a country and the likelyhood of someone being found with just the country involved. It's not localized enough. I've already checked that multiple times.
If it displayed the city they were in that might be considered personally identifiable, especially if they were using their real name as their user name.
EDIT: However, I will consider making it off by default.
Before I make any changes I want to see how XenForo itself will deal with privacy options. Once they've made their changes, I'll be in a better position to add to their changes (I'm guessing they will add opt-in options at registration) at the same time.