Corrected case in a nominations phrase.
3 * =============================================================================
4 * SourceMod (C)2004-2008 AlliedModders LLC. All rights reserved.
5 * =============================================================================
7 * This file is part of the SourceMod/SourcePawn SDK.
9 * This program is free software; you can redistribute it and/or modify it under
10 * the terms of the GNU General Public License, version 3.0, as published by the
11 * Free Software Foundation.
13 * This program is distributed in the hope that it will be useful, but WITHOUT
14 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
18 * You should have received a copy of the GNU General Public License along with
19 * this program. If not, see <http://www.gnu.org/licenses/>.
21 * As a special exception, AlliedModders LLC gives you permission to link the
22 * code of this program (as well as its derivative works) to "Half-Life 2," the
23 * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
24 * by the Valve Corporation. You must obey the GNU General Public License in
25 * all respects for all other code used. Additionally, AlliedModders LLC grants
26 * this exception to all derivative works. AlliedModders LLC defines further
27 * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
28 * or <http://www.sourcemod.net/license.php>.
33 #if defined _banning_included
36 #define _banning_included
38 #define BANFLAG_AUTO (1<<0) /**< Auto-detects whether to ban by steamid or IP */
39 #define BANFLAG_IP (1<<1) /**< Always ban by IP address */
40 #define BANFLAG_AUTHID (1<<2) /**< Always ban by authstring (for BanIdentity) if possible */
41 #define BANFLAG_NOKICK (1<<3) /**< Does not kick the client */
44 * Called for calls to BanClient() with a non-empty command.
46 * @param client Client being banned.
47 * @param time Time the client is being banned for (0 = permanent).
48 * @param flags One if AUTHID or IP will be enabled. If AUTO is also
49 * enabled, it means Core autodetected which to use.
50 * @param reason Reason passed via BanClient().
51 * @param kick_message Kick message passed via BanClient().
52 * @param command Command string to identify the ban source.
53 * @param source Source value passed via BanClient().
54 * @return Plugin_Handled to block the actual server banning.
55 * Kicking will still occur.
57 forward Action:OnBanClient(client,
60 const String:reason[],
61 const String:kick_message[],
62 const String:command[],
66 * Called for calls to BanIdentity() with a non-empty command.
68 * @param identity Identity string being banned (authstring or ip).
69 * @param time Time the client is being banned for (0 = permanent).
70 * @param flags Ban flags (only IP or AUTHID are valid here).
71 * @param reason Reason passed via BanIdentity().
72 * @param command Command string to identify the ban source.
73 * @param source Source value passed via BanIdentity().
74 * @return Plugin_Handled to block the actual server banning.
76 forward Action:OnBanIdentity(const String:identity[],
79 const String:reason[],
80 const String:command[],
84 * Called for calls to RemoveBan() with a non-empty command.
86 * @param identity Identity string being banned (authstring or ip).
87 * @param flags Ban flags (only IP or AUTHID are valid here).
88 * @param command Command string to identify the ban source.
89 * @param source Source value passed via BanIdentity().
90 * @return Plugin_Handled to block the actual server banning.
92 forward Action:OnRemoveBan(const String:identity[],
94 const String:command[],
100 * @param client Client being banned.
101 * @param time Time (in minutes) to ban (0 = permanent).
102 * @param flags Flags for controlling the ban mechanism. If AUTHID
103 * is set and no AUTHID is available, the ban will fail
104 * unless AUTO is also flagged.
105 * @param reason Reason to ban the client for.
106 * @param kick_message Message to display to the user when kicking.
107 * @param command Command string to identify the source. If this is left
108 * empty, then the OnBanClient forward will not be called.
109 * @param source A source value that could be interpreted as a player
110 * index of any sort (not actually checked by Core).
111 * @return True on success, false on failure.
112 * @error Invalid client index or client not in game.
114 native bool:BanClient(client,
117 const String:reason[],
118 const String:kick_message[]="",
119 const String:command[]="",
123 * Bans an identity (either an IP address or auth string).
125 * @param identity String to ban (ip or authstring).
126 * @param time Time to ban for (0 = permanent).
127 * @param flags Flags (only IP and AUTHID are valid flags here).
128 * @param reason Ban reason string.
129 * @param command Command string to identify the source. If this is left
130 * empty, then the OnBanIdentity forward will not be called.
131 * @param source A source value that could be interpreted as a player
132 * index of any sort (not actually checked by Core).
133 * @return True on success, false on failure.
135 native bool:BanIdentity(const String:identity[],
138 const String:reason[],
139 const String:command[]="",
143 * Removes a ban that was written to the server (either in memory or on disk).
145 * @param identity String to unban (ip or authstring).
146 * @param flags Flags (only IP and AUTHID are valid flags here).
147 * @param command Command string to identify the source. If this is left
148 * empty, then OnRemoveBan will not be called.
149 * @param source A source value that could be interpreted as a player
150 * index of any sort (not actually checked by Core).
151 * @return True on success, false on failure.
153 native bool:RemoveBan(const String:identity[],
155 const String:command[]="",