From e5fcce9cbea7e340690b14e1bff464a6ff8f305b Mon Sep 17 00:00:00 2001 From: Akamaru Date: Thu, 9 Jun 2016 21:29:23 +0200 Subject: [PATCH] Einfaches Z0R Plugin --- plugins/z0r.lua | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 plugins/z0r.lua diff --git a/plugins/z0r.lua b/plugins/z0r.lua new file mode 100644 index 0000000..1e8ff21 --- /dev/null +++ b/plugins/z0r.lua @@ -0,0 +1,19 @@ +local function run(msg, matches) + local receiver = get_receiver(msg) + local url = 'http://z0r.de/L/z0r-de_'..matches[1]..'.swf' + print("Flash URL: "..url) + send_document_from_url(receiver, url) + if string.match(msg.text, '/[Zz]0[Rr]') then + return 'Source: http://z0r.de/'..matches[1] + else + return + end +end + +return { + description = "Sendet Flashs von Z0R.de", + usage = {"z0r.de URL","/z0r [ID]"}, + patterns = {"https?://z0r.de/([%w-_%.%?%.:,/%+=&#!]+)$","^/[Zz]0[Rr] (.*)$"}, + run = run +} +--by Akamaru [https://ponywave.de] \ No newline at end of file