From b428d59b1f70070e704dde3c8a186bbb8cdefa39 Mon Sep 17 00:00:00 2001 From: Andreas Bielawski Date: Thu, 6 Oct 2016 14:48:38 +0200 Subject: [PATCH] =?UTF-8?q?Verbessere=20Plugin=20f=C3=BCr=20Fefes=20Blog?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- otouto/plugins/fefe.lua | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/otouto/plugins/fefe.lua b/otouto/plugins/fefe.lua index eb69fcb..5211a3b 100644 --- a/otouto/plugins/fefe.lua +++ b/otouto/plugins/fefe.lua @@ -5,7 +5,7 @@ fefe.triggers = { } function fefe:post(id) - local url = 'http://'..id + local url = 'https://'..id local results, code = https.request(url) if code ~= 200 then return "HTTP-Fehler" end if string.match(results, "No entries found.") then return "Eintrag nicht gefunden." end @@ -16,17 +16,14 @@ function fefe:post(id) local text = text:gsub("
  • %[l]", "") -- replace "

    " with newline; "" and "" with "*" local text = text:gsub("

    ", "\n\n"):gsub("

    ", "\n\n") - local text = text:gsub("", "*"):gsub("", "*") - local text = text:gsub("", "_"):gsub("", "_") -- format quotes and links markdown-like - local text = text:gsub("", ")["):gsub("", "]") local text = text:gsub("

    ", "\n\n> "):gsub("
    ", "\n\n") return text end function fefe:action(msg, config, matches) - utilities.send_reply(msg, fefe:post(matches[1])) + utilities.send_reply(msg, fefe:post(matches[1]), 'HTML') end -return fefe +return fefe \ No newline at end of file