rss only for privileged user

This commit is contained in:
Akamaru 2015-07-09 13:08:23 +02:00
parent caf6a7aa2d
commit b2ea23bfb2

View File

@ -136,7 +136,7 @@ local function cron()
for k2, v2 in pairs(newentr) do for k2, v2 in pairs(newentr) do
local title = v2.title or 'No title' local title = v2.title or 'No title'
local link = v2.link or v2.id or 'No Link' local link = v2.link or v2.id or 'No Link'
text = text .. '[RSS] '.. title .. '\n(' .. link .. ')\n' text = text .. '[RSS] '.. title .. '\n(' .. link .. ')\n\n'
end end
if text ~= '' then if text ~= '' then
local newlast = newentr[1].id local newlast = newentr[1].id
@ -159,9 +159,6 @@ local function run(msg, matches)
return print_subs(id) return print_subs(id)
end end
if matches[1] == "sync" then if matches[1] == "sync" then
if not is_sudo(msg) then
return 'Du kannst das nicht'
end
cron() cron()
end end
if matches[1] == "add" then if matches[1] == "add" then
@ -189,5 +186,6 @@ return {
"^/rss (sync)$" "^/rss (sync)$"
}, },
run = run, run = run,
cron = cron cron = cron,
privileged = true
} }