From 049eff8336a6e04977de7bee823fa3714a1ae4c7 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Mon, 3 Dec 2007 02:27:59 +0000 Subject: [PATCH] fixed amb1233 - sm_psay from server console --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401754 --- plugins/basechat.sp | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/plugins/basechat.sp b/plugins/basechat.sp index 17c803bf..a8ed25f9 100644 --- a/plugins/basechat.sp +++ b/plugins/basechat.sp @@ -317,17 +317,37 @@ public Action:Command_SmPsay(client, args) return Plugin_Handled; decl String:name[64], String:name2[64]; - GetClientName(client, name, sizeof(name)); + + if (client == 0) + { + name = "Console"; + } + else + { + GetClientName(client, name, sizeof(name)); + } + GetClientName(target, name2, sizeof(name2)); - if (g_DoColor) + if (client == 0) + { + PrintToServer("(Private: %s) %s: %s", name2, name, message); + } + else if (g_DoColor) { PrintToChat(client, "\x04(Private: %s) %s: \x01%s", name2, name, message); - PrintToChat(target, "\x04(Private: %s) %s: \x01%s", name2, name, message); } else { PrintToChat(client, "(Private: %s) %s: %s", name2, name, message); + } + + if (g_DoColor) + { + PrintToChat(target, "\x04(Private: %s) %s: \x01%s", name2, name, message); + } + else + { PrintToChat(target, "(Private: %s) %s: %s", name2, name, message); }