-
-
Notifications
You must be signed in to change notification settings - Fork 975
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update GeoIP #2926
Update GeoIP #2926
Conversation
Are you sure this results in a usable database? We both tried this by manually changing the config file and the database extraction was not correct. (I still think the top-level directory needs to be accounted for.) |
EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIPPlayerListener.java
Outdated
Show resolved
Hide resolved
OK, as long as you guys tested that the database is usable. I see that if the code doesn't find the mmdb file, it still extracts something. I would suggest checking if the file was actually found and bailing out with an error if it wasn't. That would be more robust. |
EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIPPlayerListener.java
Show resolved
Hide resolved
EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIPPlayerListener.java
Show resolved
Hide resolved
EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIPPlayerListener.java
Show resolved
Hide resolved
@Bobcat00 The issue was mostly the URL format changed and GeoIP didn't like it. I had someone join a test server with a freshly downloaded database and it seems to be working properly. @k-jiang I wish I knew that sooner, as I spent some time trying to verify that the file code was working. Anyways, it looks like there's no issues with it, as you said. Also, good catch on the config upgrade stuff, I hadn't noticed that. |
Oh and probably worth mentioning, the translation for |
While not necessary at all, it could be nice to add a bStats metric on how many people have GeoIP actually set up |
Would be nice to do this for all modules. Might be best in a separate PR. Perhaps just add a custom chart for it. Although, you'd probably need to get a hold of SupaHam so he could enable that on the actual bStats page since he manages it. |
So I'm changing my tune on this PR - I'm not going to treat the geoip config values as user configurable, which reduces the burden on us needing to do weird checks to be sure that we are doing what the user actually intended. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Conditional approval on wiki page change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this definitely always result in a valid database being downloaded, or are there further changes needed? I recall there being an issue with the current tar extraction code.
The wiki page is currently done, with the exception of an image that needs replacing (I committed the wrong one).
@md678685 I'm assuming the wiki page isn't published yet, as I wasn't able to find it. As soon as it's ready, all that needs to be done here is update As for the database extraction code, I don't think there is an issue with it anymore. I think you might be referring to the Discord conversation we had. What might have happened is the file was not downloading completely for whatever reason (I may have been unlucky and the GeoIP site was having issues). That led me on a complete wild goose chase, because later that morning I was able to download it just fine with no code changes there at all. Fairly frustrating, but at the very least I can say that the code seems sound. We have the author of the code @k-jiang (who wrote it in 938f94e) here as well confirming that it works as expected. Here are some testing results to be a bit more convincing (you can also pull the PR yourself and check). Without license key installed:
and database did not download. With license key installed:
and database downloaded, working as expected. |
https://essentialsx.cf/geoip now details how to set up the GeoIP module. |
@md678685 I reviewed your wiki entry, and it looks absolutely correct to me. Thanks for taking the time to create it! Should be fairly easy for server owners to understand how to update the the plugin. ... and with that last commit to point at the wiki, I believe all work here is done. Should be ready to merge. |
This implements the fix suggested by @Bobcat00 in #2919
Users of GeoIP will now be required to register a MaxMind account and create a license to download the database required by the plugin. This license is entered into the new license-key field in the configuration.