GeoIP Plugin v0.1.4 (Country detector) - 04/05/2008 -
Totto8492 - 31.03.2008
This is my first practical plugin.
Ah... I don't know what to say.
If you can't read this post (as English), I'm too foolish.
* Last Edit: 04/05/2008:
GeoIP*.dat were move to scriptfiles directory.
Added MAX_COUNTRY_NAME.
Changes arguments(Pawn function).
Pawn functions will return string or value.
Fixed bug in sample filterscript.
Updated GeoIP*.dat.
Native Functions:
Code:
// Two chars into country[]. JP, US, etc...
native GetCountryCode(const ipaddress[], country[], size = sizeof country);
// Three chars into country[]. JPN, USA, etc...
native GetCountryCode3(const ipaddress[], country[], size = sizeof country);
// Full name into country[]. Japan, United States, etc...
native GetCountryName(const ipaddress[], country[], size = sizeof country);
// etc.
Pawn Functions:
Code:
GetPlayerCountryName(playerid); // return country name.
GetPlayerGMT(playerid); // return GMT hour. maybe inaccurate.
// etc.
Please see GeoIP_Plugin.inc . I cant write well. Sorry.
Example:
Code:
#include <a_samp>
#include GeoIP_Plugin
...
public OnPlayerConnect(playerid)
{
new name[MAX_PLAYER_NAME], country[MAX_COUNTRY_NAME], gmt;
new string[256];
GetPlayerName(playerid, name, sizeof(name));
country = GetPlayerCountryName(playerid);
gmt = GetPlayerGMT(playerid);
format(string, sizeof(string), "[JOIN] %s (%s, GMT %d:00)", name, country, gmt);
SendClientMessageToAll(0xFFCFCFAA, string);
return 1;
}
Welcome review and complaints.
Maybe, I can read English. Maybe.
geoip_plugin-0.1.4.zip (Package)
geoip_plugin-src-0.1.4.zip (Source)
GeoIP_country_name_253.txt (Country name list from GeoIP.c)
Re: GeoIP Plugin (Country detector) -
kc - 31.03.2008
very nice!!
makes my GeoIP function pointless tho
but who cares as this is much better ^^
Re: GeoIP Plugin (Country detector) -
yom - 31.03.2008
This is awesome if it works
I can't test actually but will do and post comments
But i already have a suggestion (easily scriptable in Pawn but may be better directly coded in the plugin) :
Return the GMT time of the player (based on his location of course)
Also you should post a list of all detected countries
Last thing: what are functions *Code3 ?
Re: GeoIP Plugin (Country detector) -
Killerkid - 31.03.2008
Nice work, But it's like the same as:
http://gtasync.com/?p=13
Re: GeoIP Plugin (Country detector) -
kc - 31.03.2008
Quote:
Originally Posted by Killerkid.
|
yeah but the gtasync one only gives the raw whois data. from the functions shown this one actually breaks it down into the output thats needed (country code etc.)
I made a pawn function based on the gtasync one, but i got bored trying to find out how to parse the data properly through pawn (its easily possible but just the time needed for all the different outputs of all the different whois providers.
Re: GeoIP Plugin v0.1.2 (Country detector) - 04/01/2008 -
Totto8492 - 01.04.2008
I will write reply later.
today, busy.

Sorry, my bad english.
Thanks for comments.
Re: GeoIP Plugin v0.1.2 (Country detector) - 04/01/2008 -
Totto8492 - 02.04.2008
The original author?
I checked MyMessages. but, no messages.
Is he MaxMind.com?
If this post have any problem, I want to delete this.
I'm sorry.
Re: GeoIP Plugin v0.1.2 (Country detector) - 04/01/2008 -
Towlies - 02.04.2008
The creator of the plugin and owner of GTASync is a fella by the name of TheSmoo (alias).
I tried to get him to allow permission to release this on the forums but he didn't budge. Even though you have put great work into this the original author of the plugin doesn't want it released here.
Re: GeoIP Plugin v0.1.2 (Country detector) - 04/01/2008 -
Totto8492 - 03.04.2008
(I'm unsure spelling)
I think my GeoIP Plugin is not related to GTASync's Plugin(is SNet, isn't it?).
his plugin:
Data source - WHOIS
Speed - depend network
Output - detailed host data(parse needed but good)
my plugin:
Data source - GeoIP
Speed - depend CPU
Output - country and a few things
By the way, his plugin source contain libGeoIP.
but libGeoIP is unused currently(#include only, not called).
and I don't use any his code.
So, Ah...well..., I think my plugin is not related to his plugin.
Maybe.
Still, Cannot I release here?
Should I Contact him?
Thanks in advance.
Re: GeoIP Plugin v0.1.2 (Country detector) - 04/01/2008 -
kc - 03.04.2008
Quote:
Originally Posted by Totto8492
<Links removed>
Note from Towlies: The original author of this plugin does not want it publically released on SA-MP forums (I asked him months ago). If you are able to recreate this without his original code your free to remake it. Sorry, its the original author of the plugin who doesn't want it released at least not here.
|
Quote:
Originally Posted by Alex
No, they were just saying it was similar. It's clearly not the same so there's no problem.
|
:/
Re: GeoIP Plugin v0.1.2 (Country detector) - 04/01/2008 -
Magor - 03.04.2008
Quote:
Originally Posted by yom
This is awesome if it works
I can't test actually but will do and post comments
But i already have a suggestion (easily scriptable in Pawn but may be better directly coded in the plugin) :
Return the GMT time of the player (based on his location of course)
Also you should post a list of all detected countries
Last thing: what are functions *Code3 ?
|
Of course this works, i made something similar half a year ago.
Re: GeoIP Plugin v0.1.4 (Country detector) - 04/04/2008 -
Totto8492 - 04.04.2008
If I translate correctly, No problem...?
Well...I create link again.
Continuously, Welcome review and complaints.
If this has any problem, please remove again.
Re: GeoIP Plugin v0.1.4 (Country detector) - 04/04/2008 -
Totto8492 - 05.04.2008
OK, I read messages from Towlies.
Thanks for permission.
and, I'm looking forward to SA:MP 0.2.5.
Re: GeoIP Plugin v0.1.4 (Country detector) - 04/05/2008 -
De[M]oN - 05.04.2008
Very nice. Thanks!
Re: GeoIP Plugin v0.1.4 (Country detector) - 04/05/2008 -
Joske_Vermeulen - 05.04.2008
Belgium is GMT+1
I found something else wrong but I forgot
and thank you
Re: GeoIP Plugin v0.1.4 (Country detector) - 04/05/2008 -
Killerkid - 15.04.2008
Hello,
How can i fix this:
Code:
Failed (/lib/tls/libc.so.6: version `GLIBC_2.4' not found (required by plugins/GeoIP_Plugin.so))
?
Re: GeoIP Plugin v0.1.4 (Country detector) - 04/05/2008 -
[LDT]LuxurY - 15.04.2008
sounds good

nice work!
Re: GeoIP Plugin v0.1.4 (Country detector) - 04/05/2008 -
Totto8492 - 17.04.2008
Quote:
Originally Posted by Killerkid.
Hello,
How can i fix this:
Code:
Failed (/lib/tls/libc.so.6: version `GLIBC_2.4' not found (required by plugins/GeoIP_Plugin.so))
?
|
Sorry, I don't understand well about program on linux.
I think, You must compile from source (please run "make" command) .
Re: GeoIP Plugin v0.1.4 (Country detector) - 04/05/2008 -
Bpb - 07.05.2008
I think it is useless and able to made by scripts
Re: GeoIP Plugin v0.1.4 (Country detector) - 04/05/2008 -
roleplayman - 07.05.2008
c++ is more fast and no need to use tones of CODES