faluco@319: /** ds@475: * vim: set ts=4 : dvander@374: * =============================================================== dvander@374: * SourceMod (C)2004-2007 AlliedModders LLC. All rights reserved. dvander@374: * =============================================================== dvander@374: * dvander@374: * This file is part of the SourceMod/SourcePawn SDK. This file may only be used dvander@374: * or modified under the Terms and Conditions of its License Agreement, which is found dvander@374: * in LICENSE.txt. The Terms and Conditions for making SourceMod extensions/plugins dvander@374: * may change at any time. To view the latest information, see: dvander@374: * http://www.sourcemod.net/license.php dvander@374: * dvander@374: * Version: $Id$ faluco@319: */ faluco@319: faluco@319: #if defined _geoip_included faluco@319: #endinput faluco@319: #endif faluco@319: #define _geoip_included faluco@319: dvander@320: #include dvander@320: faluco@319: /** faluco@319: * @GLOBAL@ faluco@319: * IP address can contain ports, the ports will be stripped out. faluco@319: */ faluco@319: faluco@319: /** faluco@319: * Gets the two character country code from an IP address. (US, CA, etc) faluco@319: * faluco@319: * @param ip Ip to determine the country code. faluco@319: * @param ccode Destination string buffer to store the code. faluco@319: * @noreturn faluco@319: */ dvander@320: native GeoipCode2(const String:ip[], String:ccode[3]); faluco@319: faluco@319: /** faluco@319: * Gets the three character country code from an IP address. (USA, CAN, etc) faluco@319: * faluco@319: * @param ip Ip to determine the country code. faluco@319: * @param ccode Destination string buffer to store the code. faluco@319: * @noreturn faluco@319: */ dvander@320: native GeoipCode3(const String:ip[], String:ccode[4]); faluco@319: faluco@319: /** faluco@319: * Gets the full country name. (max length of output string is 45) faluco@319: * faluco@319: * @param ip Ip to determine the country code. faluco@319: * @param ccode Destination string buffer to store the country name. faluco@319: * @param len Maximum length of output string buffer. faluco@319: * @noreturn faluco@319: */ dvander@320: native GeoipCountry(const String:ip[], String:name[], len=45); dvander@320: dvander@320: /** dvander@320: * Do not edit below this line! dvander@320: */ dvander@320: public Extension:__ext_geoip = dvander@320: { dvander@320: name = "GeoIP", dvander@320: file = "geoip.ext", dvander@320: #if defined AUTOLOAD_EXTENSIONS dvander@320: autoload = 1, dvander@320: #else dvander@320: autoload = 0, dvander@320: #endif dvander@320: #if defined REQUIRE_EXTENSIONS dvander@320: required = 1, dvander@320: #else dvander@320: required = 0, dvander@320: #endif dvander@320: };