From 8a6fbfdd0b44f64356e14abffa920682438a0cf9 Mon Sep 17 00:00:00 2001 From: Akamaru Date: Tue, 2 Feb 2016 16:13:57 +0100 Subject: [PATCH] =?UTF-8?q?/rev=20Command=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/flip_text.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/plugins/flip_text.lua b/plugins/flip_text.lua index 41c22ba..a390dbf 100644 --- a/plugins/flip_text.lua +++ b/plugins/flip_text.lua @@ -4,16 +4,20 @@ function run(msg, matches) local receiver = get_receiver(msg) if string.match(msg.text, '"') then return 'Vergiss es' - else + elseif string.match(msg.text, '/flip') then local text = run_bash('flip "' .. text .. '"') send_msg(receiver, text, ok_cb, false) + elseif string.match(msg.text, '/rev') then + local text = run_bash('echo "' .. text .. '" | rev') + send_msg(receiver, text, ok_cb, false) end end return { description = "", usage = {""}, - patterns = {"^/flip (.*)$"}, + patterns = {"^/flip (.*)$", + "^/rev (.*)"}, run = run } --by Akamaru [https://ponywave.de] \ No newline at end of file