plugins/include/geoip.inc
author Borja Ferrer <faluco@alliedmods.net>
Wed Mar 28 23:35:12 2007 +0000 (2007-03-28)
changeset 658 b46ff98c249b
parent 619 6934bf39171e
child 1293 2a71249ca0ab
permissions -rw-r--r--
added iplayerinfo natives
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
/**
dvander@619
    24
 * @section IP addresses 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@619
    56
 * @endsection
dvander@619
    57
 */
dvander@619
    58
dvander@619
    59
/**
dvander@320
    60
 * Do not edit below this line!
dvander@320
    61
 */
dvander@320
    62
public Extension:__ext_geoip = 
dvander@320
    63
{
dvander@320
    64
	name = "GeoIP",
dvander@320
    65
	file = "geoip.ext",
dvander@320
    66
#if defined AUTOLOAD_EXTENSIONS
dvander@320
    67
	autoload = 1,
dvander@320
    68
#else
dvander@320
    69
	autoload = 0,
dvander@320
    70
#endif
dvander@320
    71
#if defined REQUIRE_EXTENSIONS
dvander@320
    72
	required = 1,
dvander@320
    73
#else
dvander@320
    74
	required = 0,
dvander@320
    75
#endif
dvander@320
    76
};