plugins/include/geoip.inc
author Scott Ehlert <ds@alliedmods.net>
Mon Feb 12 09:00:55 2007 +0000 (2007-02-12)
changeset 475 bb11d7eaae0f
parent 374 39ab08027d9e
child 619 6934bf39171e
permissions -rw-r--r--
Fixed tabs, hopefully...
faluco@319
     1
/**
ds@475
     2
 * vim: set ts=4 :
dvander@374
     3
 * ===============================================================
dvander@374
     4
 * SourceMod (C)2004-2007 AlliedModders LLC.  All rights reserved.
dvander@374
     5
 * ===============================================================
dvander@374
     6
 *
dvander@374
     7
 *  This file is part of the SourceMod/SourcePawn SDK.  This file may only be used 
dvander@374
     8
 * or modified under the Terms and Conditions of its License Agreement, which is found 
dvander@374
     9
 * in LICENSE.txt.  The Terms and Conditions for making SourceMod extensions/plugins 
dvander@374
    10
 * may change at any time.  To view the latest information, see:
dvander@374
    11
 *   http://www.sourcemod.net/license.php
dvander@374
    12
 *
dvander@374
    13
 * Version: $Id$
faluco@319
    14
 */
faluco@319
    15
faluco@319
    16
#if defined _geoip_included
faluco@319
    17
  #endinput
faluco@319
    18
#endif
faluco@319
    19
#define _geoip_included
faluco@319
    20
dvander@320
    21
#include <core>
dvander@320
    22
faluco@319
    23
/**
faluco@319
    24
 * @GLOBAL@
faluco@319
    25
 *   IP address can contain ports, the ports will be stripped out.
faluco@319
    26
 */
faluco@319
    27
faluco@319
    28
/**
faluco@319
    29
 * Gets the two character country code from an IP address. (US, CA, etc)
faluco@319
    30
 *
faluco@319
    31
 * @param ip			Ip to determine the country code.
faluco@319
    32
 * @param ccode			Destination string buffer to store the code.
faluco@319
    33
 * @noreturn
faluco@319
    34
 */
dvander@320
    35
native GeoipCode2(const String:ip[], String:ccode[3]);
faluco@319
    36
faluco@319
    37
/**
faluco@319
    38
 * Gets the three character country code from an IP address. (USA, CAN, etc)
faluco@319
    39
 *
faluco@319
    40
 * @param ip			Ip to determine the country code.
faluco@319
    41
 * @param ccode			Destination string buffer to store the code.
faluco@319
    42
 * @noreturn
faluco@319
    43
 */
dvander@320
    44
native GeoipCode3(const String:ip[], String:ccode[4]);
faluco@319
    45
faluco@319
    46
/**
faluco@319
    47
 * Gets the full country name. (max length of output string is 45)
faluco@319
    48
 *
faluco@319
    49
 * @param ip			Ip to determine the country code.
faluco@319
    50
 * @param ccode			Destination string buffer to store the country name.
faluco@319
    51
 * @param len			Maximum length of output string buffer.
faluco@319
    52
 * @noreturn
faluco@319
    53
 */
dvander@320
    54
native GeoipCountry(const String:ip[], String:name[], len=45);
dvander@320
    55
dvander@320
    56
/**
dvander@320
    57
 * Do not edit below this line!
dvander@320
    58
 */
dvander@320
    59
public Extension:__ext_geoip = 
dvander@320
    60
{
dvander@320
    61
	name = "GeoIP",
dvander@320
    62
	file = "geoip.ext",
dvander@320
    63
#if defined AUTOLOAD_EXTENSIONS
dvander@320
    64
	autoload = 1,
dvander@320
    65
#else
dvander@320
    66
	autoload = 0,
dvander@320
    67
#endif
dvander@320
    68
#if defined REQUIRE_EXTENSIONS
dvander@320
    69
	required = 1,
dvander@320
    70
#else
dvander@320
    71
	required = 0,
dvander@320
    72
#endif
dvander@320
    73
};