plugins/include/geoip.inc
author Phong Dang <teame06@gmail.com>
Wed Aug 01 04:17:36 2007 +0000 (2007-08-01)
changeset 1235 88bb46f9731e
parent 619 6934bf39171e
child 1293 2a71249ca0ab
permissions -rw-r--r--
Implemented requested amb603. Added voice natives.
     1 /**
     2  * vim: set ts=4 :
     3  * ===============================================================
     4  * SourceMod (C)2004-2007 AlliedModders LLC.  All rights reserved.
     5  * ===============================================================
     6  *
     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
    12  *
    13  * Version: $Id$
    14  */
    15 
    16 #if defined _geoip_included
    17   #endinput
    18 #endif
    19 #define _geoip_included
    20 
    21 #include <core>
    22 
    23 /**
    24  * @section IP addresses can contain ports, the ports will be stripped out.
    25  */
    26 
    27 /**
    28  * Gets the two character country code from an IP address. (US, CA, etc)
    29  *
    30  * @param ip			Ip to determine the country code.
    31  * @param ccode			Destination string buffer to store the code.
    32  * @noreturn
    33  */
    34 native GeoipCode2(const String:ip[], String:ccode[3]);
    35 
    36 /**
    37  * Gets the three character country code from an IP address. (USA, CAN, etc)
    38  *
    39  * @param ip			Ip to determine the country code.
    40  * @param ccode			Destination string buffer to store the code.
    41  * @noreturn
    42  */
    43 native GeoipCode3(const String:ip[], String:ccode[4]);
    44 
    45 /**
    46  * Gets the full country name. (max length of output string is 45)
    47  *
    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.
    51  * @noreturn
    52  */
    53 native GeoipCountry(const String:ip[], String:name[], len=45);
    54 
    55 /**
    56  * @endsection
    57  */
    58 
    59 /**
    60  * Do not edit below this line!
    61  */
    62 public Extension:__ext_geoip = 
    63 {
    64 	name = "GeoIP",
    65 	file = "geoip.ext",
    66 #if defined AUTOLOAD_EXTENSIONS
    67 	autoload = 1,
    68 #else
    69 	autoload = 0,
    70 #endif
    71 #if defined REQUIRE_EXTENSIONS
    72 	required = 1,
    73 #else
    74 	required = 0,
    75 #endif
    76 };