new geoip natives

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40324
This commit is contained in:
Borja Ferrer 2007-01-19 02:23:04 +00:00
parent 823fd20a6d
commit 91fc277fb9

41
plugins/include/geoip.inc Normal file
View File

@ -0,0 +1,41 @@
/**
* :TODO: license info
*/
#if defined _geoip_included
#endinput
#endif
#define _geoip_included
/**
* @GLOBAL@
* IP address can contain ports, the ports will be stripped out.
*/
/**
* Gets the two character country code from an IP address. (US, CA, etc)
*
* @param ip Ip to determine the country code.
* @param ccode Destination string buffer to store the code.
* @noreturn
*/
native Geoip_Code2(const String:ip[], String:ccode[3]);
/**
* Gets the three character country code from an IP address. (USA, CAN, etc)
*
* @param ip Ip to determine the country code.
* @param ccode Destination string buffer to store the code.
* @noreturn
*/
native Geoip_Code3(const String:ip[], String:ccode[4]);
/**
* Gets the full country name. (max length of output string is 45)
*
* @param ip Ip to determine the country code.
* @param ccode Destination string buffer to store the country name.
* @param len Maximum length of output string buffer.
* @noreturn
*/
native Geoip_Country(const String:ip[], String:name[], len=45);