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