AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Snippets and Tutorials (https://forums.alliedmods.net/forumdisplay.php?f=112)
-   -   [INC] GeoCity (Get Players City From IP) (https://forums.alliedmods.net/showthread.php?t=124288)

PharaohsPaw 07-20-2010 17:20

Re: [INC] GeoCity (Get Players City From IP)
 
Hello,

Discovered this as result of updates to the Connect Announce plugin which we've been using a slightly older version of (until today :)

Curious what your take would be on having geocity.inc use the actual GeoLiteCity.dat file you can pull in from the net instead, as an option.

The reason I'm asking is because we have HLStatsX CE running on our servers and this already uses a copy of GeoLiteCity.dat, in fact you can simply script pulling updated .dat files in via /etc/crontab. If we're already using a copy of GeoLiteCity.dat for HLStatsX that we update regularly, it seems more sensible to have other sourcemod plugins also use the same .dat file, especially with regard to keeping things updated. Update one copy of the database and everything that uses it uses the updated copy. (symlinks are a beautiful thing sometimes)

Looks like Sourcemod uses .dat format already too, ie configs/geoip/GeoIP.dat.

If anybody can point me at some relevant coding documentation I'm willing to take a look at this.

Also noticed that the sourcemod base directory in GeoDatabaseConnect() is more or less hardcoded in this .inc file to look in addons/sourcemod/... to find the .sq3 file under the sourcemod directory. Is there a way to express the sm_basedir as a variable instead, so folks running multiple servers off of one set of gameserver files can have it find the database file without having to custom-compile a copy of the plugin(s) using geocity.inc customized for each server's sourcemod base directory location?

Thanks,
PharaohsPaw

Darkthrone 07-21-2010 01:11

Re: [INC] GeoCity (Get Players City From IP)
 
see here

Krufftys Killers 12-17-2014 21:35

Re: [INC] GeoCity (Get Players City From IP)
 
dose any body got the GeoLiteCity.sq3 can you please post it?
Thanks


All times are GMT -4. The time now is 18:16.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.