Raised This Month: $12 Target: $400
 3% 

[ANY] Hattrick's GeoIP Resolver Jun. 17 2023 +Plug-ins (4) +Multi-threading


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 08-01-2015 , 15:32   [ANY] Hattrick's GeoIP Resolver Jun. 17 2023 +Plug-ins (4) +Multi-threading
Reply With Quote #1

[ANY] Hattrick's GeoIP Resolver Jun. 17 2023 +Plug-ins (4) +Multi-threading

Github /ClaudiuHKS/SMAny-GeoResolver-Extension

This extension is intended to resolve Geographical Information,
by the IP Address (IPv4 Only),
and does only work on Windows and Linux.

It uses two free C libraries and databases at the same time
(MaxMind®'s GeoLite2-City & GeoLiteCity),
in order to Improve the scanning process,
ensuring that there are Less Chances To Fail retrieving a record.

Furthermore, you can also Run In The Same Time,
up to eight MaxMind® databases (GeoLite2-City, GeoIP2-City, GeoLiteCity,
GeoIPCity, GeoLiteISP, GeoIPISP, GeoLite2-ASN & GeoIP2-ISP), if you own them.

How It Works

It starts scanning by using the free databases, to see if a result is retrieved,
then it goes on scanning, by using the other databases,
Completing The Missing Fields, that appear as N/ A.

The Features

It supports Updating the databases While The Game Server Is Running,
Without manually restarting it. Read the instructions inside the zipped file.

The Pictures

The Game Server's Console

Spoiler

This Is How A Complete Record Looks Like

Spoiler

This Is How The .INC File Looks Like

Spoiler

This Is A Test Suite Plug-in

Spoiler

Linux Needs

PHP Code:
libm.so.6 libpthread.so.0 libc.so.6
GLIBC_2.0 GLIBC_2.1.3 GLIBC_2.1
SSE 
(Streaming SIMD Extensions CPU
Windows Needs

PHP Code:
Visual Studio LATEST (x86Redistributable
AVX2 
(Advanced Vector Extensions 2 CPU
Or

PHP Code:
Visual Studio LATEST (x86Redistributable
SSE2 
(Streaming SIMD Extensions 2 CPU
Browse Windows Needs, or download Windows Needs.

Here you can download the databases.
You can also sign up on MaxMind®,
to download from their servers.

Source code on GitHub,
it also includes information about how to build it on Linux and Windows.
See extension.cpp.
Attached Files
File Type: zip SMAny-GeoResolver-Extension-1.0.zip (1.07 MB, 123 views)
__________________

Last edited by claudiuhks; 06-18-2023 at 18:08. Reason: Added GeoLite2 ASN DB Support & Multi-Threading
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
hadesownage
AlliedModders Donor
Join Date: Jun 2013
Location: Romania, Iași
Old 08-08-2015 , 16:11   Re: [ANY] Hattrick's Geo Resolver (1.0) [Aug 6, 2015] +Plug-ins
Reply With Quote #2

Very nice my friend! Good job!
hadesownage is offline
Send a message via Yahoo to hadesownage Send a message via Skype™ to hadesownage
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 12-18-2015 , 17:02   Re: [ANY] Hattrick's Geo Resolver (1.0) [Dec 18, 2015] +Plug-ins
Reply With Quote #3

Updated today (Dec 18, 2015).
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
ImACow
AlliedModders Donor
Join Date: Feb 2015
Old 02-21-2016 , 19:06   Re: [ANY] Hattrick's Geo Resolver (1.0) [Dec 18, 2015] +Plug-ins
Reply With Quote #4

Thanks for this!

How does the updater work ?

Im using this cron job.


https://github.com/certtools/intelmq...n-jobs/maxmind

Would this work if I dump the file into "Update"?
ImACow is offline
DarkDeviL
SourceMod Moderator
Join Date: Apr 2012
Old 02-22-2016 , 00:17   Re: [ANY] Hattrick's Geo Resolver (1.0) [Dec 18, 2015] +Plug-ins
Reply With Quote #5

Quote:
Originally Posted by ImACow View Post
Thanks for this!

How does the updater work ?

Im using this cron job.


https://github.com/certtools/intelmq...n-jobs/maxmind

Would this work if I dump the file into "Update"?
1. Download a new copy of each database you have access to.
2. Extract those updates, so the extracted file ends up in the "addons/sourcemod/data/GeoResolver/Update/"-folder.
3. GeoResolver will now handle the rest on it's own.

Whether you use the linked script, or other scripts to do it via cron doesn't matter; as long as those scripts are doing things exactly as explained above.
__________________
Mostly known as "DarkDeviL".

Dropbox FastDL: Public folder will no longer work after March 15, 2017!
For more info, see the [SRCDS Thread], or the [HLDS Thread].
DarkDeviL is offline
ImACow
AlliedModders Donor
Join Date: Feb 2015
Old 02-22-2016 , 11:49   Re: [ANY] Hattrick's Geo Resolver (1.0) [Dec 18, 2015] +Plug-ins
Reply With Quote #6

When using: GeoR_DistancePlrSrv


PHP Code:

GeoResolver
.inc(306) : error 017undefined symbol "pCVar"
GeoResolver.inc(313) : error 017undefined symbol "GetClientIp"
GeoResolver.inc(313) : error 092number of arguments does not match definition 

Last edited by ImACow; 02-22-2016 at 11:50.
ImACow is offline
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 02-26-2016 , 10:34   Re: [ANY] Hattrick's Geo Resolver (1.0) [Dec 18, 2015] +Plug-ins
Reply With Quote #7

Quote:
Originally Posted by ImACow View Post
When using: GeoR_DistancePlrSrv


PHP Code:

GeoResolver
.inc(306) : error 017undefined symbol "pCVar"
GeoResolver.inc(313) : error 017undefined symbol "GetClientIp"
GeoResolver.inc(313) : error 092number of arguments does not match definition 
Must be fixed now, in the first post. Thanks for reporting it out.
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 02-26-2016 , 12:03   Re: [ANY] Hattrick's Geo Resolver (1.0) [Dec 18, 2015] +Plug-ins
Reply With Quote #8

One thing I did notice, your extension's source veers away from how normally SM extension source's get SM's API headers.
WildCard65 is offline
Kamil445
Member
Join Date: Dec 2013
Old 12-02-2016 , 08:02   Re: [ANY] Hattrick's Geo Resolver (1.0) [Dec 18, 2015] +Plug-ins
Reply With Quote #9

I'm so stupid, i forgot copy .ext file.

Last edited by Kamil445; 12-02-2016 at 08:42.
Kamil445 is offline
Nerus
Senior Member
Join Date: Aug 2010
Location: Poland
Old 07-11-2018 , 03:36   Re: [ANY] Hattrick's Geo Resolver (1.0) [Dec 18, 2015] +Plug-ins
Reply With Quote #10

Not working anymore ?

Output on player spawned
Quote:
Player Nerus country code: 'N/A', country code3: 'N/A', country: 'N/A', city 'N/A', region_code 'N/A', region 'N/A'
Output from author example plugin:
Quote:
Player Nerus joined
exts
Quote:
sm exts list
[SM] Displaying 9 extensions:
[01] Automatic Updater (1.9.0.6226): Updates SourceMod gamedata files
[02] Webternet (1.9.0.6226): Extension for interacting with URLs
[03] CS Tools (1.9.0.6226): CS extended functionality
[04] BinTools (1.9.0.6226): Low-level C/C++ Calling API
[05] SDK Tools (1.9.0.6226): Source SDK Tools
[06] Top Menus (1.9.0.6226): Creates sorted nested menus
[07] Regex (1.9.0.6226): Provides regex natives for plugins
[08] SDK Hooks (1.9.0.6226): Source SDK Hooks
[09] Hattrick's Geo Resolver (1.0.0.0): Resolves Geo data by IP
DB Files:
Quote:
GeoLite2-City.mmdb
GeoLiteCity.dat

Last edited by Nerus; 07-11-2018 at 03:49.
Nerus is online now
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:13.


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