1.1 --- a/plugins/basechat.sp Sun Jan 10 17:38:03 2010 -0800
1.2 +++ b/plugins/basechat.sp Sun Jan 10 17:47:11 2010 -0800
1.3 @@ -51,8 +51,6 @@
1.4
1.5 new Handle:g_Cvar_Chatmode = INVALID_HANDLE;
1.6
1.7 -new bool:g_DoColor = true;
1.8 -
1.9 new g_GameEngine = SOURCE_SDK_UNKNOWN;
1.10
1.11 public OnPluginStart()
1.12 @@ -78,14 +76,6 @@
1.13 RegAdminCmd("sm_chat", Command_SmChat, ADMFLAG_CHAT, "sm_chat <message> - sends message to admins");
1.14 RegAdminCmd("sm_psay", Command_SmPsay, ADMFLAG_CHAT, "sm_psay <name or #userid> <message> - sends private message");
1.15 RegAdminCmd("sm_msay", Command_SmMsay, ADMFLAG_CHAT, "sm_msay <message> - sends message as a menu panel");
1.16 -
1.17 - decl String:modname[64];
1.18 - GetGameFolderName(modname, sizeof(modname));
1.19 -
1.20 - if (strcmp(modname, "hl2mp") == 0)
1.21 - {
1.22 - g_DoColor = false;
1.23 - }
1.24 }
1.25
1.26 public Action:Command_SayChat(client, args)
1.27 @@ -125,12 +115,12 @@
1.28 if (msgStart == 1 && CheckCommandAccess(client, "sm_say", ADMFLAG_CHAT)) // sm_say alias
1.29 {
1.30 SendChatToAll(client, message);
1.31 - LogAction(client, -1, "%L triggered sm_say (text %s)", client, message);
1.32 + LogAction(client, -1, "\"%L\" triggered sm_say (text %s)", client, message);
1.33 }
1.34 else if (msgStart == 3 && CheckCommandAccess(client, "sm_csay", ADMFLAG_CHAT)) // sm_csay alias
1.35 {
1.36 DisplayCenterTextToAll(client, message);
1.37 - LogAction(client, -1, "%L triggered sm_csay (text %s)", client, text);
1.38 + LogAction(client, -1, "\"%L\" triggered sm_csay (text %s)", client, text);
1.39 }
1.40 else if (msgStart == 2 && CheckCommandAccess(client, "sm_psay", ADMFLAG_CHAT)) // sm_psay alias
1.41 {
1.42 @@ -156,7 +146,7 @@
1.43 PrintToChat(target, "(Private to %s) %s: %s", name2, name, message[len]);
1.44 }
1.45
1.46 - LogAction(client, -1, "%L triggered sm_psay to %L (text %s)", client, target, message);
1.47 + LogAction(client, -1, "\"%L\" triggered sm_psay to \"%L\" (text %s)", client, target, message);
1.48 }
1.49 else
1.50 return Plugin_Continue;
1.51 @@ -191,7 +181,7 @@
1.52 strcopy(message, 192, text[startidx+1]);
1.53
1.54 SendChatToAdmins(client, message);
1.55 - LogAction(client, -1, "%L triggered sm_chat (text %s)", client, message);
1.56 + LogAction(client, -1, "\"%L\" triggered sm_chat (text %s)", client, message);
1.57
1.58 return Plugin_Handled;
1.59 }
1.60 @@ -208,7 +198,7 @@
1.61 GetCmdArgString(text, sizeof(text));
1.62
1.63 SendChatToAll(client, text);
1.64 - LogAction(client, -1, "%L triggered sm_say (text %s)", client, text);
1.65 + LogAction(client, -1, "\"%L\" triggered sm_say (text %s)", client, text);
1.66
1.67 return Plugin_Handled;
1.68 }
1.69 @@ -226,7 +216,7 @@
1.70
1.71 DisplayCenterTextToAll(client, text);
1.72
1.73 - LogAction(client, -1, "%L triggered sm_csay (text %s)", client, text);
1.74 + LogAction(client, -1, "\"%L\" triggered sm_csay (text %s)", client, text);
1.75
1.76 return Plugin_Handled;
1.77 }
1.78 @@ -254,7 +244,7 @@
1.79 PrintHintText(i, "%s: %s", nameBuf, text);
1.80 }
1.81
1.82 - LogAction(client, -1, "%L triggered sm_hsay (text %s)", client, text);
1.83 + LogAction(client, -1, "\"%L\" triggered sm_hsay (text %s)", client, text);
1.84
1.85 return Plugin_Handled;
1.86 }
1.87 @@ -294,7 +284,7 @@
1.88 SendDialogToOne(i, color, "%s: %s", nameBuf, text[len]);
1.89 }
1.90
1.91 - LogAction(client, -1, "%L triggered sm_tsay (text %s)", client, text);
1.92 + LogAction(client, -1, "\"%L\" triggered sm_tsay (text %s)", client, text);
1.93
1.94 return Plugin_Handled;
1.95 }
1.96 @@ -311,7 +301,7 @@
1.97 GetCmdArgString(text, sizeof(text));
1.98
1.99 SendChatToAdmins(client, text);
1.100 - LogAction(client, -1, "%L triggered sm_chat (text %s)", client, text);
1.101 + LogAction(client, -1, "\"%L\" triggered sm_chat (text %s)", client, text);
1.102
1.103 return Plugin_Handled;
1.104 }
1.105 @@ -370,7 +360,7 @@
1.106 PrintToChat(target, "(Private: %s) %s: %s", name2, name, message);
1.107 }
1.108
1.109 - LogAction(client, -1, "%L triggered sm_psay to %L (text %s)", client, target, message);
1.110 + LogAction(client, -1, "\"%L\" triggered sm_psay to \"%L\" (text %s)", client, target, message);
1.111
1.112 return Plugin_Handled;
1.113 }
1.114 @@ -391,7 +381,7 @@
1.115
1.116 SendPanelToAll(name, text);
1.117
1.118 - LogAction(client, -1, "%L triggered sm_msay (text %s)", client, text);
1.119 + LogAction(client, -1, "\"%L\" triggered sm_msay (text %s)", client, text);
1.120
1.121 return Plugin_Handled;
1.122 }
1.123 @@ -419,14 +409,7 @@
1.124 }
1.125 FormatActivitySource(client, i, nameBuf, sizeof(nameBuf));
1.126
1.127 - if (g_DoColor)
1.128 - {
1.129 - PrintToChat(i, "\x04(ALL) %s: \x01%s", nameBuf, message);
1.130 - }
1.131 - else
1.132 - {
1.133 - PrintToChat(i, "%s: %s", nameBuf, message);
1.134 - }
1.135 + PrintToChat(i, "\x04(ALL) %s: \x01%s", nameBuf, message);
1.136 }
1.137 }
1.138
1.139 @@ -452,14 +435,7 @@
1.140 {
1.141 if (IsClientInGame(i) && (from == i || CheckCommandAccess(i, "sm_chat", ADMFLAG_CHAT)))
1.142 {
1.143 - if (g_DoColor)
1.144 - {
1.145 - PrintToChat(i, "\x04(%sADMINS) %N: \x01%s", fromAdmin ? "" : "TO ", from, message);
1.146 - }
1.147 - else
1.148 - {
1.149 - PrintToChat(i, "(%sADMINS) %N: %s", fromAdmin ? "" : "TO ", from, message);
1.150 - }
1.151 + PrintToChat(i, "\x04(%sADMINS) %N: \x01%s", fromAdmin ? "" : "TO ", from, message);
1.152 }
1.153 }
1.154 }