From f671d02a5bd070b1d1662b6d8fc326c5f1fb0f81 Mon Sep 17 00:00:00 2001 From: Timo Smit Date: Tue, 15 Jan 2019 21:12:33 +0100 Subject: [PATCH] Fixed !rules not displaying correctly when used with arguments --- luascripts/wolfadmin/commands/admin/rules.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/luascripts/wolfadmin/commands/admin/rules.lua b/luascripts/wolfadmin/commands/admin/rules.lua index 66fe807..26ae33e 100644 --- a/luascripts/wolfadmin/commands/admin/rules.lua +++ b/luascripts/wolfadmin/commands/admin/rules.lua @@ -34,10 +34,10 @@ function commandRules(clientId, command, rule) et.trap_SendConsoleCommand(et.EXEC_APPEND, "cchat "..clientId.." \"^drules: ^9"..amountOfRules.." rules (open console for the full list)\";") et.trap_SendConsoleCommand(et.EXEC_APPEND, "csay "..clientId.." \"^9Type ^2!rules ^d[rule] ^9to announce a specific rule.\";") else - local rule = rules.get(string.lower(rule)) + local ruleText = rules.get(string.lower(rule)) - if rule then - et.trap_SendConsoleCommand(et.EXEC_APPEND, "cchat -1 \"^drules: "..rules.get(string.lower(cmdArguments[1])).."\";") + if ruleText then + et.trap_SendConsoleCommand(et.EXEC_APPEND, "cchat -1 \"^drules: "..ruleText.."\";") end end