plugins/basechat.sp
author Scott Ehlert <ds@alliedmods.net>
Wed Jun 11 08:07:17 2008 +0000 (2008-06-11)
changeset 2112 2a83a521287c
parent 1952 b7aa2b626807
child 2218 d45329f70462
permissions -rw-r--r--
All natives that use a recipient filter now actually validate the clients passed to them.
This includes StartMessage(), StartMessageEx() from Core as well as EmitSound(), EmitSentence(), and TE_Send() from SDKTools

(Warning: This may potentially cause a minor compatibility problem with plugins that don't check client validity before passing to these natives)
ds@1952
     1
/**
ds@1952
     2
 * vim: set ts=4 :
ds@1952
     3
 * =============================================================================
ds@1952
     4
 * SourceMod Basic Chat Plugin
ds@1952
     5
 * Implements basic communication commands.
ds@1952
     6
 *
ds@1952
     7
 * SourceMod (C)2004-2008 AlliedModders LLC.  All rights reserved.
ds@1952
     8
 * =============================================================================
ds@1952
     9
 *
ds@1952
    10
 * This program is free software; you can redistribute it and/or modify it under
ds@1952
    11
 * the terms of the GNU General Public License, version 3.0, as published by the
ds@1952
    12
 * Free Software Foundation.
ds@1952
    13
 * 
ds@1952
    14
 * This program is distributed in the hope that it will be useful, but WITHOUT
ds@1952
    15
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
ds@1952
    16
 * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
ds@1952
    17
 * details.
ds@1952
    18
 *
ds@1952
    19
 * You should have received a copy of the GNU General Public License along with
ds@1952
    20
 * this program.  If not, see <http://www.gnu.org/licenses/>.
ds@1952
    21
 *
ds@1952
    22
 * As a special exception, AlliedModders LLC gives you permission to link the
ds@1952
    23
 * code of this program (as well as its derivative works) to "Half-Life 2," the
ds@1952
    24
 * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
ds@1952
    25
 * by the Valve Corporation.  You must obey the GNU General Public License in
ds@1952
    26
 * all respects for all other code used.  Additionally, AlliedModders LLC grants
ds@1952
    27
 * this exception to all derivative works.  AlliedModders LLC defines further
ds@1952
    28
 * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
ds@1952
    29
 * or <http://www.sourcemod.net/license.php>.
ds@1952
    30
 *
ds@1952
    31
 * Version: $Id$
ds@1952
    32
 */
ds@1952
    33
ds@1952
    34
#pragma semicolon 1
ds@1952
    35
ds@1952
    36
#include <sourcemod>
ds@1952
    37
ds@1952
    38
public Plugin:myinfo = 
ds@1952
    39
{
ds@1952
    40
	name = "Basic Chat",
ds@1952
    41
	author = "AlliedModders LLC",
ds@1952
    42
	description = "Basic Communication Commands",
ds@1952
    43
	version = SOURCEMOD_VERSION,
ds@1952
    44
	url = "http://www.sourcemod.net/"
ds@1952
    45
};
ds@1952
    46
ds@1952
    47
#define CHAT_SYMBOL '@'
ds@1952
    48
ds@1952
    49
new String:g_ColorNames[13][10] = {"White", "Red", "Green", "Blue", "Yellow", "Purple", "Cyan", "Orange", "Pink", "Olive", "Lime", "Violet", "Lightblue"};
ds@1952
    50
new g_Colors[13][3] = {{255,255,255},{255,0,0},{0,255,0},{0,0,255},{255,255,0},{255,0,255},{0,255,255},{255,128,0},{255,0,128},{128,255,0},{0,255,128},{128,0,255},{0,128,255}};
ds@1952
    51
ds@1952
    52
new Handle:g_Cvar_Chatmode = INVALID_HANDLE;
ds@1952
    53
ds@1952
    54
new bool:g_DoColor = true;
ds@1952
    55
ds@1952
    56
public OnPluginStart()
ds@1952
    57
{
ds@1952
    58
	LoadTranslations("common.phrases");
ds@1952
    59
ds@1952
    60
	g_Cvar_Chatmode = CreateConVar("sm_chat_mode", "1", "Allows player's to send messages to admin chat.", 0, true, 0.0, true, 1.0);
ds@1952
    61
ds@1952
    62
	RegConsoleCmd("say", Command_SayChat);
ds@1952
    63
	RegConsoleCmd("say_team", Command_SayAdmin);		
ds@1952
    64
	RegAdminCmd("sm_say", Command_SmSay, ADMFLAG_CHAT, "sm_say <message> - sends message to all players");
ds@1952
    65
	RegAdminCmd("sm_csay", Command_SmCsay, ADMFLAG_CHAT, "sm_csay <message> - sends centered message to all players");
ds@1952
    66
	RegAdminCmd("sm_hsay", Command_SmHsay, ADMFLAG_CHAT, "sm_hsay <message> - sends hint message to all players");
ds@1952
    67
	RegAdminCmd("sm_tsay", Command_SmTsay, ADMFLAG_CHAT, "sm_tsay [color] <message> - sends top-left message to all players");
ds@1952
    68
	RegAdminCmd("sm_chat", Command_SmChat, ADMFLAG_CHAT, "sm_chat <message> - sends message to admins");
ds@1952
    69
	RegAdminCmd("sm_psay", Command_SmPsay, ADMFLAG_CHAT, "sm_psay <name or #userid> <message> - sends private message");
ds@1952
    70
	RegAdminCmd("sm_msay", Command_SmMsay, ADMFLAG_CHAT, "sm_msay <message> - sends message as a menu panel");
ds@1952
    71
	
ds@1952
    72
	decl String:modname[64];
ds@1952
    73
	GetGameFolderName(modname, sizeof(modname));
ds@1952
    74
	
ds@1952
    75
	if (strcmp(modname, "hl2mp") == 0)
ds@1952
    76
	{
ds@1952
    77
		g_DoColor = false;
ds@1952
    78
	}
ds@1952
    79
}
ds@1952
    80
ds@1952
    81
public Action:Command_SayChat(client, args)
ds@1952
    82
{	
ds@1952
    83
	decl String:text[192];
ds@1952
    84
	if (IsChatTrigger() || GetCmdArgString(text, sizeof(text)) < 1)
ds@1952
    85
	{
ds@1952
    86
		return Plugin_Continue;
ds@1952
    87
	}
ds@1952
    88
	
ds@1952
    89
	new startidx;
ds@1952
    90
	if (text[strlen(text)-1] == '"')
ds@1952
    91
	{
ds@1952
    92
		text[strlen(text)-1] = '\0';
ds@1952
    93
		startidx = 1;
ds@1952
    94
	}
ds@1952
    95
	
ds@1952
    96
	if (text[startidx] != CHAT_SYMBOL)
ds@1952
    97
		return Plugin_Continue;
ds@1952
    98
	
ds@1952
    99
	new msgStart = 1;
ds@1952
   100
	
ds@1952
   101
	if (text[startidx+1] == CHAT_SYMBOL)
ds@1952
   102
	{
ds@1952
   103
		msgStart = 2;
ds@1952
   104
		
ds@1952
   105
		if (text[startidx+2] == CHAT_SYMBOL)
ds@1952
   106
			msgStart = 3;
ds@1952
   107
	}
ds@1952
   108
	
ds@1952
   109
	decl String:message[192];
ds@1952
   110
	strcopy(message, 192, text[startidx+msgStart]);
ds@1952
   111
	
ds@1952
   112
	decl String:name[64];
ds@1952
   113
	GetClientName(client, name, sizeof(name));
ds@1952
   114
	
ds@1952
   115
	if (msgStart == 1 && CheckCommandAccess(client, "sm_say", ADMFLAG_CHAT)) // sm_say alias
ds@1952
   116
	{
ds@1952
   117
		SendChatToAll(name, message);
ds@1952
   118
		LogAction(client, -1, "%L triggered sm_say (text %s)", client, message);
ds@1952
   119
	}
ds@1952
   120
	else if (msgStart == 3 && CheckCommandAccess(client, "sm_csay", ADMFLAG_CHAT)) // sm_csay alias
ds@1952
   121
	{
ds@1952
   122
		PrintCenterTextAll("%s: %s", name, message);
ds@1952
   123
		LogAction(client, -1, "%L triggered sm_csay (text %s)", client, text);		
ds@1952
   124
	}	
ds@1952
   125
	else if (msgStart == 2 && CheckCommandAccess(client, "sm_psay", ADMFLAG_CHAT)) // sm_psay alias
ds@1952
   126
	{
ds@1952
   127
		decl String:arg[64];
ds@1952
   128
	
ds@1952
   129
		new len = BreakString(message, arg, sizeof(arg));
ds@1952
   130
		new target = FindTarget(client, arg, true, false);
ds@1952
   131
		
ds@1952
   132
		if (target == -1)
ds@1952
   133
			return Plugin_Handled;
ds@1952
   134
		
ds@1952
   135
		decl String:name2[64];
ds@1952
   136
		GetClientName(target, name2, sizeof(name2));
ds@1952
   137
	
ds@1952
   138
		if (g_DoColor)
ds@1952
   139
		{
ds@1952
   140
			PrintToChat(client, "\x04(Private to %s) %s: \x01%s", name2, name, message[len]);
ds@1952
   141
			PrintToChat(target, "\x04(Private to %s) %s: \x01%s", name2, name, message[len]);
ds@1952
   142
		}
ds@1952
   143
		else
ds@1952
   144
		{
ds@1952
   145
			PrintToChat(client, "(Private to %s) %s: %s", name2, name, message[len]);
ds@1952
   146
			PrintToChat(target, "(Private to %s) %s: %s", name2, name, message[len]);			
ds@1952
   147
		}
ds@1952
   148
ds@1952
   149
		LogAction(client, -1, "%L triggered sm_psay to %L (text %s)", client, target, message);		
ds@1952
   150
	}
ds@1952
   151
	else
ds@1952
   152
		return Plugin_Continue;
ds@1952
   153
	
ds@1952
   154
	return Plugin_Handled;	
ds@1952
   155
}
ds@1952
   156
ds@1952
   157
public Action:Command_SayAdmin(client, args)
ds@1952
   158
{
ds@1952
   159
	if (!CheckCommandAccess(client, "sm_chat", ADMFLAG_CHAT) && !GetConVarBool(g_Cvar_Chatmode))
ds@1952
   160
	{
ds@1952
   161
		return Plugin_Continue;	
ds@1952
   162
	}
ds@1952
   163
	
ds@1952
   164
	decl String:text[192];
ds@1952
   165
	if (IsChatTrigger() || GetCmdArgString(text, sizeof(text)) < 1)
ds@1952
   166
	{
ds@1952
   167
		return Plugin_Continue;
ds@1952
   168
	}
ds@1952
   169
	
ds@1952
   170
	new startidx;
ds@1952
   171
	if (text[strlen(text)-1] == '"')
ds@1952
   172
	{
ds@1952
   173
		text[strlen(text)-1] = '\0';
ds@1952
   174
		startidx = 1;
ds@1952
   175
	}
ds@1952
   176
	
ds@1952
   177
	if (text[startidx] != CHAT_SYMBOL)
ds@1952
   178
		return Plugin_Continue;
ds@1952
   179
	
ds@1952
   180
	decl String:message[192];
ds@1952
   181
	strcopy(message, 192, text[startidx+1]);
ds@1952
   182
ds@1952
   183
	decl String:name[64];
ds@1952
   184
	GetClientName(client, name, sizeof(name));
ds@1952
   185
	
ds@1952
   186
	SendChatToAdmins(name, message);
ds@1952
   187
	LogAction(client, -1, "%L triggered sm_chat (text %s)", client, message);
ds@1952
   188
	
ds@1952
   189
	return Plugin_Handled;	
ds@1952
   190
}
ds@1952
   191
ds@1952
   192
public Action:Command_SmSay(client, args)
ds@1952
   193
{
ds@1952
   194
	if (args < 1)
ds@1952
   195
	{
ds@1952
   196
		ReplyToCommand(client, "[SM] Usage: sm_say <message>");
ds@1952
   197
		return Plugin_Handled;	
ds@1952
   198
	}
ds@1952
   199
	
ds@1952
   200
	decl String:text[192];
ds@1952
   201
	GetCmdArgString(text, sizeof(text));
ds@1952
   202
ds@1952
   203
	decl String:name[64];
ds@1952
   204
	GetClientName(client, name, sizeof(name));
ds@1952
   205
			
ds@1952
   206
	SendChatToAll(name, text);
ds@1952
   207
	LogAction(client, -1, "%L triggered sm_say (text %s)", client, text);
ds@1952
   208
	
ds@1952
   209
	return Plugin_Handled;		
ds@1952
   210
}
ds@1952
   211
ds@1952
   212
public Action:Command_SmCsay(client, args)
ds@1952
   213
{
ds@1952
   214
	if (args < 1)
ds@1952
   215
	{
ds@1952
   216
		ReplyToCommand(client, "[SM] Usage: sm_csay <message>");
ds@1952
   217
		return Plugin_Handled;	
ds@1952
   218
	}
ds@1952
   219
	
ds@1952
   220
	decl String:text[192];
ds@1952
   221
	GetCmdArgString(text, sizeof(text));
ds@1952
   222
ds@1952
   223
	new String:name[64];
ds@1952
   224
	GetClientName(client, name, sizeof(name));
ds@1952
   225
	
ds@1952
   226
	PrintCenterTextAll("%s: %s", name, text);
ds@1952
   227
	LogAction(client, -1, "%L triggered sm_csay (text %s)", client, text);
ds@1952
   228
	
ds@1952
   229
	return Plugin_Handled;		
ds@1952
   230
}
ds@1952
   231
ds@1952
   232
public Action:Command_SmHsay(client, args)
ds@1952
   233
{
ds@1952
   234
	if (args < 1)
ds@1952
   235
	{
ds@1952
   236
		ReplyToCommand(client, "[SM] Usage: sm_hsay <message>");
ds@1952
   237
		return Plugin_Handled;  
ds@1952
   238
	}
ds@1952
   239
    
ds@1952
   240
	decl String:text[192];
ds@1952
   241
	GetCmdArgString(text, sizeof(text));
ds@1952
   242
 
ds@1952
   243
	decl String:name[64];
ds@1952
   244
	GetClientName(client, name, sizeof(name));
ds@1952
   245
    
ds@1952
   246
	PrintHintTextToAll("%s: %s", name, text);
ds@1952
   247
	LogAction(client, -1, "%L triggered sm_hsay (text %s)", client, text);
ds@1952
   248
    
ds@1952
   249
	return Plugin_Handled;    
ds@1952
   250
}
ds@1952
   251
ds@1952
   252
public Action:Command_SmTsay(client, args)
ds@1952
   253
{
ds@1952
   254
	if (args < 1)
ds@1952
   255
	{
ds@1952
   256
		ReplyToCommand(client, "[SM] Usage: sm_tsay <message>");
ds@1952
   257
		return Plugin_Handled;  
ds@1952
   258
	}
ds@1952
   259
    
ds@1952
   260
	decl String:text[192], String:colorStr[16];
ds@1952
   261
	GetCmdArgString(text, sizeof(text));
ds@1952
   262
	
ds@1952
   263
	new len = BreakString(text, colorStr, 16);
ds@1952
   264
 
ds@1952
   265
	decl String:name[64];
ds@1952
   266
	GetClientName(client, name, sizeof(name));
ds@1952
   267
		
ds@1952
   268
	new color = FindColor(colorStr);
ds@1952
   269
ds@1952
   270
	if (color == -1)    
ds@1952
   271
		SendDialogToAll(_, "%s: %s", name, text);
ds@1952
   272
	else
ds@1952
   273
		SendDialogToAll(color, "%s: %s", name, text[len]);
ds@1952
   274
ds@1952
   275
	LogAction(client, -1, "%L triggered sm_tsay (text %s)", client, text);
ds@1952
   276
    
ds@1952
   277
	return Plugin_Handled;    
ds@1952
   278
}
ds@1952
   279
ds@1952
   280
public Action:Command_SmChat(client, args)
ds@1952
   281
{
ds@1952
   282
	if (args < 1)
ds@1952
   283
	{
ds@1952
   284
		ReplyToCommand(client, "[SM] Usage: sm_chat <message>");
ds@1952
   285
		return Plugin_Handled;	
ds@1952
   286
	}	
ds@1952
   287
	
ds@1952
   288
	decl String:text[192];
ds@1952
   289
	GetCmdArgString(text, sizeof(text));
ds@1952
   290
ds@1952
   291
	decl String:name[64];
ds@1952
   292
	GetClientName(client, name, sizeof(name));
ds@1952
   293
	
ds@1952
   294
	SendChatToAdmins(name, text);
ds@1952
   295
	LogAction(client, -1, "%L triggered sm_chat (text %s)", client, text);
ds@1952
   296
	
ds@1952
   297
	return Plugin_Handled;	
ds@1952
   298
}
ds@1952
   299
ds@1952
   300
public Action:Command_SmPsay(client, args)
ds@1952
   301
{
ds@1952
   302
	if (args < 2)
ds@1952
   303
	{
ds@1952
   304
		ReplyToCommand(client, "[SM] Usage: sm_psay <name or #userid> <message>");
ds@1952
   305
		return Plugin_Handled;	
ds@1952
   306
	}	
ds@1952
   307
	
ds@1952
   308
	decl String:text[192], String:arg[64], String:message[192];
ds@1952
   309
	GetCmdArgString(text, sizeof(text));
ds@1952
   310
ds@1952
   311
	new len = BreakString(text, arg, sizeof(arg));
ds@1952
   312
	BreakString(text[len], message, sizeof(message));
ds@1952
   313
	
ds@1952
   314
	new target = FindTarget(client, arg, true, false);
ds@1952
   315
		
ds@1952
   316
	if (target == -1)
ds@1952
   317
		return Plugin_Handled;	
ds@1952
   318
		
ds@1952
   319
	decl String:name[64], String:name2[64];
ds@1952
   320
ds@1952
   321
	if (client == 0)
ds@1952
   322
	{
ds@1952
   323
		name = "Console";
ds@1952
   324
	}
ds@1952
   325
	else
ds@1952
   326
	{
ds@1952
   327
		GetClientName(client, name, sizeof(name));
ds@1952
   328
	}
ds@1952
   329
ds@1952
   330
	GetClientName(target, name2, sizeof(name2));
ds@1952
   331
ds@1952
   332
	if (client == 0)
ds@1952
   333
	{
ds@1952
   334
		PrintToServer("(Private: %s) %s: %s", name2, name, message);
ds@1952
   335
	}
ds@1952
   336
	else if (g_DoColor)
ds@1952
   337
	{
ds@1952
   338
		PrintToChat(client, "\x04(Private: %s) %s: \x01%s", name2, name, message);
ds@1952
   339
	}
ds@1952
   340
	else
ds@1952
   341
	{
ds@1952
   342
		PrintToChat(client, "(Private: %s) %s: %s", name2, name, message);
ds@1952
   343
	}
ds@1952
   344
ds@1952
   345
	if (g_DoColor)
ds@1952
   346
	{
ds@1952
   347
		PrintToChat(target, "\x04(Private: %s) %s: \x01%s", name2, name, message);
ds@1952
   348
	}
ds@1952
   349
	else
ds@1952
   350
	{
ds@1952
   351
		PrintToChat(target, "(Private: %s) %s: %s", name2, name, message);		
ds@1952
   352
	}
ds@1952
   353
ds@1952
   354
	LogAction(client, -1, "%L triggered sm_psay to %L (text %s)", client, target, message);
ds@1952
   355
	
ds@1952
   356
	return Plugin_Handled;	
ds@1952
   357
}
ds@1952
   358
ds@1952
   359
public Action:Command_SmMsay(client, args)
ds@1952
   360
{
ds@1952
   361
	if (args < 1)
ds@1952
   362
	{
ds@1952
   363
		ReplyToCommand(client, "[SM] Usage: sm_msay <message>");
ds@1952
   364
		return Plugin_Handled;	
ds@1952
   365
	}
ds@1952
   366
	
ds@1952
   367
	decl String:text[192];
ds@1952
   368
	GetCmdArgString(text, sizeof(text));
ds@1952
   369
ds@1952
   370
	decl String:name[64];
ds@1952
   371
	GetClientName(client, name, sizeof(name));
ds@1952
   372
		
ds@1952
   373
	SendPanelToAll(name, text);
ds@1952
   374
ds@1952
   375
	LogAction(client, -1, "%L triggered sm_msay (text %s)", client, text);
ds@1952
   376
	
ds@1952
   377
	return Plugin_Handled;		
ds@1952
   378
}
ds@1952
   379
ds@1952
   380
FindColor(String:color[])
ds@1952
   381
{
ds@1952
   382
	for (new i = 0; i < 13; i++)
ds@1952
   383
	{
ds@1952
   384
		if (strcmp(color, g_ColorNames[i], false) == 0)
ds@1952
   385
			return i;
ds@1952
   386
	}
ds@1952
   387
	
ds@1952
   388
	return -1;
ds@1952
   389
}
ds@1952
   390
ds@1952
   391
SendChatToAll(String:name[], String:message[])
ds@1952
   392
{
ds@1952
   393
	if (g_DoColor)
ds@1952
   394
	{
ds@1952
   395
		PrintToChatAll("\x04(ALL) %s: \x01%s", name, message);
ds@1952
   396
	}
ds@1952
   397
	else
ds@1952
   398
	{
ds@1952
   399
		PrintToChatAll("(ALL) %s: %s", name, message);
ds@1952
   400
	}
ds@1952
   401
}
ds@1952
   402
ds@1952
   403
SendChatToAdmins(String:name[], String:message[])
ds@1952
   404
{
ds@1952
   405
	new iMaxClients = GetMaxClients();
ds@1952
   406
	
ds@1952
   407
	for (new i = 1; i <= iMaxClients; i++)
ds@1952
   408
	{
ds@1952
   409
		if (IsClientInGame(i))
ds@1952
   410
		{
ds@1952
   411
			if (CheckCommandAccess(i, "sm_chat", ADMFLAG_CHAT))
ds@1952
   412
			{
ds@1952
   413
				if (g_DoColor)
ds@1952
   414
				{
ds@1952
   415
					PrintToChat(i, "\x04(ADMINS) %s: \x01%s", name, message);
ds@1952
   416
				}
ds@1952
   417
				else
ds@1952
   418
				{
ds@1952
   419
					PrintToChat(i, "(ADMINS) %s: %s", name, message);
ds@1952
   420
				}
ds@1952
   421
			}
ds@1952
   422
		}	
ds@1952
   423
	}
ds@1952
   424
}
ds@1952
   425
ds@1952
   426
SendDialogToAll(color = 0, String:text[], any:...)
ds@1952
   427
{
ds@1952
   428
	new String:message[100];
ds@1952
   429
	VFormat(message, sizeof(message), text, 3);	
ds@1952
   430
	
ds@1952
   431
	new MaxClients = GetMaxClients();
ds@1952
   432
	for(new i = 1; i < MaxClients; i++)
ds@1952
   433
	{
ds@1952
   434
		if(IsClientInGame(i))
ds@1952
   435
		{
ds@1952
   436
			new Handle:kv = CreateKeyValues("Stuff", "title", message);
ds@1952
   437
			KvSetColor(kv, "color", g_Colors[color][0], g_Colors[color][1], g_Colors[color][2], 255);
ds@1952
   438
			KvSetNum(kv, "level", 1);
ds@1952
   439
			KvSetNum(kv, "time", 10);
ds@1952
   440
			
ds@1952
   441
			CreateDialog(i, kv, DialogType_Msg);
ds@1952
   442
			
ds@1952
   443
			CloseHandle(kv);
ds@1952
   444
		}
ds@1952
   445
	}	
ds@1952
   446
}
ds@1952
   447
ds@1952
   448
SendPanelToAll(String:name[], String:message[])
ds@1952
   449
{
ds@1952
   450
	decl String:title[100];
ds@1952
   451
	Format(title, 64, "%s:", name);
ds@1952
   452
	
ds@1952
   453
	ReplaceString(message, 192, "\\n", "\n");
ds@1952
   454
	
ds@1952
   455
	new Handle:mSayPanel = CreatePanel();
ds@1952
   456
	SetPanelTitle(mSayPanel, title);
ds@1952
   457
	DrawPanelItem(mSayPanel, "", ITEMDRAW_SPACER);
ds@1952
   458
	DrawPanelText(mSayPanel, message);
ds@1952
   459
	DrawPanelItem(mSayPanel, "", ITEMDRAW_SPACER);
ds@1952
   460
ds@1952
   461
	SetPanelCurrentKey(mSayPanel, 10);
ds@1952
   462
	DrawPanelItem(mSayPanel, "Exit", ITEMDRAW_CONTROL);
ds@1952
   463
ds@1952
   464
	new MaxClients = GetMaxClients();
ds@1952
   465
	for(new i = 1; i < MaxClients; i++)
ds@1952
   466
	{
ds@1952
   467
		if(IsClientInGame(i) && !IsFakeClient(i))
ds@1952
   468
		{
ds@1952
   469
			SendPanelToClient(mSayPanel, i, Handler_DoNothing, 10);
ds@1952
   470
		}
ds@1952
   471
	}
ds@1952
   472
ds@1952
   473
	CloseHandle(mSayPanel);
ds@1952
   474
}
ds@1952
   475
ds@1952
   476
public Handler_DoNothing(Handle:menu, MenuAction:action, param1, param2)
ds@1952
   477
{
ds@1952
   478
	/* Do nothing */
ds@1952
   479
}