Chat#id durch Chatnamen im RSS-Plugin ausgetauscht

This commit is contained in:
Akamaru 2015-12-20 20:44:00 +01:00
parent d656ffca98
commit af4d3fcba7
2 changed files with 5 additions and 3 deletions

View File

@ -94,10 +94,10 @@ local function get_new_entries(last, nentries)
return entries
end
local function print_subs(id)
local function print_subs(id, chat_name)
local uhash = get_base_redis(id)
local subs = redis:smembers(uhash)
local text = id .. ' hat folgende Feeds:\n---------\n'
local text = '"'..chat_name..'" hat folgende Feeds:\n---------\n'
for k,v in pairs(subs) do
text = text .. k .. ") " .. v .. '\n'
end
@ -209,7 +209,8 @@ local function run(msg, matches)
end
if matches[1] == "/rss"then
return print_subs(id)
local chat_name = string.gsub(msg.to.print_name, "_", " ")
return print_subs(id, chat_name)
end
if matches[1] == "sync" then
cron()

View File

@ -10,6 +10,7 @@ function getTitle(page)
-- Character encoding
s = string.gsub(s, "´", "´")
s = string.gsub(s, "•", "")
s = string.gsub(s, ">", ">")
s = string.gsub(s, """, '"')
s = string.gsub(s, "&lt;", "<")