3 * ===============================================================
4 * SourceMod (C)2004-2007 AlliedModders LLC. All rights reserved.
5 * ===============================================================
7 * This file is part of the SourceMod/SourcePawn SDK. This file may only be used
8 * or modified under the Terms and Conditions of its License Agreement, which is found
9 * in LICENSE.txt. The Terms and Conditions for making SourceMod extensions/plugins
10 * may change at any time. To view the latest information, see:
11 * http://www.sourcemod.net/license.php
16 #if defined _geoip_included
19 #define _geoip_included
24 * @section IP addresses can contain ports, the ports will be stripped out.
28 * Gets the two character country code from an IP address. (US, CA, etc)
30 * @param ip Ip to determine the country code.
31 * @param ccode Destination string buffer to store the code.
34 native GeoipCode2(const String:ip[], String:ccode[3]);
37 * Gets the three character country code from an IP address. (USA, CAN, etc)
39 * @param ip Ip to determine the country code.
40 * @param ccode Destination string buffer to store the code.
43 native GeoipCode3(const String:ip[], String:ccode[4]);
46 * Gets the full country name. (max length of output string is 45)
48 * @param ip Ip to determine the country code.
49 * @param ccode Destination string buffer to store the country name.
50 * @param len Maximum length of output string buffer.
53 native GeoipCountry(const String:ip[], String:name[], len=45);
60 * Do not edit below this line!
62 public Extension:__ext_geoip =
66 #if defined AUTOLOAD_EXTENSIONS
71 #if defined REQUIRE_EXTENSIONS