Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Crys

#1
Community Plugins / Re: GeoIP
Jul 20, 2018, 08:47 PM
Quote from: rww on Jul 20, 2018, 10:48 AM
Quote from: =RK=MarineForce on Jul 20, 2018, 10:06 AMhttps://ibb.co/fcZ68d

function onPlayerJoin( player )
{
print("Test geoip: "+geoip_country_name_by_addr(player.IP));
Stats[ player.ID ] = PlayerClass();
NewTimer( "CheckBan", 1000, 1, player.ID );
Message("[#00CC00]** [#ffffff]"+player.Name+" [#00cc00]Has Joined The Server");
stats[ player.ID ] = PlayerClass();
GetInfo(player);
}

Localhost IP (127.0.0.1) isn't exist on geoip.dat

Localhost won't work indeed - local IP addresses are not delegated to any entity, so they don't have a country by design. Try it with a remote client's IP address. It works for me:
[MODULE] Loaded GeoIP for 0.4 by Crys.
            >> Loaded GeoIP.dat (GeoIP Country Edition)
[SCRIPT] === GeoIP DEBUG ===
[SCRIPT] - Database info: GEO-106FREE 20180719 Build 1 Copyright (c) 2018 MaxMind Inc All Rights Reserved
[SCRIPT] - Number of countries: 256
[SCRIPT] - Library version: 1.6.12
[SCRIPT] - Character set: UTF-8
[SCRIPT] geoip_country_code_by_addr("78.24.185.47") = "HU"
[SCRIPT] geoip_country_code3_by_addr("78.24.185.47") = "HUN"
[SCRIPT] geoip_country_name_by_addr("78.24.185.47") = "Hungary"

This is the script that I'm using for debugging:
function onScriptLoad() {
    local testIP = "78.24.185.47";
    print("=== GeoIP DEBUG ===");
    print("- Database info: " + geoip_database_info());
    print("- Number of countries: " + geoip_num_countries());
    print("- Library version: " + geoip_lib_version());
    print("- Character set: " + (geoip_charset() == GEOIP_CHARSET_UTF8 ? "UTF-8" : "ISO-8859-1"));
    print("geoip_country_code_by_addr(\"" + testIP + "\") = \"" + geoip_country_code_by_addr(testIP) + "\"");
    print("geoip_country_code3_by_addr(\"" + testIP + "\") = \"" + geoip_country_code3_by_addr(testIP) + "\"");
    print("geoip_country_name_by_addr(\"" + testIP + "\") = \"" + geoip_country_name_by_addr(testIP) + "\"");
}
#2
Community Plugins / Re: GeoIP
Jul 18, 2018, 06:03 PM
I've updated the plugin to work with the latest server. Only Linux builds for now.

UPDATE: Windows builds added.
#3
Community Plugins / Re: JSON
Jul 18, 2018, 05:32 PM
I've updated the plugin to work with the latest server. Only Linux builds for now.

UPDATE: Windows builds added.
#4
Community Plugins / Re: GeoIP
Jul 31, 2016, 12:02 PM
I've updated the plugin to work with the latest server (Plugin API 2.0). Only Linux builds for now.
#5
Community Plugins / Re: JSON
Jul 31, 2016, 12:02 PM
I've updated the plugin to work with the latest server (Plugin API 2.0). Only Linux builds for now.
#6
Off-Topic General / Re: PC specifications
Sep 21, 2015, 05:37 AM
Processor:
Intel Core i7-4790K @ 4.5 GHz
Memory:
HyperX Fury Black 32 GB (4x 8 GB) DDR3-1866 MHz RAM @ CL9
Hard Drive:
Samsung EVO 850 500 GB SSD
Video Card:
Gigabyte GeForce GTX 970 G1 Gaming (4 GB)
Display:
Asus VG248QE 1080p @ 144 Hz
Motherboard:
Gigabyte GA-Z97X-Gaming 7
PSU:
Corsair CX750M (750 W)
Keyboard:
ROCCAT Isku FX
Mouse:
ROCCAT Kone XTD
Sound:
ROCCAT Kave XTD
#7
Community Plugins / Re: JSON
Sep 17, 2015, 08:57 AM


I would recommend reading the boards' descriptions sometimes, they can contain vital information, like: "No programming support is allowed here."
#8
Community Plugins / Re: JSON
Sep 17, 2015, 04:36 AM
Added Windows builds.
#9
Community Plugins / Re: GeoIP
Sep 17, 2015, 04:36 AM
Added Windows builds.
#10
Community Plugins / Re: GeoIP
Sep 15, 2015, 05:33 PM
I'll include windows builds for both of my plugins in the following days.
#11
Community Plugins / Re: JSON
Sep 14, 2015, 09:27 AM
I'll release windows builds in a few days, didn't have the time to install visual studio yet.
#12
Community Plugins / JSON
Sep 14, 2015, 08:23 AM
Introduction
I'm using JSON for exporting data from the server to a file that my Live Map can load. I've been using a Squirrel implementation, and the script uses it extensively, so I've written this plugin which can convert from/to JSON much faster, with the json-c library.

Documentation
You can find the plugin's documentation here.
Every functions and constants provided by the plugin is explained there.

Download
- Linux 32 bit
- Linux 64 bit
- Windows 32 bit
- Windows 64 bit
#13
Community Plugins / GeoIP
Sep 14, 2015, 08:22 AM
Introduction
I got sick of the Squirrel plus SQLite based implementations of GeoIP (so called IP to Country scripts), because they tend to be slow and hard to update, so I made this little plugin, which is a Squirrel binding for libGeoIP. It can load the GeoIP.dat file that could be downloaded from MaxMind's site, which is updated monthly. MaxMind abandoned the old GeoIP.dat format in favor of the new MMDB format, so I've made a script that converts the new GeoLite2 databases' format to the old format. The updated GeoIP database can be downloaded from the link below.

Documentation
You can find the plugin's documentation here.
Every functions and constants provided by the plugin is explained there.

Download
- GeoIP.dat
- Linux 32 bit
- Linux 64 bit
- Windows 32 bit
- Windows 64 bit