diff --git a/miku/plugins/get_txt.lua b/miku/plugins/get_txt.lua index 2c8599e..225d036 100644 --- a/miku/plugins/get_txt.lua +++ b/miku/plugins/get_txt.lua @@ -15,7 +15,12 @@ function get_txt:action(msg, config, matches) utilities.send_reply(msg, config.errors.connection) return end - utilities.send_reply(msg, res) + if string.len(res) > 500 then + result = string.sub(res:gsub("%b<>", ""), 1, 500)..'...\n(Text gekürzt, da länger als 500 Zeichen.)' + else + result = res + end + utilities.send_reply(msg, result) end return get_txt \ No newline at end of file diff --git a/miku/plugins/rss.lua b/miku/plugins/rss.lua index 3ea8ab4..baed4ec 100644 --- a/miku/plugins/rss.lua +++ b/miku/plugins/rss.lua @@ -329,20 +329,20 @@ function rss:cron() local link = v2.link or v2.id or 'Kein Link' if v2.content then content = v2.content:gsub("%b<>", "") - if string.len(v2.content) > 300 then + if string.len(v2.content) > 250 then content = cleanRSS(content) content = unescape(content) - content = string.sub(content, 1, 300)..'...' + content = string.sub(content, 1, 250)..'...' else content = cleanRSS(content) content = unescape(content) end elseif v2.summary then content = v2.summary:gsub("%b<>", "") - if string.len(v2.summary) > 300 then + if string.len(v2.summary) > 250 then content = cleanRSS(content) content = unescape(content) - content = string.sub(content, 1, 300)..'...' + content = string.sub(content, 1, 250)..'...' else content = cleanRSS(content) content = unescape(content)