View Single Post
Author Message
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 06-25-2009 , 22:46   Module: GeoIP+ (v1.3)
Reply With Quote #1



GEüIPl

v1.3, October 31th, 2016
GitHub



Table of contents:

DESCRIPTION
0
「AMX Mod X Module, backported from dev version to be used with the current stable v1.8.2」

GeoIP+ module is a modification of the original GeoIP module shipped by default with AMX Mod X.
This adds several new natives in order to exploit others availaible datas like:
✓ City
✓ Region Code/Name
✓ Time Zone
✓ Continent Code/Name
✓ Latitude/Longitude/Distance
✓ Continent Code/Name
This is worth to note that it uses the new MaxMind GeoIP2 database format and some natives (country, city, region and continent) are localized, which means you can output data in others languages than english if available. For now the following languages are supported: de en es fr ja pt-BR ru zh-CN.

API
0
Quick preview of new natives:

Full documentation can be found there, as well in include file:

COMMAND
0
For debugging reasons, a geoip command is now implemented:
geoip version
This will gives the current GeoIP module version and informations about current loaded database.

geoip dump <IP> [file]
This allows you to dump all informations of a given IP in a JSON-like format. You can optionally provided a file to save dump there.

NOTES
0
You should be aware that it may not be always accurate depending the given ip. Keep in mind this uses the lite and free database version.
▹ If GeoIP City is not found, it will use the default GeoIP Country provided by default, the only usable natives will be the one pertaining to countries and distance.
▹ If an IP is not found, the natives will output an empty string.
▹ The charset of the country/city/region/continent name is set on UTF-8 so you should see specials characters like accents and such in game.

CREDITS
0
▹ xPaw : Testing and support.
▹ NiLuJe : Compiling linux version.
▹ vittu : Tips.

CHANGELOG
0

INSTALLATION
0
➀ Download latest GeoLite2 City MaxMind DB (~25 Mio)
➁ Retrieve the GeoLite2-City.mmdb file and copy it on your server in your 1amxmodx/data.
➂ Stop your server, download the provided geoip-files-x.y.zip and overwrite the content in your 1amxmodx.
➃ Start your server & enjoy.

➥ ➄ Optional - Check geoip version and database by typing in server console: geoip version

INSTALLATION FILES
0
Download geoip-files-1.3.zip from GitHub : contains binaries and pawn include files.
__________________

Last edited by Arkshine; 10-31-2016 at 16:32. Reason: Updated to 1.3
Arkshine is offline