Änderung der Commands von / auf #

Kleine Bugfixes
This commit is contained in:
Akamaru 2016-06-22 13:59:06 +02:00
parent 81c7393b00
commit 5fd0a7d9b1
144 changed files with 601 additions and 540 deletions

View File

@ -93,8 +93,8 @@ end
function pre_process_service_msg(msg) function pre_process_service_msg(msg)
if msg.service then if msg.service then
local action = msg.action or {type=""} local action = msg.action or {type=""}
-- Double / to discriminate of normal actions -- Double # to discriminate of normal actions
msg.text = "//tgservice " .. action.type msg.text = "##tgservice " .. action.type
-- wipe the data to allow the bot to read service messages -- wipe the data to allow the bot to read service messages
if msg.out then if msg.out then

View File

@ -80,7 +80,7 @@ function get_http_file_name(url, headers)
end end
-- Saves file to tmp/. If file_name isn't provided, -- Saves file to tmp/. If file_name isn't provided,
-- will get the text after the last "/" for filename -- will get the text after the last "#" for filename
-- and content-type for extension -- and content-type for extension
function download_to_file(url, file_name) function download_to_file(url, file_name)
print("Download URL: "..url) print("Download URL: "..url)
@ -837,3 +837,11 @@ function convert_timestamp(timestamp, format)
local converted_date = string.gsub(converted_date, '%\n', '') local converted_date = string.gsub(converted_date, '%\n', '')
return converted_date return converted_date
end end
function pretty_float(x)
if x % 1 == 0 then
return tostring(math.floor(x))
else
return tostring(x)
end
end

View File

@ -26,9 +26,9 @@ end
return { return {
description = "Sendet ein zufälliges Bild von 9GAG", description = "Sendet ein zufälliges Bild von 9GAG",
usage = "/9gag: Sendet ein zufälliges Bild von 9GAG.", usage = "#9gag: Sendet ein zufälliges Bild von 9GAG.",
patterns = { patterns = {
"^/9gag$" "^#9gag$"
}, },
run = run run = run
} }

View File

@ -107,10 +107,10 @@ end
return { return {
description = 'AFK und online schalten', description = 'AFK und online schalten',
usage = "/afk (Text): Setzt Status auf AFK mit optionalem Text", usage = "#afk (Text): Setzt Status auf AFK mit optionalem Text",
patterns = { patterns = {
"^/([A|a][F|f][K|k])$", "^#([Aa][Ff][Kk])$",
"^/([A|a][F|f][K|k]) (.*)$" "^#([Aa][Ff][Kk]) (.*)$"
}, },
run = run, run = run,
pre_process = pre_process pre_process = pre_process

View File

@ -46,8 +46,8 @@ end
return { return {
description = "Sendet letzten Aka's Blog Beitrag", description = "Sendet letzten Aka's Blog Beitrag",
usage = "/aka", usage = "#aka",
patterns = {"^/[Aa][Kk][Aa]$"}, patterns = {"^#[Aa][Kk][Aa]$"},
run = run run = run
} }

View File

@ -47,8 +47,8 @@ end
return { return {
description = "Suche für Aka's Blog", description = "Suche für Aka's Blog",
usage = "/aka [BEGRIFF]", usage = "#aka [BEGRIFF]",
patterns = {"^/[Aa][Kk][Aa] (.*)$"}, patterns = {"^#[Aa][Kk][Aa] (.*)$"},
run = run run = run
} }

View File

@ -41,12 +41,12 @@ end
return { return {
description = "Sendet Aktieninfos", description = "Sendet Aktieninfos",
usage = "/aktien [Symbol]: Sendet Aktieninfos", usage = "#aktien [Symbol]: Sendet Aktieninfos",
patterns = { patterns = {
"^/aktien ([A-Za-z0-9]+)$", "^#aktien ([A-Za-z0-9]+)$",
"^/stocks ([A-Za-z0-9]+)$", "^#stocks ([A-Za-z0-9]+)$",
"^/aktie ([A-Za-z0-9]+)$", "^#aktie ([A-Za-z0-9]+)$",
"^/stock ([A-Za-z0-9]+)$" "^#stock ([A-Za-z0-9]+)$"
}, },
run = run run = run
} }

View File

@ -111,10 +111,10 @@ end
return { return {
description = "Sendet iPhone App-Store Info.", description = "Sendet iPhone App-Store Info.",
usage = {"Link zu App auf iTunes", usage = {"Link zu App auf iTunes",
"/itunes (ID)" "#itunes (ID)"
}, },
patterns = {"itunes.apple.com/(.*)/app/(.*)/id(%d+)", patterns = {"itunes.apple.com/(.*)/app/(.*)/id(%d+)",
"^/itunes (%d+)$" "^#itunes (%d+)$"
}, },
run = run run = run
} }

View File

@ -40,12 +40,12 @@ end
return { return {
description = "Zeigt Geburtstage, die mit /setbd gesetzt wurden", description = "Zeigt Geburtstage, die mit /setbd gesetzt wurden",
usage = { usage = {
"/getbd: Gibt alle Geburtstage aus", "#getbd: Gibt alle Geburtstage aus",
"/getbd (Name): Gibt den Geburtstag aus." "#getbd (Name): Gibt den Geburtstag aus."
}, },
patterns = { patterns = {
"^(/getbd) (.+)$", "^(#getbd) (.+)$",
"^/getbd$" "^#getbd$"
}, },
run = run run = run
} }

View File

@ -1,6 +1,6 @@
local function save_value(msg, name, value) local function save_value(msg, name, value)
if (not name or not value) then if (not name or not value) then
return "Benutzung: /setbd [Name] [Tag. Monat]" return "Benutzung: #setbd [Name] [Tag. Monat]"
end end
local hash = 'telegram:birthdays' local hash = 'telegram:birthdays'
@ -37,11 +37,11 @@ end
return { return {
description = "Speichert Geburtstage.", description = "Speichert Geburtstage.",
usage = { usage = {
"/setbd [Name] [Tag. Monat]: Speichert ein Geburtstag.", "#setbd [Name] [Tag. Monat]: Speichert ein Geburtstag.",
"/setbd (Name) nil: Löscht Geburtstag" "#setbd (Name) nil: Löscht Geburtstag"
}, },
patterns = { patterns = {
"^/setbd ([^%s]+) (.+)$" "^#setbd ([^%s]+) (.+)$"
}, },
run = run run = run
} }

View File

@ -40,11 +40,11 @@ end
local function run(msg, matches) local function run(msg, matches)
local url = nil local url = nil
if matches[1] == "/boobs" then if matches[1] == "#boobs" then
url = getRandomBoobs() url = getRandomBoobs()
end end
if matches[1] == "/butts" then if matches[1] == "#butts" then
url = getRandomButts() url = getRandomButts()
end end
@ -59,8 +59,8 @@ end
return { return {
description = "Sendet ein zufälliges Boobs/Butts Bild", description = "Sendet ein zufälliges Boobs/Butts Bild",
usage = {"/boobs","/butts"}, usage = {"#boobs","#butts"},
patterns = {"^/boobs$","^/butts$"}, patterns = {"^#boobs$","^#butts$"},
run = run run = run
} }

View File

@ -25,7 +25,7 @@ local function run(msg, matches)
local amt = nil local amt = nil
-- Get the global match out of the way -- Get the global match out of the way
if matches[1] == "!btc" then if matches[1] == "#btc" then
return getBTCX(amt,cur) return getBTCX(amt,cur)
end end
@ -43,15 +43,15 @@ end
return { return {
description = "Globaler Bitcoin-Wert (in EUR oder USD)", description = "Globaler Bitcoin-Wert (in EUR oder USD)",
usage = { usage = {
"/btc: Zeigt aktuellen Bitcoin-Kurs", "#btc: Zeigt aktuellen Bitcoin-Kurs",
"/btc [EUR|USD] [Menge]: Rechnet Bitcoin in Euro/USD um" "#btc [EUR|USD] [Menge]: Rechnet Bitcoin in Euro/USD um"
}, },
patterns = { patterns = {
"^/btc$", "^#btc$",
"^/btc ([Ee][Uu][Rr])$", "^#btc ([Ee][Uu][Rr])$",
"^/btc ([Uu][Ss][Dd])$", "^#btc ([Uu][Ss][Dd])$",
"^/btc (EUR) (%d+[%d%.]*)$", "^#btc (EUR) (%d+[%d%.]*)$",
"^/btc (USD) (%d+[%d%.]*)$" "^#btc (USD) (%d+[%d%.]*)$"
}, },
run = run run = run
} }

View File

@ -8,8 +8,8 @@ end
return { return {
description = "", description = "",
usage = {"/pic BILDURL"}, usage = {"#pic BILDURL"},
patterns = {"^/pic (.*)$"}, patterns = {"^#pic (.*)$"},
run = run, run = run,
notyping = true notyping = true
} }

View File

@ -38,7 +38,7 @@ local function pre_process(msg)
-- If is sudo can reeanble the channel -- If is sudo can reeanble the channel
if is_sudo(msg) then if is_sudo(msg) then
if msg.text == "/channel enable" then if msg.text == "#channel enable" then
enable_channel(msg) enable_channel(msg)
end end
end end
@ -65,12 +65,12 @@ end
return { return {
description = "(De)aktiviert den Bot im Chat (nur Superuser).", description = "(De)aktiviert den Bot im Chat (nur Superuser).",
usage = { usage = {
"/channel enable: Aktiviert den Bot im Chat", "#channel enable: Aktiviert den Bot im Chat",
"/channel disable: Deaktiviert den Bot im Chat" "#channel disable: Deaktiviert den Bot im Chat"
}, },
patterns = { patterns = {
"^/channel? (enable)", "^#channel? (enable)",
"^/channel? (disable)" "^#channel? (disable)"
}, },
run = run, run = run,
privileged = true, privileged = true,

View File

@ -12,7 +12,7 @@ end
return { return {
description = "Sendet Chuck Norris Witze (Englisch)", description = "Sendet Chuck Norris Witze (Englisch)",
usage = {"/cn"}, usage = {"#cn"},
patterns = {"^/cn$"}, patterns = {"^#cn$"},
run = run run = run
} }

View File

@ -19,8 +19,8 @@ end
return { return {
description = "Chat mit CleverBot", description = "Chat mit CleverBot",
usage = "/cbot [Text]: Befragt den Cleverbot", usage = "#cbot [Text]: Befragt den Cleverbot",
patterns = {"^/cbot (.*)$"}, patterns = {"^#cbot (.*)$"},
run = run run = run
} }

View File

@ -12,7 +12,7 @@ end
return { return {
description = "", description = "",
usage = {""}, usage = {""},
patterns = {"^/cowsay (.*)$"}, patterns = {"^#cowsay (.*)$"},
run = run run = run
} }
--by Akamaru [https://ponywave.de] --by Akamaru [https://ponywave.de]

View File

@ -47,9 +47,9 @@ end
return { return {
description = "Erstellt einen Sticker on-the-fly.", description = "Erstellt einen Sticker on-the-fly.",
usage = "/sticker [Bilder-URL]: Erstelt einen Sticker aus einem Bild", usage = "#sticker [Bilder-URL]: Erstelt einen Sticker aus einem Bild",
patterns = { patterns = {
"^/sticker (https?://[%w-_%.%?%.:/%+=&]+)" "^#sticker (https?://[%w-_%.%?%.:/%+=&]+)"
}, },
run = run run = run
} }

View File

@ -82,16 +82,16 @@ function run(msg, matches)
return 'Das Plugin solltest du nur per PN nutzen!' return 'Das Plugin solltest du nur per PN nutzen!'
end end
if matches[1] == "!creds" then if matches[1] == "#creds" then
return list_creds() return list_creds()
elseif matches[1] == "!creds add" then elseif matches[1] == "#creds add" then
local var = string.lower(string.sub(matches[2], 1, 50)) local var = string.lower(string.sub(matches[2], 1, 50))
local key = string.sub(matches[3], 1, 1000) local key = string.sub(matches[3], 1, 1000)
return add_creds(var, key) return add_creds(var, key)
elseif matches[1] == "!creds del" then elseif matches[1] == "#creds del" then
local var = string.lower(matches[2]) local var = string.lower(matches[2])
return del_creds(var) return del_creds(var)
elseif matches[1] == "!creds rename" then elseif matches[1] == "#creds rename" then
local var = string.lower(string.sub(matches[2], 1, 50)) local var = string.lower(string.sub(matches[2], 1, 50))
local newvar = string.lower(string.sub(matches[3], 1, 1000)) local newvar = string.lower(string.sub(matches[3], 1, 1000))
return rename_creds(var, newvar) return rename_creds(var, newvar)
@ -101,10 +101,10 @@ end
return { return {
description = "Loginmanager für Telegram (nur Superuser)", description = "Loginmanager für Telegram (nur Superuser)",
usage = { usage = {
"/creds: Zeigt alle Logindaten und API-Keys", "#creds: Zeigt alle Logindaten und API-Keys",
"/creds add [Variable] [Key]: Speichert Key mit der Variable ein", "#creds add [Variable] [Key]: Speichert Key mit der Variable ein",
"/creds del [Variable]: Löscht Key mit der Variable", "#creds del [Variable]: Löscht Key mit der Variable",
"/creds rename [Variable] [Neuer Name]: Benennt Variable um, behält Key bei" "#creds rename [Variable] [Neuer Name]: Benennt Variable um, behält Key bei"
}, },
patterns = { patterns = {
"^(/creds)$", "^(/creds)$",

View File

@ -18,7 +18,7 @@ end
return { return {
description = "Führt Befehle in der Konsole aus", description = "Führt Befehle in der Konsole aus",
usage = {""}, usage = {""},
patterns = {"^/[Hh][Ee][Aa][Dd] (.*)$","^/[Dd][Ii][Gg] (.*)"}, patterns = {"^#[Hh][Ee][Aa][Dd] (.*)$","^#[Dd][Ii][Gg] (.*)"},
run = run run = run
} }
--by Akamaru [https://ponywave.de] --by Akamaru [https://ponywave.de]

View File

@ -51,12 +51,12 @@ end
return { return {
description = "Wandelt Geldeinheiten um. ?? ?? ??", description = "Wandelt Geldeinheiten um. ?? ?? ??",
usage = "/money [von] [zu] [Menge]: Wandelt Geldeinheiten um (Symbole: ponywave.de/a/botmoney)", usage = "#money [von] [zu] [Menge]: Wandelt Geldeinheiten um (Symbole: ponywave.de/a/botmoney)",
patterns = { patterns = {
"^/money ([A-Za-z]+)$", "^#money ([A-Za-z]+)$",
"^/money ([A-Za-z]+) ([A-Za-z]+)$", "^#money ([A-Za-z]+) ([A-Za-z]+)$",
"^(money ([A-Za-z]+) ([A-Za-z]+) (%d+[%d%.,]*)$", "^(#money ([A-Za-z]+) ([A-Za-z]+) (%d+[%d%.,]*)$",
"^(/eur)$" "^(#eur)$"
}, },
run = run run = run
} }

View File

@ -19,7 +19,7 @@ local function run(msg, matches)
local url = URL local url = URL
if matches[1] == "/dan" then if matches[1] == "#dan" then
url = url .. URL_NEW url = url .. URL_NEW
else else
url = url .. URL_POP url = url .. URL_POP
@ -57,15 +57,15 @@ end
return { return {
description = "Gets a random fresh or popular image from Danbooru", description = "Gets a random fresh or popular image from Danbooru",
usage = { usage = {
"/dan - gets a random fresh image from Danbooru 🔞", "#dan - gets a random fresh image from Danbooru 🔞",
"/dan d - random daily popular image 🔞", "#dan d - random daily popular image 🔞",
"/dan w - random weekly popular image 🔞", "#dan w - random weekly popular image 🔞",
"/dan m - random monthly popular image 🔞"}, "#dan m - random monthly popular image 🔞"},
patterns = { patterns = {
"^/dan$", "^#dan$",
"^/dan ?(d)$", "^#dan ?(d)$",
"^/dan ?(w)$", "^#dan ?(w)$",
"^/dan ?(m)$"}, "^#dan ?(m)$"},
run = run run = run
} }

View File

@ -33,8 +33,8 @@ end
return { return {
description = "Sendet ein zufälliges Bild von Danbooru.", description = "Sendet ein zufälliges Bild von Danbooru.",
usage = {"/danbooru [Tags]","/db [Tags]"}, usage = {"#danbooru [Tags]","#db [Tags]"},
patterns = {"^/danbooru (.*)$","^/db (.*)$"}, patterns = {"^#danbooru (.*)$","^#db (.*)$"},
run = run run = run
} }

View File

@ -29,8 +29,8 @@ end
return { return {
description = "Zeigt das aktuelle Datum und Zeit an", description = "Zeigt das aktuelle Datum und Zeit an",
usage = {"/date"}, usage = {"/#date"},
patterns = {"^/[D|d]ate$","^/[D|d]atum$"}, patterns = {"^#[Dd][Aa][Tt][Ee]$","^#[Dd][Aa][Tt][Uu][Mm]$"},
run = run run = run
} }
--by Akamaru [https://ponywave.de] --by Akamaru [https://ponywave.de]

View File

@ -37,8 +37,8 @@ end
return { return {
description = "Sendet zufälliges Bild von Derpibooru.", description = "Sendet zufälliges Bild von Derpibooru.",
usage = {"/derpibooru [Tags]","/dp [Tags]"}, usage = {"#derpibooru [Tags]","#dp [Tags]"},
patterns = {"^/derpibooru (.*)$","^/dp (.*)$"}, patterns = {"^#derpibooru (.*)$","^#dp (.*)$"},
run = run run = run
} }

View File

@ -37,8 +37,8 @@ end
return { return {
description = "Sendet zufälliges Bild von Derpibooru.", description = "Sendet zufälliges Bild von Derpibooru.",
usage = {"/derpibooru2 [Tags]","/dp2 [Tags]"}, usage = {"#derpibooru2 [Tags]","#dp2 [Tags]"},
patterns = {"^/derpibooru2 (.*)$","^/dp2 (.*)$"}, patterns = {"^#derpibooru2 (.*)$","^#dp2 (.*)$"},
run = run run = run
} }

View File

@ -32,8 +32,8 @@ end
return { return {
description = "Löst Domain nach IP auf.", description = "Löst Domain nach IP auf.",
usage = "/dns [Domain]", usage = "#dns [Domain]",
patterns = {"^/dns (.*)$"}, patterns = {"^#dns (.*)$"},
run = run run = run
} }

View File

@ -8,7 +8,7 @@ end
return { return {
description = "Erstelle ein Doge Bild mit Wörtern", description = "Erstelle ein Doge Bild mit Wörtern",
usage = {"/dogify das/was/du/willst"}, usage = {"#dogify das/was/du/willst"},
patterns = {"^/dogify (.+)$","^/doge (.+)$"}, patterns = {"^#dogify (.+)$","^#doge (.+)$"},
run = run run = run
} }

View File

@ -28,8 +28,8 @@ end
return { return {
description = "Sendet zufälliges Bild von e621.", description = "Sendet zufälliges Bild von e621.",
usage = {"/e621 [Tags]"}, usage = {"#e621 [Tags]"},
patterns = {"^/e621 (.*)$"}, patterns = {"^#e621 (.*)$"},
run = run run = run
} }

View File

@ -11,7 +11,7 @@ end
return { return {
description = "Wiederholt euch", description = "Wiederholt euch",
usage = {"/echo [Satz]","/Echo [Satz]"}, usage = {"#echo [Satz]"},
patterns = {"^/echo (.*)$","^/Echo (.*)$"}, patterns = {"^#[Ee][Cc][Hh][Oo] (.*)$"},
run = run run = run
} }

View File

@ -42,7 +42,7 @@ end
function run(msg, matches) function run(msg, matches)
local url = nil local url = nil
local txt = nil local txt = nil
if matches[1] == "/eh" then if matches[1] == "#eh" then
url, txt = get_popular() url, txt = get_popular()
elseif matches[1] == "pop" then elseif matches[1] == "pop" then
url, txt = get_popular() url, txt = get_popular()
@ -57,14 +57,14 @@ end
return { return {
description = "Send an e-hentai manga info.", description = "Send an e-hentai manga info.",
usage = { usage = {
"/eh: Send an popular right now e-hentai manga info which is popular right now.", "#eh: Send an popular right now e-hentai manga info which is popular right now.",
"/eh pop: Send an popular right now e-hentai manga info which is popular right now.", "#eh pop: Send an popular right now e-hentai manga info which is popular right now.",
"/eh top: Send a > 4-star e-hentai manga info." "#eh top: Send a > 4-star e-hentai manga info."
}, },
patterns = { patterns = {
"^/eh$", "^#eh$",
"^/eh (pop)$", "^#eh (pop)$",
"^/eh (top)$", "^#eh (top)$",
}, },
run = run run = run
} }

View File

@ -1,11 +1,11 @@
function run(msg, matches) function run(msg, matches)
return '😄😃😀😊☺😉😍😘😚😗😙😜😝😛😳😁😔😌😒😞😣😢😂😭😪😥😰😅😓😩😫😨😱😠😡😤😖😆😋😷😎😴😵😲😟😦😧😈👿😮😬😐😕😯😶😇😏😑👲👳👮👷💂👶👦👧👨👩👴👵👱👼👸😺😸😻😽😼🙀😿😹😾👹👺🙈🙉🙊💀👽💩🔥✨🌟💫💥💢💦💧💤💨👂👀👃👅👄👍👎👌👊✊✌👋✋👐👆👇👉👈🙌🙏☝👏💪🚶🏃💃👫👪👬👭💏💑👯🙆🙅💁🙋💆💇💅👰🙎🙍🙇🎩👑👒👟👞👡👠👢👕👔👚👗🎽👖👘👙💼👜👝👛👓🎀🌂💄💛💙💜💚❤💔💗💓💕💖💞💘💌💋💍💎👤👥💬👣💭🐶🐺🐱🐭🐹🐰🐸🐯🐨🐻🐷🐽🐮🐗🐵🐒🐴🐑🐘🐼🐧🐦🐤🐥🐣🐔🐍🐢🐛🐝🐜🐞🐌🐙🐚🐠🐟🐬🐳🐋🐄🐏🐀🐃🐅🐇🐉🐎🐐🐓🐕🐖🐁🐂🐲🐡🐊🐫🐪🐆🐈🐩🐾💐🌸🌷🍀🌹🌻🌺🍁🍃🍂🌿🌾🍄🌵🌴🌲🌳🌰🌱🌼🌐🌞🌝🌚🌑🌒🌓🌔🌕🌖🌗🌘🌜🌛🌙🌍🌎🌏🌋🌌🌠⭐🌀🌁🌈🌊🎍💝🎎🎒🎓🎏🎆🎇🎐🎑🎃👻🎅🎄🎁🎋🎉🎊🎈🎌🔮🎥📷📹📼💿📀💽💾💻📱☎📞📟📠📡📺📻🔊🔉🔈🔇🔔🔕📢📣⏳⌛⏰⌚🔓🔒🔏🔐🔑🔎💡🔦🔆🔅🔌🔋🔍🛁🛀🚿🚽🔧🔩🔨🚪🚬💣🔫🔪💊💉💰💴💵💷💶💳💸📲📧📥📤✉📩📨📯📫📪📬📭📮📦📝📄📃📑📊📈📉📜📋📅📆📇📁📂✂📌📎✒📏📐📕📗📘📙📓📔📒📚📖🔖📛🔬🔭📰🎨🎬🎤🎧🎼🎵🎶🎹🎻🎺🎷🎸👾🎮🃏🎴🀄🎲🎯🏈🏀⚽🎾🎱🏉🎳⛳🚵🚴🏁🏇🏆🎿🏂🏊🏄🎣☕🍵🍶🍼🍺🍻🍸🍹🍷🍴🍕🍔🍟🍗🍖🍝🍛🍤🍱🍣🍥🍙🍘🍚🍜🍲🍢🍡🍳🍞🍩🍮🍦🍨🍧🎂🍰🍪🍫🍬🍭🍯🍎🍏🍊🍋🍒🍇🍉🍓🍑🍈🍌🍐🍍🍠🍆🍅🌽🏠🏡🏫🏢🏣🏥🏦🏪🏩🏨💒⛪🏬🏤🌇🌆🏯🏰⛺🏭🗼🗾🗻🌄🌅🌃🗽🌉🎠🎡⛲🎢🚢⛵🚤🚣⚓🚀✈💺🚁🚂🚊🚉🚞🚆🚄🚅🚈🚇🚝🚋🚃🚎🚌🚍🚙🚘🚗🚕🚖🚛🚚🚨🚓🚔🚒🚑🚐🚲🚡🚟🚠🚜💈🚏🎫🚦🚥⚠🚧🔰⛽🏮🎰♨🗿🎪🎭📍🚩🇯🇵🇰🇷🇩🇪🇨🇳🇺🇸🇫🇷🇪🇸🇮🇹🇷🇺🇬🇧1⃣2⃣3⃣4⃣5⃣6⃣7⃣8⃣9⃣0⃣🔟🔢#⃣🔣⬆️⬇️⬅️➡️🔠🔡🔤↗️↖️↘️↙️↔️↕️🔄◀️▶️🔼🔽↩️↪️ℹ️⏪⏩⏫⏬⤵️⤴️🆗🔀🔁🔂🆕🆙🆒🆓🆖📶🎦🈁🈯️🈳🈵🈴🈲🉐🈹🈺🈶🈚️🚻🚹🚺🚼🚾🚰🚮🅿️♿️🚭🈷🈸🈂Ⓜ️🛂🛄🛅🛃🉑㊙️㊗️🆑🆘🆔🚫🔞📵🚯🚱🚳🚷🚸⛔️✳️❇️❎✅✴️💟🆚📳📴🅰🅱🆎🅾💠➿♻️♈️♉️♊️♋️♌️♍️♎️♏️♐️♑️♒️♓️⛎🔯🏧💹💲💱©®™❌‼️⁉️❗️❓❕❔⭕️🔝🔚🔙🔛🔜🔃🕛🕧🕐🕜🕑🕝🕒🕞🕓🕟🕔🕠🕕🕖🕗🕘🕙🕚🕡🕢🕣🕤🕥🕦✖️➕➖➗♠️♥️♣️♦️💮💯✔️☑️🔘🔗➰〰〽️🔱◼️◻️◾️◽️▪️▫️🔺🔲🔳⚫️⚪️🔴🔵🔻⬜️⬛️🔶🔷🔸🔹' return '😄😃😀😊☺😉😍😘😚😗😙😜😝😛😳😁😔😌😒😞😣😢😂😭😪😥😰😅😓😩😫😨😱😠😡😤😖😆😋😷😎😴😵😲😟😦😧😈👿😮😬😐😕😯😶😇😏😑👲👳👮👷💂👶👦👧👨👩👴👵👱👼👸😺😸😻😽😼🙀😿😹😾👹👺🙈🙉🙊💀👽💩🔥✨🌟💫💥💢💦💧💤💨👂👀👃👅👄👍👎👌👊✊✌👋✋👐👆👇👉👈🙌🙏☝👏💪🚶🏃💃👫👪👬👭💏💑👯🙆🙅💁🙋💆💇💅👰🙎🙍🙇🎩👑👒👟👞👡👠👢👕👔👚👗🎽👖👘👙💼👜👝👛👓🎀🌂💄💛💙💜💚❤💔💗💓💕💖💞💘💌💋💍💎👤👥💬👣💭🐶🐺🐱🐭🐹🐰🐸🐯🐨🐻🐷🐽🐮🐗🐵🐒🐴🐑🐘🐼🐧🐦🐤🐥🐣🐔🐍🐢🐛🐝🐜🐞🐌🐙🐚🐠🐟🐬🐳🐋🐄🐏🐀🐃🐅🐇🐉🐎🐐🐓🐕🐖🐁🐂🐲🐡🐊🐫🐪🐆🐈🐩🐾💐🌸🌷🍀🌹🌻🌺🍁🍃🍂🌿🌾🍄🌵🌴🌲🌳🌰🌱🌼🌐🌞🌝🌚🌑🌒🌓🌔🌕🌖🌗🌘🌜🌛🌙🌍🌎🌏🌋🌌🌠⭐🌀🌁🌈🌊🎍💝🎎🎒🎓🎏🎆🎇🎐🎑🎃👻🎅🎄🎁🎋🎉🎊🎈🎌🔮🎥📷📹📼💿📀💽💾💻📱☎📞📟📠📡📺📻🔊🔉🔈🔇🔔🔕📢📣⏳⌛⏰⌚🔓🔒🔏🔐🔑🔎💡🔦🔆🔅🔌🔋🔍🛁🛀🚿🚽🔧🔩🔨🚪🚬💣🔫🔪💊💉💰💴💵💷💶💳💸📲📧📥📤✉📩📨📯📫📪📬📭📮📦📝📄📃📑📊📈📉📜📋📅📆📇📁📂✂📌📎✒📏📐📕📗📘📙📓📔📒📚📖🔖📛🔬🔭📰🎨🎬🎤🎧🎼🎵🎶🎹🎻🎺🎷🎸👾🎮🃏🎴🀄🎲🎯🏈🏀⚽🎾🎱🏉🎳⛳🚵🚴🏁🏇🏆🎿🏂🏊🏄🎣☕🍵🍶🍼🍺🍻🍸🍹🍷🍴🍕🍔🍟🍗🍖🍝🍛🍤🍱🍣🍥🍙🍘🍚🍜🍲🍢🍡🍳🍞🍩🍮🍦🍨🍧🎂🍰🍪🍫🍬🍭🍯🍎🍏🍊🍋🍒🍇🍉🍓🍑🍈🍌🍐🍍🍠🍆🍅🌽🏠🏡🏫🏢🏣🏥🏦🏪🏩🏨💒⛪🏬🏤🌇🌆🏯🏰⛺🏭🗼🗾🗻🌄🌅🌃🗽🌉🎠🎡⛲🎢🚢⛵🚤🚣⚓🚀✈💺🚁🚂🚊🚉🚞🚆🚄🚅🚈🚇🚝🚋🚃🚎🚌🚍🚙🚘🚗🚕🚖🚛🚚🚨🚓🚔🚒🚑🚐🚲🚡🚟🚠🚜💈🚏🎫🚦🚥⚠🚧🔰⛽🏮🎰♨🗿🎪🎭📍🚩🇯🇵🇰🇷🇩🇪🇨🇳🇺🇸🇫🇷🇪🇸🇮🇹🇷🇺🇬🇧1⃣2⃣3⃣4⃣5⃣6⃣7⃣8⃣9⃣0⃣🔟🔢#⃣🔣⬆️⬇️⬅️➡️🔠🔡🔤↗️↖️↘️↙️↔️↕️🔄◀️▶️🔼🔽↩️↪️ℹ️⏪⏩⏫⏬⤵️⤴️🆗🔀🔁🔂🆕🆙🆒🆓🆖📶🎦🈁🈯️🈳🈵🈴🈲🉐🈹🈺🈶🈚️🚻🚹🚺🚼🚾🚰🚮🅿️♿️🚭🈷🈸🈂Ⓜ️🛂🛄🛅🛃🉑㊙️㊗️🆑🆘🆔🚫🔞📵🚯🚱🚳🚷🚸⛔️✳️❇️❎✅✴️💟🆚📳📴🅰🅱🆎🅾💠➿♻️♈️♉️♊️♋️♌️♍️♎️♏️♐️♑️♒️♓️⛎🔯🏧💹💲💱©®™❌‼️⁉️❗️❓❕❔⭕️🔝🔚🔙🔛🔜🔃🕛🕧🕐🕜🕑🕝🕒🕞🕓🕟🕔🕠🕕🕖🕗🕘🕙🕚🕡🕢🕣🕤🕥🕦✖️➕➖➗♠️♥️♣️♦️💮💯✔️☑️🔘🔗➰〰〽️🔱◼️◻️◾️◽️▪️▫️🔺🔲🔳⚫️⚪️🔴🔵🔻⬜️⬛️🔶🔷🔸🔹'
end end
return { return {
description = "Sendet alle Emoticons", description = "Sendet alle Emoticons",
usage = {"/emoticons","/Emoticons"}, usage = {"#emoticons"},
patterns = {"^/emoticons","^/Emoticons"}, patterns = {"^#emoticons"},
run = run run = run
} }
--by Akamaru [https://ponywave.de] --by Akamaru [https://ponywave.de]

View File

@ -41,12 +41,12 @@ end
return { return {
description = "TV-Programm abrufen", description = "TV-Programm abrufen",
usage = { usage = {
"/epg 20:15: TV-Programm für 20:15", "#epg 20:15: TV-Programm für 20:15",
"/epg jetzt. Jetziges TV-Programm" "#epg jetzt. Jetziges TV-Programm"
}, },
patterns = { patterns = {
"^/epg (20%:15)$", "^#epg (20%:15)$",
"^/epg (jetzt)" "^#epg (jetzt)"
}, },
run = run run = run
} }

View File

@ -18,9 +18,9 @@ end
return { return {
description = "Erweitert eine verkürzte URL", description = "Erweitert eine verkürzte URL",
usage = "/expand [URL]: Erweitert einen verkürzten Link", usage = "#expand [URL]: Erweitert einen verkürzten Link",
patterns = { patterns = {
"^/expand (https?://[%w-_%.%?%.:/%+=&]+)$" "^#expand (https?://[%w-_%.%?%.:/%+=&]+)$"
}, },
run = run run = run
} }

View File

@ -69,12 +69,12 @@ end
return { return {
description = "Who is in that photo?", description = "Who is in that photo?",
usage = { usage = {
"/face [url]", "#face [url]",
"/recognise [url]" "#recognise [url]"
}, },
patterns = { patterns = {
"^/face (.*)$", "^#face (.*)$",
"^/recognise (.*)$" "^#recognise (.*)$"
}, },
run = run run = run
} }

View File

@ -4,10 +4,10 @@ function run(msg, matches)
local receiver = get_receiver(msg) local receiver = get_receiver(msg)
if string.match(msg.text, '"') then if string.match(msg.text, '"') then
return 'Vergiss es' return 'Vergiss es'
elseif string.match(msg.text, '/flip') then elseif string.match(msg.text, '#flip') then
local text = run_bash('flip "' .. text .. '"') local text = run_bash('flip "' .. text .. '"')
send_msg(receiver, text, ok_cb, false) send_msg(receiver, text, ok_cb, false)
elseif string.match(msg.text, '/rev') then elseif string.match(msg.text, '#rev') then
local text = run_bash('echo "' .. text .. '" | rev') local text = run_bash('echo "' .. text .. '" | rev')
send_msg(receiver, text, ok_cb, false) send_msg(receiver, text, ok_cb, false)
end end
@ -16,8 +16,8 @@ end
return { return {
description = "", description = "",
usage = {""}, usage = {""},
patterns = {"^/flip (.*)$", patterns = {"^#flip (.*)$",
"^/rev (.*)"}, "^#rev (.*)"},
run = run run = run
} }
--by Akamaru [https://ponywave.de] --by Akamaru [https://ponywave.de]

View File

@ -170,7 +170,7 @@ local function run(msg, matches)
redis:hset('telegram:cache:weather:'..string.lower(city), 'lat', lat) redis:hset('telegram:cache:weather:'..string.lower(city), 'lat', lat)
redis:hset('telegram:cache:weather:'..string.lower(city), 'lng', lng) redis:hset('telegram:cache:weather:'..string.lower(city), 'lng', lng)
if matches[1] == '/forecasth' or matches[1] == '/fh' then if matches[1] == '#forecasth' or matches[1] == '#fh' then
text = get_forecast_hourly(lat, lng) text = get_forecast_hourly(lat, lng)
else else
text = get_forecast(lat, lng) text = get_forecast(lat, lng)
@ -184,20 +184,20 @@ end
return { return {
description = "Wettervorhersage für deinen oder einen gewählten Ort", description = "Wettervorhersage für deinen oder einen gewählten Ort",
usage = { usage = {
"/f: Wettervorhersage für deine Stadt (/location set [Ort])", "#f: Wettervorhersage für deine Stadt (/location set [Ort])",
"/f (Stadt): Wettervorhersage für diese Stadt", "#f (Stadt): Wettervorhersage für diese Stadt",
"/fh: 24-Stunden-Wettervorhersage für deine Stadt (/location set [Ort])", "#fh: 24-Stunden-Wettervorhersage für deine Stadt (/location set [Ort])",
"/fh (Stadt): 24-Stunden-Wettervorhersage für diese Stadt" "#fh (Stadt): 24-Stunden-Wettervorhersage für diese Stadt"
}, },
patterns = { patterns = {
"^(/f)$", "^(#f)$",
"^(/f) (.*)$", "^(#f) (.*)$",
"^(/fh)$", "^(#fh)$",
"^(/fh) (.*)$", "^(#fh) (.*)$",
"^(/forecast)$", "^(#forecast)$",
"^(/forecast) (.*)$", "^(#forecast) (.*)$",
"^(/forecasth)$", "^(#forecasth)$",
"^(/forecasth) (.*)$" "^(#forecasth) (.*)$"
}, },
run = run run = run
} }

View File

@ -25,8 +25,8 @@ end
return { return {
description = "Sendet FTP-Textdatei.", description = "Sendet FTP-Textdatei.",
usage = "/ftp [Dateiname-ohne-txt]: Sendet eine txt von einem FTP.", usage = "#ftp [Dateiname-ohne-txt]: Sendet eine txt von einem FTP.",
patterns = {"^/ftp (.*)$"}, patterns = {"^#ftp (.*)$"},
run = run run = run
} }

19
plugins/fusroga.lua Normal file
View File

@ -0,0 +1,19 @@
local function run(msg, matches)
local receiver = get_receiver(msg)
local url = 'http://fusro.ga/flash'..matches[1]..'.swf'
print("Flash URL: "..url)
send_document_from_url(receiver, url)
if string.match(msg.text, '/[Ff][Uu][Ss]') then
return 'Source: http://fusro.ga/'..matches[1]
else
return
end
end
return {
description = "Sendet Flashs von fusro.ga",
usage = {"fusro.ga URL","#fus [ID]"},
patterns = {"https?://fusro.ga/([%w-_%.%?%.:,/%+=&#!]+)$","^#[Ff][Uu][Ss] (.*)$"},
run = run
}
--by Akamaru [https://ponywave.de]

View File

@ -131,8 +131,8 @@ end
return { return {
description = "Sendet Infos zu einem Spiel.", description = "Sendet Infos zu einem Spiel.",
usage = "/game [Spiel]: Sendet Infos zum Spiel", usage = "/#game [Spiel]: Sendet Infos zum Spiel",
patterns = {"^/game (.+)$"}, patterns = {"^#game (.+)$"},
run = run run = run
} }

View File

@ -44,10 +44,10 @@ end
return { return {
description = "Sendet Geschlecht", description = "Sendet Geschlecht",
usage = "/geschlecht [Name]: Sendet Geschlecht", usage = "#geschlecht [Name]: Sendet Geschlecht",
patterns = { patterns = {
"^/geschlecht (.*)$", "^#geschlecht (.*)$",
"^/gender (.*)$" "^#gender (.*)$"
}, },
run = run run = run
} }

View File

@ -40,12 +40,12 @@ end
return { return {
description = "Bekommt Variablen, die mit !set gesetzt wurden", description = "Bekommt Variablen, die mit !set gesetzt wurden",
usage = { usage = {
"/get: Gibt alle Variablen aus", "#get: Gibt alle Variablen aus",
"/get (Variable): Gibt die Variable aus." "#get (Variable): Gibt die Variable aus."
}, },
patterns = { patterns = {
"^(/get) (.+)$", "^(#get) (.+)$",
"^/get$" "^#get$"
}, },
run = run run = run
} }

View File

@ -10,12 +10,12 @@ end
return { return {
description = "Ein plugin, um Bilder oder Dateien zu downloaden", description = "Ein plugin, um Bilder oder Dateien zu downloaden",
usage = {"/getdata [URL]", usage = {"#getdata [URL]",
"/wget [URL]", "#wget [URL]",
"/getimg [URL]"}, "#getimg [URL]"},
patterns = {"^/[Gg][Ee][Tt][Dd][Aa][Tt][Aa] (.*)$", patterns = {"^#[Gg][Ee][Tt][Dd][Aa][Tt][Aa] (.*)$",
"/[Ww][Gg][Ee][Tt] (.*)$", "#[Ww][Gg][Ee][Tt] (.*)$",
"^/[Gg][Ee][Tt][Ii][Mm][Gg] (.*)$" "^#[Gg][Ee][Tt][Ii][Mm][Gg] (.*)$"
}, },
run = run run = run
} }

View File

@ -12,8 +12,8 @@ end
return { return {
description = "Sendet GIFs von Gifeye.com", description = "Sendet GIFs von Gifeye.com",
usage = {"gifeye.com URL","/gifeye [ID]","/ge [ID]"}, usage = {"gifeye.com URL","#gifeye [ID]","#ge [ID]"},
patterns = {"https?://gifeye.com/([%w-_%.%?%.:,/%+=&#!]+)$","^/gifeye (.*)$","^/ge (.*)$"}, patterns = {"https?://gifeye.com/([%w-_%.%?%.:,/%+=&#!]+)$","^#gifeye (.*)$","^#ge (.*)$"},
run = run run = run
} }
--by Akamaru [https://ponywave.de] --by Akamaru [https://ponywave.de]

View File

@ -59,8 +59,8 @@ end
return { return {
description = "Sucht und sendet ein GIF von Giphy", description = "Sucht und sendet ein GIF von Giphy",
usage = {"/gif [Begriff]","/giphy [Begriff]"}, usage = {"#gif [Begriff]","#giphy [Begriff]"},
patterns = {"^/gif$","^/gif (.*)","^/giphy (.*)","^/giphy$"}, patterns = {"^#gif$","^#gif (.*)","^#giphy (.*)","^#giphy$"},
run = run run = run
} }

View File

@ -133,11 +133,11 @@ do
return { return {
description = "Randomly glitches a JPEG image", description = "Randomly glitches a JPEG image",
usage = "!glitch [url] [amount]: glitches the JPEG image retrieved from _url_ " .. usage = "#glitch [url] [amount]: glitches the JPEG image retrieved from _url_ " ..
"by corrupting _amount_ bytes. Amount is optional and defaults to 20 bytes.", "by corrupting _amount_ bytes. Amount is optional and defaults to 20 bytes.",
patterns = { patterns = {
"^/glitch ([^ ]*) ([0-9]*)$", "^#glitch ([^ ]*) ([0-9]*)$",
"^/glitch ([^ ]*)$" "^#glitch ([^ ]*)$"
}, },
run = run run = run
} }

View File

@ -45,9 +45,9 @@ end
return { return {
description = "Durchsucht Google", description = "Durchsucht Google",
usage = "/google [Suchbegriff]: Durchsucht Google", usage = "#google [Suchbegriff]: Durchsucht Google",
patterns = { patterns = {
"^/[Gg][Oo][Oo][Gg][Ll][Ee] (.*)$", "^#[Gg][Oo][Oo][Gg][Ll][Ee] (.*)$",
"^%.[Gg][Oo][Oo][Gg][Ll][Ee] (.*)$" "^%.[Gg][Oo][Oo][Gg][Ll][Ee] (.*)$"
}, },
run = run run = run

View File

@ -62,8 +62,9 @@ end
return { return {
description = "Sucht nach Büchern in Google Books.", description = "Sucht nach Büchern in Google Books.",
usage = "/books [Suchbegriff]: Sucht nach Büchern in Google Books", usage = "
patterns = {"^/books (.*)$"}, #books [Suchbegriff]: Sucht nach Büchern in Google Books",
patterns = {"^#books (.*)$"},
run = run run = run
} }

View File

@ -27,11 +27,11 @@ end
return { return {
description = "Gronkh Soundboard", description = "Gronkh Soundboard",
usage = {"/gronkh [Sound]: Sendet ein Sound", usage = {"#gronkh [Sound]: Sendet ein Sound",
"/gronkh liste: Zeigt alle verfügbare Sounds", "#gronkh liste: Zeigt alle verfügbare Sounds",
"/gronkh random: Sendet ein zufälligen Sound (Kommt noch)"}, "#gronkh random: Sendet ein zufälligen Sound (Kommt noch)"},
patterns = { patterns = {
"^/[Gg][Rr][Oo][Nn][Kk][Hh] (.*)$" "^#[Gg][Rr][Oo][Nn][Kk][Hh] (.*)$"
}, },
run = run run = run
} }

View File

@ -20,8 +20,8 @@ end
return { return {
description = "Einfach mal die Fresse halten!", description = "Einfach mal die Fresse halten!",
usage = {"/hdf"}, usage = {"#hdf"},
patterns = {"^/[H|h][D|d][F|f]$"}, patterns = {"^#[H|h][D|d][F|f]$"},
run = run run = run
} }
--by Akamaru [https://ponywave.de] --by Akamaru [https://ponywave.de]

View File

@ -88,9 +88,9 @@ do
end end
local function run(msg, matches) local function run(msg, matches)
if matches[1] == "/hilfe" then if matches[1] == "#hilfe" then
return telegram_help() return telegram_help()
elseif matches[1] == "/hilfe all" then elseif matches[1] == "#hilfe all" then
return help_all() return help_all()
else else
@ -109,8 +109,8 @@ do
return { return {
description = "Zeigt die Plugins und Befehle", description = "Zeigt die Plugins und Befehle",
usage = {"/hilfe","/hilfe all","/hilfe [Plugin]"}, usage = {"#hilfe","#hilfe all","#hilfe [Plugin]"},
patterns = {"^/hilfe$","^/hilfe all","^/hilfe (.+)"}, patterns = {"^#hilfe$","^#hilfe all","^#hilfe (.+)"},
run = run run = run
} }

View File

@ -25,7 +25,7 @@ local function returnids(cb_extra, success, result)
end end
local function run(msg, matches) local function run(msg, matches)
if matches[1] == "/id" or matches[1] == "/myid"then if matches[1] == "#id" or matches[1] == "#myid"then
local text = 'Dein Name lautet "' .. user_print_name(msg.from) .. '" und deine ID ist ' .. msg.from.id .. ' ' .. tostring(is_sudo(msg)) local text = 'Dein Name lautet "' .. user_print_name(msg.from) .. '" und deine ID ist ' .. msg.from.id .. ' ' .. tostring(is_sudo(msg))
if is_chat_msg(msg) then if is_chat_msg(msg) then
text = text .. '\nDu bist in der Gruppe "' .. user_print_name(msg.to) .. '" und die Chat ID ist ' .. msg.to.id text = text .. '\nDu bist in der Gruppe "' .. user_print_name(msg.to) .. '" und die Chat ID ist ' .. msg.to.id
@ -43,7 +43,7 @@ end
return { return {
description = "Zeige dir deine ID und die IDs aller Gruppenmitglieder an.", description = "Zeige dir deine ID und die IDs aller Gruppenmitglieder an.",
usage = {"/id", "/myid"," /id chat"}, usage = {"#id", "#myid"," #id chat"},
patterns = {"^/id$","^/myid$","^/ids? (chat)"}, patterns = {"^#id$","^#myid$","^#ids? (chat)"},
run = run run = run
} }

View File

@ -66,8 +66,8 @@ end
return { return {
description = "Zeigt Info zu einem Film (von IMDB, englisch)", description = "Zeigt Info zu einem Film (von IMDB, englisch)",
usage = "/imdb [Film]: Zeigt Info zu Film", usage = "#imdb [Film]: Zeigt Info zu Film",
patterns = {"^/imdb (.+)", patterns = {"^#imdb (.+)",
"imdb.com/title/(tt)(%d+[%d%.,]*)" "imdb.com/title/(tt)(%d+[%d%.,]*)"
}, },
run = run run = run

View File

@ -104,10 +104,10 @@ end
return { return {
description = "Sucht Bild mit Bing-API und versendet es (SafeSearch aktiv)", description = "Sucht Bild mit Bing-API und versendet es (SafeSearch aktiv)",
usage = { usage = {
"/imgbing [Suchbegriff]" "#imgbing [Suchbegriff]"
}, },
patterns = { patterns = {
"^/imgbing (.*)$" "^#imgbing (.*)$"
}, },
run = run run = run
} }

View File

@ -62,14 +62,14 @@ end
return { return {
description = "Blacklist-Manager für Bilder-Plugins (nur Superuser)", description = "Blacklist-Manager für Bilder-Plugins (nur Superuser)",
usage = { usage = {
"/imgblacklist show: Zeigt Blacklist", "#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" "#imgblacklist remove [Wort]: Entfernt Wort aus der Blacklist"
}, },
patterns = { patterns = {
"^/imgblacklist show$", "^#imgblacklist show$",
"^/imgblacklist (add) (.*)$", "^#imgblacklist (add) (.*)$",
"^/imgblacklist (remove) (.*)$" "^#imgblacklist (remove) (.*)$"
}, },
run = run, run = run,
privileged = true privileged = true

View File

@ -83,10 +83,10 @@ end
return { return {
description = "Sucht Bild mit Google-API und versendet es (SafeSearch aktiv)", description = "Sucht Bild mit Google-API und versendet es (SafeSearch aktiv)",
usage = { usage = {
"/img [Suchbegriff]" "#img [Suchbegriff]"
}, },
patterns = { patterns = {
"^/img (.*)$" "^#img (.*)$"
}, },
run = run run = run
} }

View File

@ -16,18 +16,6 @@ local function getNSFWImage(text)
return google return google
end end
local function is_blacklisted(msg)
local var = false
for v,word in pairs(_blacklist) do
if string.find(string.lower(msg), string.lower(word)) then
print("Wort steht auf der Blacklist!")
var = true
break
end
end
return var
end
local function cache_nsfw_image(results, text) local function cache_nsfw_image(results, text)
local cache = {} local cache = {}
for v in pairs(results) do for v in pairs(results) do
@ -49,14 +37,14 @@ function run(msg, matches)
local results = redis:smembers(hash) local results = redis:smembers(hash)
if not results[1] then if not results[1] then
print('doing web request') print('doing web request')
results = getGoogleImage(text) results = getNSFWImage(text)
if results == 'QUOTAEXCEEDED' then if results == 'QUOTAEXCEEDED' then
return 'Kontingent für heute erreicht - nur noch gecachte Suchanfragen möglich!' return 'Kontingent für heute erreicht - nur noch gecachte Suchanfragen möglich!'
end end
if not results then if not results then
return "Kein Bild gefunden!" return "Kein Bild gefunden!"
end end
cache_google_image(results, text) cache_nsfw_image(results, text)
end end
-- Random image from table -- Random image from table
local i = math.random(#results) local i = math.random(#results)
@ -95,10 +83,10 @@ end
return { return {
description = "Sucht Bild mit Google-API und versendet es", description = "Sucht Bild mit Google-API und versendet es",
usage = { usage = {
"/img2 [Suchbegriff]" "#img2 [Suchbegriff]"
}, },
patterns = { patterns = {
"^/img2 (.*)$" "^#img2 (.*)$"
}, },
run = run run = run
} }

View File

@ -35,8 +35,8 @@ end
return { return {
description = "Die pegelf Insider!", description = "Die pegelf Insider!",
usage = {"/Insider","/insider"}, usage = {"#Insider","#insider"},
patterns = {"^/Insider$","^/insider$"}, patterns = {"^#Insider$","^#insider$"},
run = run run = run
} }
--by Akamaru [https://ponywave.de] --by Akamaru [https://ponywave.de]

View File

@ -35,8 +35,8 @@ end
return { return {
description = "Andere User zu einer Chat-Gruppe hinzufügen", description = "Andere User zu einer Chat-Gruppe hinzufügen",
usage = "/invite name [user_name], /invite id [user_id]", usage = "#invite name [user_name], #invite id [user_id]",
patterns = {"^/invite (name) (.*)$","^/invite (id) (%d+)$"}, patterns = {"^#invite (name) (.*)$","^#invite (id) (%d+)$"},
run = run run = run
} }

View File

@ -55,8 +55,8 @@ end
return { return {
description = "Sendet IP-Info", description = "Sendet IP-Info",
usage = "/ip [IP]: Sendet Server-Infos", usage = "#ip [IP]: Sendet Server-Infos",
patterns = {"^/ip (.*)$"}, patterns = {"^#ip (.*)$"},
run = run run = run
} }

View File

@ -204,19 +204,19 @@ end
return { return {
description = "Checkt, ob eine Webseite up ist.", description = "Checkt, ob eine Webseite up ist.",
usage = { usage = {
"/isup [Host]: Checkt, ob die Seite up ist", "#isup [Host]: Checkt, ob die Seite up ist",
"/isup cron [Host]: Checkt diese Seite alle 5 Minuten (nur Superuser)", "#isup cron [Host]: Checkt diese Seite alle 5 Minuten (nur Superuser)",
"/isup cron check: Prüfe alle Seiten jetzt", "#isup cron check: Prüfe alle Seiten jetzt",
"/isup cron show: Listet alle zu prüfenden Seiten auf", "#isup cron show: Listet alle zu prüfenden Seiten auf",
"/isup cron delete [ID]: Checkt diese Seite nicht mehr" "#isup cron delete [ID]: Checkt diese Seite nicht mehr"
}, },
patterns = { patterns = {
"^/isup (cron check)$", "^#isup (cron check)$",
"^/isup (cron show)$", "^#isup (cron show)$",
"^/isup (cron delete) (%d+)$", "^#isup (cron delete) (%d+)$",
"^/isup (cron) (.*)$", "^#isup (cron) (.*)$",
"^/isup (.*)$", "^#isup (.*)$",
"^/ping (.*)$" "^#ping (.*)$"
}, },
run = run, run = run,
cron = cron cron = cron

View File

@ -17,8 +17,8 @@ end
return { return {
description = "Sendet eins von 6 Just Kitten Bilder", description = "Sendet eins von 6 Just Kitten Bilder",
usage = {"/jk"}, usage = {"#jk"},
patterns = {"^/jk"}, patterns = {"^#jk"},
run = run run = run
} }
--by Akamaru [https://ponywave.de] --by Akamaru [https://ponywave.de]

View File

@ -43,8 +43,8 @@ end
return { return {
description = "Suche für Kickstarter", description = "Suche für Kickstarter",
usage = "/kicks [BEGRIFF]", usage = "#kicks [BEGRIFF]",
patterns = {"^/[Kk][Ii][Cc][Kk][Ss] (.*)$", patterns = {"^#[Kk][Ii][Cc][Kk][Ss] (.*)$",
"https?://www.kickstarter.com/projects/[a-zA-Z0-9]+/(.*)$"}, "https?://www.kickstarter.com/projects/[a-zA-Z0-9]+/(.*)$"},
run = run run = run
} }

View File

@ -13,8 +13,8 @@ end
return { return {
description = "Sendet ein zufälliges Katzenbild", description = "Sendet ein zufälliges Katzenbild",
usage = {"/kitty","/katze","/cat","/neko","/kadse"}, usage = {"#kitty","#katze","#cat","#neko","#kadse"},
patterns = {"^/kitty$","^/katze$","^/cat$","^/kadse$","^/kitty (.*)$","^/katze (.*)$","^/cat (.*)$","^/kadse (.*)$",}, patterns = {"^#kitty$","^#katze$","^#cat$","^#kadse$","^#kitty (.*)$","^#katze (.*)$","^#cat (.*)$","^#kadse (.*)$",},
run = run run = run
} }
--by Akamaru [https://ponywave.de] --by Akamaru [https://ponywave.de]

View File

@ -24,8 +24,8 @@ end
return { return {
description = "Sendet ein Bild von Konachan.net [SFW]", description = "Sendet ein Bild von Konachan.net [SFW]",
usage = {"/konachan [Tags]","/kc"}, usage = {"#konachan [Tags]","#kc"},
patterns = {"^/konachan (.*)$","^/kc (.*)$"}, patterns = {"^#konachan (.*)$","^#kc (.*)$"},
run = run run = run
} }

View File

@ -24,8 +24,8 @@ end
return { return {
description = "Sendet Bild von Konachan.com [NSFW]", description = "Sendet Bild von Konachan.com [NSFW]",
usage = {"/konansfw [Tags]","/kcn [Tags]"}, usage = {"#konansfw [Tags]","#kcn [Tags]"},
patterns = {"^/konansfw (.*)$","^/kcn (.*)$"}, patterns = {"^#konansfw (.*)$","^#kcn (.*)$"},
run = run run = run
} }

View File

@ -8,6 +8,7 @@
-- Globals -- Globals
-- If you have a google api key for the geocoding/timezone api -- If you have a google api key for the geocoding/timezone api
do do
require("./plugins/time")
local api_key = nil local api_key = nil
local base_api = "https://maps.googleapis.com/maps/api" local base_api = "https://maps.googleapis.com/maps/api"
@ -52,8 +53,8 @@ end
return { return {
description = "Zeigt Informationen über einen Ort.", description = "Zeigt Informationen über einen Ort.",
usage = "/loc (Ort)", usage = "#loc (Ort)",
patterns = {"^/loc (.*)$"}, patterns = {"^#loc (.*)$"},
run = run run = run
} }

View File

@ -53,14 +53,14 @@ end
return { return {
description = "Orte-Manager", description = "Orte-Manager",
usage = { usage = {
"/location: Gibt deinen gesetzten Wohnort aus", "#location: Gibt deinen gesetzten Wohnort aus",
"/location set (Ort): Setzt deinen Wohnort auf diesen Ort", "#location set (Ort): Setzt deinen Wohnort auf diesen Ort",
"/location del: Löscht deinen angegebenen Wohnort" "#location del: Löscht deinen angegebenen Wohnort"
}, },
patterns = { patterns = {
"^/location (set) (.*)$", "^#location (set) (.*)$",
"^/location (del)$", "^#location (del)$",
"^/location$" "^#location$"
}, },
run = run run = run
} }

View File

@ -1,4 +1,4 @@
-- This is a proprietary plugin, property of Andreas Bielawski, (c) 2015 <andi (dot) b (at) outlook (dot) de> -- This is a proprietary plugin, property of Andreas Bielawski, (c) 2015 <andi (dot) b (at) outlook (dot) de>
-- DO NOT USE WITHOUT PERMISSION -- DO NOT USE WITHOUT PERMISSION
do do
@ -27,9 +27,9 @@ end
return { return {
description = "Liebestest ❤️ (kommt sogar ohne Jamba-Abo!)", description = "Liebestest ❤️ (kommt sogar ohne Jamba-Abo!)",
usage = "/love [Erster Name]+[Zweiter Name]: Führt einen Liebestest durch ❤️", usage = "#love [Erster Name]+[Zweiter Name]: Führt einen Liebestest durch ❤️",
patterns = { patterns = {
"^/love (.+)+(.+)$" "^#love (.+)+(.+)$"
}, },
run = run run = run
} }

View File

@ -19,8 +19,8 @@ end
return { return {
description = "Sendet ein Bild von den Lucky Star Chars", description = "Sendet ein Bild von den Lucky Star Chars",
usage = {"/Kagami","/kagami","/Konata","/konata","/Tsukasa","/tsukasa","/Miyuki","/miyuki"}, usage = {"#Kagami","#kagami","#Konata","#konata","#Tsukasa","#tsukasa","#Miyuki","#miyuki"},
patterns = {"^/kagami$","^/Kagami$","^/konata$","^/Konata$","^/miyuki$","^/Miyuki$","^/tsukasa$","^/Tsukasa$"}, patterns = {"^#kagami$","^#Kagami$","^#konata$","^#Konata$","^#miyuki$","^#Miyuki$","^#tsukasa$","^#Tsukasa$"},
run = run run = run
} }
--by Akamaru [https://ponywave.de] --by Akamaru [https://ponywave.de]

View File

@ -3,7 +3,7 @@ do
local apikey = cred_data.lyricsnmusic_apikey local apikey = cred_data.lyricsnmusic_apikey
function getLyrics(text) function getLyrics(text)
local q = string.match(text, "/lyrics (.+)") local q = string.match(text, "#lyrics (.+)")
q = url_encode(q) q = url_encode(q)
b = http.request("http://api.lyricsnmusic.com/songs?api_key="..apikey.."&q=" .. q) b = http.request("http://api.lyricsnmusic.com/songs?api_key="..apikey.."&q=" .. q)
response = json:decode(b) response = json:decode(b)
@ -39,8 +39,8 @@ end
return { return {
description = "Liedertext bekommen", description = "Liedertext bekommen",
usage = {"/lyrics [Lied]"}, usage = {"#lyrics [Lied]"},
patterns = {"^/lyrics (.*)$"}, patterns = {"^#lyrics (.*)$"},
run = run run = run
} }

View File

@ -227,30 +227,30 @@ end
return { return {
description = "Manager-Plugin für Whitelist, Kicks und Banns (nur Superuser)", description = "Manager-Plugin für Whitelist, Kicks und Banns (nur Superuser)",
usage = { usage = {
"/whitelist <enable>/<disable>: Aktiviert/deaktiviert Whitelist", "#whitelist <enable>/<disable>: Aktiviert/deaktiviert Whitelist",
"/whitelist user <user_id>: Whiteliste User", "#whitelist user <user_id>: Whiteliste User",
"/whitelist chat: Whiteliste ganze Gruppe", "#whitelist chat: Whiteliste ganze Gruppe",
"/whitelist delete user <user_id>: Lösche User von der Whitelist", "#whitelist delete user <user_id>: Lösche User von der Whitelist",
"/whitelist delete chat: Lösche ganze Gruppe von der Whitelist", "#whitelist delete chat: Lösche ganze Gruppe von der Whitelist",
"/ban user <user_id>: Kicke User vom Chat und kicke ihn, wenn er erneut beitritt", "#ban user <user_id>: Kicke User vom Chat und kicke ihn, wenn er erneut beitritt",
"/ban delete <user_id>: Entbanne User", "#ban delete <user_id>: Entbanne User",
"/kick <user_id>: Kicke User vom Chat", "#kick <user_id>: Kicke User vom Chat",
"/makesudo user <user_id>: Macht User zum Superuser", "#makesudo user <user_id>: Macht User zum Superuser",
"/makesudo delete <user_id>: Macht User zum Superuser" "#makesudo delete <user_id>: Macht User zum Superuser"
}, },
patterns = { patterns = {
"^/(whitelist) (enable)$", "^#(whitelist) (enable)$",
"^/(whitelist) (disable)$", "^#(whitelist) (disable)$",
"^/(whitelist) (user) (%d+)$", "^#(whitelist) (user) (%d+)$",
"^/(whitelist) (chat)$", "^#(whitelist) (chat)$",
"^/(whitelist) (delete) (user) (%d+)$", "^#(whitelist) (delete) (user) (%d+)$",
"^/(whitelist) (delete) (chat)$", "^#(whitelist) (delete) (chat)$",
"^/(ban) (user) (%d+)$", "^#(ban) (user) (%d+)$",
"^/(ban) (delete) (%d+)$", "^#(ban) (delete) (%d+)$",
"^/(kick) (%d+)$", "^#(kick) (%d+)$",
--"^//tgservice (.+)$", --"^//tgservice (.+)$",
"^/(makesudo) (user) (%d+)$", "^#(makesudo) (user) (%d+)$",
"^/(makesudo) (delete) (%d+)$" "^#(makesudo) (delete) (%d+)$"
}, },
run = run, run = run,
pre_process = pre_process, pre_process = pre_process,

View File

@ -7,7 +7,7 @@ end
return { return {
description = "", description = "",
usage = {""}, usage = {""},
patterns = {"^/me (.*)$"}, patterns = {"^#me (.*)$"},
run = run run = run
} }
--by Akamaru [https://ponywave.de] --by Akamaru [https://ponywave.de]

View File

@ -1,6 +1,6 @@
local usage = { local usage = {
"/mine [IP]: Sucht Minecraft-Server und sendet Infos. Standard-Port: 25565", "#mine [IP]: Sucht Minecraft-Server und sendet Infos. Standard-Port: 25565",
"/mine [IP] [Port]: Sucht Minecraft-Server auf Port und sendet Infos.", "#mine [IP] [Port]: Sucht Minecraft-Server auf Port und sendet Infos.",
} }
local function mineSearch(ip, port, receiver) --25565 local function mineSearch(ip, port, receiver) --25565
@ -51,14 +51,14 @@ local function mineSearch(ip, port, receiver) --25565
end end
local function parseText(chat, text) local function parseText(chat, text)
if (text == nil or text == "/mine") then if (text == nil or text == "#mine") then
return usage return usage
end end
ip, port = string.match(text, "^/mine (.-) (.*)$") ip, port = string.match(text, "^#mine (.-) (.*)$")
if (ip ~= nil and port ~= nil) then if (ip ~= nil and port ~= nil) then
return mineSearch(ip, port, chat) return mineSearch(ip, port, chat)
end end
local ip = string.match(text, "^/mine (.*)$") local ip = string.match(text, "^#mine (.*)$")
if (ip ~= nil) then if (ip ~= nil) then
return mineSearch(ip, "25565", chat) return mineSearch(ip, "25565", chat)
end end
@ -76,7 +76,7 @@ return {
description = "Dursucht Minecraft-Server und sendet Infos", description = "Dursucht Minecraft-Server und sendet Infos",
usage = usage, usage = usage,
patterns = { patterns = {
"^/mine (.*)$" "^#mine (.*)$"
}, },
run = run run = run
} }

View File

@ -7,8 +7,8 @@ end
return { return {
description = "Sendet einen 3D Minecraft Skin", description = "Sendet einen 3D Minecraft Skin",
usage = {"/skin [Name]"}, usage = {"#skin [Name]"},
patterns = {"^/skin (.*)$",}, patterns = {"^#skin (.*)$",},
run = run run = run
} }
--by Akamaru [https://ponywave.de] --by Akamaru [https://ponywave.de]

View File

@ -1,4 +1,4 @@
do do
-- Base search URL -- Base search URL
local BASE_URL = 'http://pleer.com/mobile/search?q=' local BASE_URL = 'http://pleer.com/mobile/search?q='
@ -77,8 +77,8 @@
return { return {
description = 'Search and get music from pleer', description = 'Search and get music from pleer',
usage = {'/music','/musik'}, usage = {'#music','#musik'},
patterns = {'^/music (.*)$','^/musik (.*)$'}, patterns = {'^#music (.*)$','^#musik (.*)$'},
run = run run = run
} }

View File

@ -39,11 +39,11 @@ end
return { return {
description = "Sendet MP3 und Infos eines Tracks von music.163.com", description = "Sendet MP3 und Infos eines Tracks von music.163.com",
usage = { usage = {
"/getmp3 [ID]: Downloadet MP3 und sendet Infos", "#getmp3 [ID]: Downloadet MP3 und sendet Infos",
"Link zu music.163.com-Track: Downloadet MP3 und sendet Infos" "Link zu music.163.com-Track: Downloadet MP3 und sendet Infos"
}, },
patterns = { patterns = {
"^/getmp3 (%d+[%d%.]*)", "^#getmp3 (%d+[%d%.]*)",
"music.163.com/%#/song%?id=(%d+[%d%.]*)", "music.163.com/%#/song%?id=(%d+[%d%.]*)",
"music.163.com/song%?id=(%d+[%d%.]*)" "music.163.com/song%?id=(%d+[%d%.]*)"
}, },

View File

@ -124,10 +124,10 @@ end
return { return {
description = "Sendet Infos zu einem Anime.", description = "Sendet Infos zu einem Anime.",
usage = "/anime [Anime]: Sendet Infos zum Anime", usage = "#anime [Anime]: Sendet Infos zum Anime",
patterns = {"^/anime (.+)$", patterns = {"^#anime (.+)$",
"^/mal (.*)$", "^#mal (.*)$",
"^/myanimelist (.*)$)", "^#myanimelist (.*)$)",
"^https?://myanimelist.net/anime/[0-9]+/(.*)$" "^https?://myanimelist.net/anime/[0-9]+/(.*)$"
}, },
run = run run = run

View File

@ -123,8 +123,8 @@ end
return { return {
description = "Sendet Infos zu einem manga.", description = "Sendet Infos zu einem manga.",
usage = "/manga [manga]: Sendet Infos zum manga", usage = "#manga [manga]: Sendet Infos zum manga",
patterns = {"^/[Mm][Aa][Nn][Gg][Aa] (.+)$", patterns = {"^#[Mm][Aa][Nn][Gg][Aa] (.+)$",
"^https?://myanimelist.net/manga/[0-9]+/(.*)$" "^https?://myanimelist.net/manga/[0-9]+/(.*)$"
}, },
run = run run = run

View File

@ -30,8 +30,8 @@ end
return { return {
description = "Sendet Infos zu einem MAL-User.", description = "Sendet Infos zu einem MAL-User.",
usage = "/malu [Name]: Sendet Infos zum User", usage = "#malu [Name]: Sendet Infos zum User",
patterns = {"^/malu (.+)$", patterns = {"^#malu (.+)$",
"myanimelist.net/profile/(.*)$" "myanimelist.net/profile/(.*)$"
}, },
run = run run = run

View File

@ -40,8 +40,8 @@ end
return { return {
description = "Zeigt den zuletzt hinzugefügten Artikel eines MyFigureCollection Users", description = "Zeigt den zuletzt hinzugefügten Artikel eines MyFigureCollection Users",
usage = "/mfc [Name]", usage = "#mfc [Name]",
patterns = {"^/[Mm][Ff][Cc] (.*)$", patterns = {"^#[Mm][Ff][Cc] (.*)$",
"myfigurecollection.net/user/(.*)$", "myfigurecollection.net/user/(.*)$",
"myfigurecollection.net/collection/(.*)$" "myfigurecollection.net/collection/(.*)$"
}, },

View File

@ -81,12 +81,12 @@ end
return { return {
description = "Benachrichtigt User, wenn er/sie erwähnt wird.", description = "Benachrichtigt User, wenn er/sie erwähnt wird.",
usage = { usage = {
"/notify: Benachrichtigt dich privat, wenn du erwähnt wirst", "#notify: Benachrichtigt dich privat, wenn du erwähnt wirst",
"/notify del: Benachrichtigt dich nicht mehr" "#notify del: Benachrichtigt dich nicht mehr"
}, },
patterns = { patterns = {
"^/notify (del)$", "^#notify (del)$",
"^/notify$" "^#notify$"
}, },
run = run, run = run,
pre_process = pre_process, pre_process = pre_process,

View File

@ -21,7 +21,7 @@ end
return { return {
description = "Sendet eine Nachricht an dich selbst", description = "Sendet eine Nachricht an dich selbst",
usage = {"/note [Nachricht]"}, usage = {"#note [Nachricht]"},
patterns = {"^/note (.*)$","^/notiz (.*)$"}, patterns = {"^#note (.*)$","^#notiz (.*)$"},
run = run run = run
} }

View File

@ -53,8 +53,8 @@ end
return { return {
description = "Sendet Webseiten-Screenshot.", description = "Sendet Webseiten-Screenshot.",
usage = {"/scrot2 [URL]"}, usage = {"#scrot2 [URL]"},
patterns = {"^/scrot2 (https?://[%w-_%.%?%.:/%+=&]+)"}, patterns = {"^#scrot2 (https?://[%w-_%.%?%.:/%+=&]+)"},
run = run run = run
} }

View File

@ -21,8 +21,8 @@ end
return { return {
description = "Sendet PageSpeed-Score.", description = "Sendet PageSpeed-Score.",
usage = "/speed [URL]: Sendet PageSpeed-Score dieser Seite", usage = "#speed [URL]: Sendet PageSpeed-Score dieser Seite",
patterns = {"^/speed (https?://[%w-_%.%?%.:/%+=&]+)"}, patterns = {"^#speed (https?://[%w-_%.%?%.:/%+=&]+)"},
run = run run = run
} }

44
plugins/pegelf_mc.lua Normal file
View File

@ -0,0 +1,44 @@
do
local function del_mc_color(grr)
grr = string.gsub(grr, '§b', '')
grr = string.gsub(grr, '§l', '')
grr = string.gsub(grr, '§7', '')
grr = string.gsub(grr, '§r', '')
grr = string.gsub(grr, '§2', '')
grr = string.gsub(grr, '§c', '')
return grr
end
local function get_pmc(post)
local url = 'https://api.pegelf.de/mc'
local res,code = https.request(url)
local data = json:decode(res)
if code ~= 200 then return "HTTP-Fehler" end
if not data then return "HTTP-Fehler" end
local title = del_mc_color(data.motd)
local title2 = data.brand
local vers = data.version
local map = data.map
local max_play = data.max_players
local text = unescape(title..'\n'..title2..' ('..vers..')\nWelt: '..map..'\nMax. Spieler: '..max_play..'\n')
return text
end
local function run(msg, matches)
local text = get_pmc(post)
return text
end
return {
description = "Sendet letzten Aka's Blog Beitrag",
usage = "",
patterns = {"^#[Pp][Mm][Cc]$"},
run = run
}
end

View File

@ -129,8 +129,8 @@ end
return { return {
description = "Suche für Plex Media Server", description = "Suche für Plex Media Server",
usage = "/plex [BEGRIFF]", usage = "#plex [BEGRIFF]",
patterns = {"^/[Pp][Ll][Ee][Xx] (.*)$"}, patterns = {"^#[Pp][Ll][Ee][Xx] (.*)$"},
run = run run = run
} }

View File

@ -132,7 +132,7 @@ end
local function run(msg, matches) local function run(msg, matches)
-- Show the available plugins -- Show the available plugins
if matches[1] == '/plugins' then if matches[1] == '#plugins' then
return list_plugins() return list_plugins()
end end
@ -186,26 +186,26 @@ end
return { return {
description = "Aktiviert, deaktiviert und lädt Plugins (nur Superuser)", description = "Aktiviert, deaktiviert und lädt Plugins (nur Superuser)",
usage = { usage = {
"/plugins: Liste alle Plugins auf.", "#plugins: Liste alle Plugins auf.",
"/plugins enable [plugin]: Aktiviert Plugin.", "#plugins enable [plugin]: Aktiviert Plugin.",
"/plugins disable [plugin]: Deaktiviert Plugin.", "#plugins disable [plugin]: Deaktiviert Plugin.",
"/plugins enable [plugin] chat: Aktiviert Plugin in diesem Chat.", "#plugins enable [plugin] chat: Aktiviert Plugin in diesem Chat.",
"/plugins enable [plugin] chat <ID>: Aktiviert Plugin in Chat <ID>.", "#plugins enable [plugin] chat <ID>: Aktiviert Plugin in Chat <ID>.",
"/plugins disable [plugin] chat: Deaktiviert Plugin in diesem Chat.", "#plugins disable [plugin] chat: Deaktiviert Plugin in diesem Chat.",
"/plugins disable [plugin] chat <ID>: Deaktiviert Plugin in Chat <ID>.", "#plugins disable [plugin] chat <ID>: Deaktiviert Plugin in Chat <ID>.",
"/plugins reload: Lädt alle Plugins neu.", "#plugins reload: Lädt alle Plugins neu.",
"/reload: Lädt alle Plugins neu." "#reload: Lädt alle Plugins neu."
}, },
patterns = { patterns = {
"^/plugins$", "^#plugins$",
"^/plugins? (enable) ([%w_%.%-]+)$", "^#plugins? (enable) ([%w_%.%-]+)$",
"^/plugins? (disable) ([%w_%.%-]+)$", "^#plugins? (disable) ([%w_%.%-]+)$",
"^/plugins? (enable) ([%w_%.%-]+) (chat) (%d+)", "^#plugins? (enable) ([%w_%.%-]+) (chat) (%d+)",
"^/plugins? (enable) ([%w_%.%-]+) (chat)", "^#plugins? (enable) ([%w_%.%-]+) (chat)",
"^/plugins? (disable) ([%w_%.%-]+) (chat) (%d+)", "^#plugins? (disable) ([%w_%.%-]+) (chat) (%d+)",
"^/plugins? (disable) ([%w_%.%-]+) (chat)", "^#plugins? (disable) ([%w_%.%-]+) (chat)",
"^/plugins? (reload)$", "^#plugins? (reload)$",
"^/(reload)$" "^#(reload)$"
}, },
run = run, run = run,
privileged = true privileged = true

View File

@ -63,8 +63,8 @@ end
return { return {
description = "Pokedex für Telegram", description = "Pokedex für Telegram",
usage = {"/pokedex [Name/ID]","/pokemon [Name/ID]","/pkmn [Name/ID]"}, usage = {"#pokedex [Name/ID]","#pokemon [Name/ID]","#pkmn [Name/ID]"},
patterns = {"^/pokedex (.*)$","^/pokemon (.+)$","^/pkmn (.+)$"}, patterns = {"^#pokedex (.*)$","^#pokemon (.+)$","^#pkmn (.+)$"},
run = run run = run
} }

View File

@ -44,8 +44,8 @@ end
return { return {
description = "Sendet zufälliges Ponyface", description = "Sendet zufälliges Ponyface",
usage = "/ponyface [Tags]","/pf [Tags]", usage = "#ponyface [Tags]","#pf [Tags]",
patterns = {"^/ponyface (.*)$","^/pf (.*)$","ponyfac.es/(%d+[%d%.]*)"}, patterns = {"^#ponyface (.*)$","^#pf (.*)$","ponyfac.es/(%d+[%d%.]*)"},
run = run run = run
} }

View File

@ -44,8 +44,8 @@ end
return { return {
description = "Sendet letzten PonyWave Beitrag", description = "Sendet letzten PonyWave Beitrag",
usage = "/pw", usage = "#pw",
patterns = {"^/[Pp][Ww]$"}, patterns = {"^#[Pp][Ww]$"},
run = run run = run
} }

View File

@ -9,7 +9,7 @@ end
return { return {
description = "", description = "",
usage = {""}, usage = {""},
patterns = {"^/pdoge$"}, patterns = {"^#pdoge$"},
run = run run = run
} }
--by Akamaru [https://ponywave.de] --by Akamaru [https://ponywave.de]

View File

@ -12,8 +12,8 @@ end
return { return {
description = "Sendet GIFs von Pornhub.com", description = "Sendet GIFs von Pornhub.com",
usage = {"pornhub.com URL","/porngif [ID]","/phg [ID]"}, usage = {"pornhub.com URL","#porngif [ID]","#phg [ID]"},
patterns = {"pornhub.com/gif/(.*)$","^/phg (.*)$","^/porngif (.*)$"}, patterns = {"pornhub.com/gif/(.*)$","^#phg (.*)$","^#porngif (.*)$"},
run = run run = run
} }
--by Akamaru [https://ponywave.de] --by Akamaru [https://ponywave.de]

View File

@ -87,16 +87,16 @@ end
return { return {
description = {"qr code plugin for telegram, given a text it returns the qr code"}, description = {"qr code plugin for telegram, given a text it returns the qr code"},
usage = { usage = {
"/qr [text]", "#qr [text]",
'/qr "[background color]" "[data color]" [text]', '#qr "[background color]" "[data color]" [text]',
".......................................................", ".......................................................",
"Color through text: red|green|blue|purple|black|white|gray", "Color through text: red|green|blue|purple|black|white|gray",
"Or colors through hex notation: (\"a56729\" is brown)", "Or colors through hex notation: (\"a56729\" is brown)",
"Or colors through decimals: (\"255-192-203\" is pink)" "Or colors through decimals: (\"255-192-203\" is pink)"
}, },
patterns = { patterns = {
'^/qr "(.+)" "(.+)" (.+)$', '^#qr "(.+)" "(.+)" (.+)$',
"^/qr (.+)$" "^#qr (.+)$"
}, },
run = run run = run
} }

View File

@ -2,7 +2,7 @@ do
local function save_quote(msg) local function save_quote(msg)
if msg.text:sub(11):isempty() then if msg.text:sub(11):isempty() then
return "Benutzung: /addquote [Zitat]" return "Benutzung: #addquote [Zitat]"
end end
local quote = msg.text:sub(11) local quote = msg.text:sub(11)
@ -14,7 +14,7 @@ end
local function delete_quote(msg) local function delete_quote(msg)
if msg.text:sub(11):isempty() then if msg.text:sub(11):isempty() then
return "Benutzung: /delquote [Zitat]" return "Benutzung: #delquote [Zitat]"
end end
local quote = msg.text:sub(11) local quote = msg.text:sub(11)
@ -36,7 +36,7 @@ local function get_quote(msg)
print('Getting quote from redis set '..hash) print('Getting quote from redis set '..hash)
local quotes_table = redis:smembers(hash) local quotes_table = redis:smembers(hash)
if not quotes_table[1] then if not quotes_table[1] then
return 'Es wurden noch keine Zitate gespeichert.\nSpeichere doch welche mit /addquote [Zitat]' return 'Es wurden noch keine Zitate gespeichert.\nSpeichere doch welche mit #addquote [Zitat]'
else else
return quotes_table[math.random(1,#quotes_table)] return quotes_table[math.random(1,#quotes_table)]
end end
@ -54,7 +54,7 @@ local function list_quotes(msg)
text = text..num..") "..quote..'\n' text = text..num..") "..quote..'\n'
end end
if not text or text == "" then if not text or text == "" then
return 'Es wurden noch keine Zitate gespeichert.\nSpeichere doch welche mit /addquote [Zitat]' return 'Es wurden noch keine Zitate gespeichert.\nSpeichere doch welche mit #addquote [Zitat]'
else else
return text return text
end end
@ -80,16 +80,16 @@ end
return { return {
description = "Zitate speichern, löschen und abrufen.", description = "Zitate speichern, löschen und abrufen.",
usage = { usage = {
"/addquote [Zitat]: Fügt Zitat hinzu.", "#addquote [Zitat]: Fügt Zitat hinzu.",
"/quote: Gibt zufälliges Zitat aus.", "#quote: Gibt zufälliges Zitat aus.",
"/delquote [Zitat]: Löscht das Zitat (nur Superuser)", "#delquote [Zitat]: Löscht das Zitat (nur Superuser)",
"/listsquotes: Listet alle Zitate auf" "#listsquotes: Listet alle Zitate auf"
}, },
patterns = { patterns = {
"^/(delquote) (.+)$", "^#(delquote) (.+)$",
"^/(addquote) (.+)$", "^#(addquote) (.+)$",
"^/(quote)$", "^#(quote)$",
"^/(listquotes)$" "^#(listquotes)$"
}, },
run = run run = run
} }

View File

@ -37,8 +37,8 @@ end
return { return {
description = "Sendet ein zufälliges Bild", description = "Sendet ein zufälliges Bild",
usage = {"/rpic [Thema]","Themen:","anime","mlp","faktillon","faktastisch","gamefakt","faktglaublich"}, usage = {"#rpic [Thema]","Themen:","anime","mlp","faktillon","faktastisch","gamefakt","faktglaublich"},
patterns = {"^/rpic (.*)$"}, patterns = {"^#rpic (.*)$"},
run = run run = run
} }
end end

View File

@ -8,9 +8,9 @@ end
function run(msg, matches) function run(msg, matches)
local pics = { local pics = {
-- add more below! -- add more below!
["/nsfw"] = "../Bilder/Mikubot/nsfw/", ["#nsfw"] = "../Bilder/Mikubot/nsfw/",
["/nsfw gif"] = "../Bilder/Mikubot/nsfw/gifs/", ["#nsfw gif"] = "../Bilder/Mikubot/nsfw/gifs/",
["/nsfw shimakaze"] = "../Bilder/Mikubot/nsfw/Shimakaze/" ["#nsfw shimakaze"] = "../Bilder/Mikubot/nsfw/Shimakaze/"
} }
local receiver = get_receiver(msg) local receiver = get_receiver(msg)
@ -33,8 +33,8 @@ end
return { return {
description = "Sendet ein zufälliges Bild (NSFW)", description = "Sendet ein zufälliges Bild (NSFW)",
usage = {"/nsfw","/nsfw gif","/nsfw shimakaze"}, usage = {"#nsfw","#nsfw gif","#nsfw shimakaze"},
patterns = {"^/nsfw$","^/nsfw gif$","^/nsfw shimakaze$"}, patterns = {"^#nsfw$","^#nsfw gif$","^#nsfw shimakaze$"},
run = run run = run
} }
end end

View File

@ -22,8 +22,8 @@ end
return { return {
description = "", description = "",
usage = "/random [Name]", usage = "#random [Name]",
patterns = {"^/random (.*)$"}, patterns = {"^#random (.*)$"},
run = run run = run
} }
--by Akamaru [https://ponywave.de] --by Akamaru [https://ponywave.de]

View File

@ -24,11 +24,11 @@ end
return { return {
description = "Rechnen mit der mathjs-API", description = "Rechnen mit der mathjs-API",
usage = { usage = {
"/calc [Ausdruck]: Rechnet", "#calc [Ausdruck]: Rechnet",
"Weitere Hilfe: + = Plus, - = Minus, * = Mal, / = geteilt" "Weitere Hilfe: + = Plus, - = Minus, * = Mal, / = geteilt"
}, },
patterns = { patterns = {
"^/calc (.*)$" "^#calc (.*)$"
}, },
run = run run = run
} }

View File

@ -33,12 +33,12 @@ end
return { return {
description = "Erinnert dich an etwas in XX Sekunden/Minuten (BETA)", description = "Erinnert dich an etwas in XX Sekunden/Minuten (BETA)",
usage = { usage = {
"/remindme (Zahl)s [Text]: Erinnert dich in XX Sekunden", "#remindme (Zahl)s [Text]: Erinnert dich in XX Sekunden",
"/remindme (Zahl)m [Text]: Erinnert dich in XX Minuten" "#remindme (Zahl)m [Text]: Erinnert dich in XX Minuten"
}, },
patterns = { patterns = {
"^/remindme (%d+)(s) (.+)$", "^#remindme (%d+)(s) (.+)$",
"^/remindme (%d+)(m) (.+)$", "^#remindme (%d+)(m) (.+)$",
}, },
run = run run = run
} }

Some files were not shown because too many files have changed in this diff Show More