From e0f53dd20570d768defbf936d292e5b2dc8d4997 Mon Sep 17 00:00:00 2001 From: Andreas Bielawski Date: Wed, 3 Aug 2016 16:58:02 +0200 Subject: [PATCH] =?UTF-8?q?Surrogate=20nur=20f=C3=BCr=20Sudoer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- otouto/plugins/surrogate.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/otouto/plugins/surrogate.lua b/otouto/plugins/surrogate.lua index 8da3ae7..79b1ed7 100644 --- a/otouto/plugins/surrogate.lua +++ b/otouto/plugins/surrogate.lua @@ -6,7 +6,11 @@ surrogate.triggers = { "^/s (@[A-Za-z0-9-_-.-._.]+) +(.+)" } -function surrogate:action(msg) +function surrogate:action(msg, config, matches) + if not is_sudo(msg, config) then + utilities.send_reply(self, msg, config.errors.sudo) + return + end utilities.send_message(self, matches[1], matches[2], true, nil, true) return end