From 2436348e90c3b828751833e92a24449f44d0bb38 Mon Sep 17 00:00:00 2001 From: Akamaru Date: Tue, 16 Jun 2015 21:47:48 +0200 Subject: [PATCH] update rss.lua other text msg when sync removed some patterns --- plugins/rss.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/rss.lua b/plugins/rss.lua index 9ec3552..62181af 100644 --- a/plugins/rss.lua +++ b/plugins/rss.lua @@ -136,7 +136,7 @@ local function cron() for k2, v2 in pairs(newentr) do local title = v2.title or 'No title' local link = v2.link or v2.id or 'No Link' - text = text .. "[rss](" .. link .. ") - " .. title .. '\n' + text = text .. '[RSS] '.. title .. '\n(' .. link .. ')\n' end if text ~= '' then local newlast = newentr[1].id @@ -161,14 +161,16 @@ local function run(msg, matches) if matches[1] == "sync" then if not is_sudo(msg) then return 'Du kannst das nicht' + else + return 'RSS aktualisiert' end cron() end - if matches[1] == "add" or matches[1] == "sub" then + if matches[1] == "add" then return subscribe(id, matches[2]) end - if matches[1] == "remove" or matches[1] == "uns" then + if matches[1] == "remove" then return unsubscribe(id, matches[2]) end end @@ -185,9 +187,7 @@ return { patterns = { "^/rss$", "^/rss (add) (https?://[%w-_%.%?%.:/%+=&]+)$", - "^/rss (sub) (https?://[%w-_%.%?%.:/%+=&]+)$", "^/rss (remove) (%d+)$", - "^/rss (uns) (%d+)$", "^/rss (sync)$" }, run = run,