From 3027d4984767e0d6996f71449605c90117bdf276 Mon Sep 17 00:00:00 2001 From: Timo Smit Date: Tue, 14 Apr 2020 17:16:09 +0200 Subject: [PATCH] Fixed personal messaging commands toggle for mods other than Legacy --- luascripts/wolfadmin/commands/client/pm.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/luascripts/wolfadmin/commands/client/pm.lua b/luascripts/wolfadmin/commands/client/pm.lua index 89e375e..7e75bdb 100644 --- a/luascripts/wolfadmin/commands/client/pm.lua +++ b/luascripts/wolfadmin/commands/client/pm.lua @@ -40,10 +40,10 @@ function commandPersonalMessage(clientId, command, recipient, ...) end end end -commands.addclient("pm", commandPersonalMessage, "", "", true, (settings.get("fs_game") ~= "legacy")) -commands.addclient("m", commandPersonalMessage, "", "", true, (settings.get("fs_game") ~= "legacy")) +commands.addclient("pm", commandPersonalMessage, "", "", true, (settings.get("fs_game") == "legacy")) +commands.addclient("m", commandPersonalMessage, "", "", true, (settings.get("fs_game") == "legacy")) -function commandPersonalMessage(clientId, command, target, ...) +function commandPersonalMessageLegacy(clientId, command, target, ...) if not target or not ... then et.trap_SendConsoleCommand(et.EXEC_APPEND, "csay "..clientId.." \"^9usage: "..commands.getclient("pm")["syntax"].."\";") @@ -91,5 +91,5 @@ function commandPersonalMessage(clientId, command, target, ...) return true end -commands.addclient("pm", commandPersonalMessage, "", "[^2name^7|^2slot#^7] [^2message^7]", true, (settings.get("fs_game") ~= "legacy")) -commands.addclient("m", commandPersonalMessage, "", "[^2name^7|^2slot#^7] [^2message^7]", true, (settings.get("fs_game") ~= "legacy")) +commands.addclient("pm", commandPersonalMessageLegacy, "", "[^2name^7|^2slot#^7] [^2message^7]", true, (settings.get("fs_game") ~= "legacy")) +commands.addclient("m", commandPersonalMessageLegacy, "", "[^2name^7|^2slot#^7] [^2message^7]", true, (settings.get("fs_game") ~= "legacy"))