AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Extensions (https://forums.alliedmods.net/forumdisplay.php?f=134)
-   -   [ANY] Hattrick's GeoIP Resolver Jun. 17 2023 +Plug-ins (4) +Multi-threading (https://forums.alliedmods.net/showthread.php?t=267805)

claudiuhks 08-01-2015 15:32

[ANY] Hattrick's GeoIP Resolver Jun. 17 2023 +Plug-ins (4) +Multi-threading
 
1 Attachment(s)
[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


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.

hadesownage 08-08-2015 16:11

Re: [ANY] Hattrick's Geo Resolver (1.0) [Aug 6, 2015] +Plug-ins
 
Very nice my friend! Good job!

claudiuhks 12-18-2015 17:02

Re: [ANY] Hattrick's Geo Resolver (1.0) [Dec 18, 2015] +Plug-ins
 
Updated today (Dec 18, 2015).

ImACow 02-21-2016 19:06

Re: [ANY] Hattrick's Geo Resolver (1.0) [Dec 18, 2015] +Plug-ins
 
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"?

DarkDeviL 02-22-2016 00:17

Re: [ANY] Hattrick's Geo Resolver (1.0) [Dec 18, 2015] +Plug-ins
 
Quote:

Originally Posted by ImACow (Post 2395482)
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.

ImACow 02-22-2016 11:49

Re: [ANY] Hattrick's Geo Resolver (1.0) [Dec 18, 2015] +Plug-ins
 
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 


claudiuhks 02-26-2016 10:34

Re: [ANY] Hattrick's Geo Resolver (1.0) [Dec 18, 2015] +Plug-ins
 
Quote:

Originally Posted by ImACow (Post 2395644)
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.

WildCard65 02-26-2016 12:03

Re: [ANY] Hattrick's Geo Resolver (1.0) [Dec 18, 2015] +Plug-ins
 
One thing I did notice, your extension's source veers away from how normally SM extension source's get SM's API headers.

Kamil445 12-02-2016 08:02

Re: [ANY] Hattrick's Geo Resolver (1.0) [Dec 18, 2015] +Plug-ins
 
I'm so stupid, i forgot copy .ext file.

Nerus 07-11-2018 03:36

Re: [ANY] Hattrick's Geo Resolver (1.0) [Dec 18, 2015] +Plug-ins
 
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


All times are GMT -4. The time now is 14:07.

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