Fuck ANSI!!!
This commit is contained in:
parent
f04437a829
commit
e92ecd97f2
5
.gitignore
vendored
5
.gitignore
vendored
@ -9,4 +9,7 @@ plugins/help2.lua
|
||||
plugins/pegelf_img.lua
|
||||
plugins/plex.lua
|
||||
plugins/chantalle.lua
|
||||
plugins/plex_xml.lua
|
||||
plugins/plex_xml.lua
|
||||
plugins/tumblr_blog.lua
|
||||
plugins/tumblr_post.lua
|
||||
plugins/wiiu.lua
|
@ -7,11 +7,11 @@ local _blacklist
|
||||
|
||||
local function show_blacklist()
|
||||
if not _blacklist[1] then
|
||||
return "Keine Wörter geblacklisted!\nBlackliste welche mit !imgblacklist add [Wort]"
|
||||
return "Keine Wörter geblacklisted!\nBlackliste welche mit /imgblacklist add [Wort]"
|
||||
else
|
||||
local sort_alph = function( a,b ) return a < b end
|
||||
table.sort( _blacklist, sort_alph )
|
||||
local blacklist = "Folgende Wörter stehen auf der Blacklist:\n"
|
||||
local blacklist = "Folgende Wörter stehen auf der Blacklist:\n"
|
||||
for v,word in pairs(_blacklist) do
|
||||
blacklist = blacklist..'- '..word..'\n'
|
||||
end
|
||||
@ -33,7 +33,7 @@ local function remove_blacklist()
|
||||
print('De-blacklisting '..word..' - removing from redis set telegram:img_blacklist')
|
||||
if redis:sismember("telegram:img_blacklist", word) == true then
|
||||
redis:srem("telegram:img_blacklist", word)
|
||||
return '"'..word..'" erfolgreich von der Blacklist gelöscht!'
|
||||
return '"'..word..'" erfolgreich von der Blacklist gelöscht!'
|
||||
else
|
||||
return '"'..word..'" steht nicht auf der Blacklist.'
|
||||
end
|
||||
@ -45,13 +45,13 @@ function run(msg, matches)
|
||||
_blacklist = redis:smembers("telegram:img_blacklist")
|
||||
|
||||
if action == "add" and word == nil then
|
||||
return "Benutzung: !imgblacklist add [Wort]"
|
||||
return "Benutzung: /imgblacklist add [Wort]"
|
||||
elseif action == "add" and word then
|
||||
return add_blacklist()
|
||||
end
|
||||
|
||||
if action == "remove" and word == nil then
|
||||
return "Benutzung: !imgblacklist remove [Wort]"
|
||||
return "Benutzung: /imgblacklist remove [Wort]"
|
||||
elseif action == "remove" and word then
|
||||
return remove_blacklist()
|
||||
end
|
||||
@ -60,10 +60,10 @@ function run(msg, matches)
|
||||
end
|
||||
|
||||
return {
|
||||
description = "Blacklist-Manager für Bilder-Plugins (nur Superuser)",
|
||||
description = "Blacklist-Manager für Bilder-Plugins (nur Superuser)",
|
||||
usage = {
|
||||
"/imgblacklist show: Zeigt Blacklist",
|
||||
"/imgblacklist add [Wort]: Fügt Wort der Blacklist hinzu",
|
||||
"/imgblacklist add [Wort]: Fügt Wort der Blacklist hinzu",
|
||||
"/imgblacklist remove [Wort]: Entfernt Wort aus der Blacklist"
|
||||
},
|
||||
patterns = {
|
||||
|
Reference in New Issue
Block a user