Kleine fixes

This commit is contained in:
Akamaru 2016-02-16 17:14:28 +01:00
parent 1e283a0311
commit 8412921315
2 changed files with 6 additions and 12 deletions

View File

@ -1,15 +1,9 @@
local function run(msg, matches) local function run(msg, matches)
local base = "http://dogr.io/" local BASE_URL = "http://dogr.io/"
local path = string.gsub(matches[1], " ", "%%20") local path = string.gsub(matches[1], " ", "%%20")
local url = base .. path .. '.png?split=false&.png' local url = BASE_URL..path..'.png?split=false&.png'
local urlm = "https?://[%%%w-_%.%?%.:/%+=&]+"
if string.match(url, urlm) == url then
local receiver = get_receiver(msg) local receiver = get_receiver(msg)
send_photo_from_url(receiver, url) send_photo_from_url(receiver, url)
else
return 'Konnte kein Bild mit "' .. matches[1] .. '" erstellen.'
end
end end
return { return {

View File

@ -159,7 +159,7 @@ local function cron()
else else
content = '' content = ''
end end
text = text..'[RSS] '..title..'\n'..content..'\n\n'..link..'\n\n' text = text..'[#RSS] '..title..'\n'..content..'\n\n'..link..'\n\n'
end end
if text ~= '' then if text ~= '' then
local newlast = newentr[1].id local newlast = newentr[1].id