diff --git a/bot/bot.lua b/bot/bot.lua index 9b7a9ab..c8d8dbe 100644 --- a/bot/bot.lua +++ b/bot/bot.lua @@ -93,8 +93,8 @@ end function pre_process_service_msg(msg) if msg.service then local action = msg.action or {type=""} - -- Double / to discriminate of normal actions - msg.text = "//tgservice " .. action.type + -- Double # to discriminate of normal actions + msg.text = "##tgservice " .. action.type -- wipe the data to allow the bot to read service messages if msg.out then diff --git a/bot/utils.lua b/bot/utils.lua index 4dfc7ca..92b169b 100644 --- a/bot/utils.lua +++ b/bot/utils.lua @@ -80,7 +80,7 @@ function get_http_file_name(url, headers) end -- 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 function download_to_file(url, file_name) print("Download URL: "..url) @@ -837,3 +837,11 @@ function convert_timestamp(timestamp, format) local converted_date = string.gsub(converted_date, '%\n', '') return converted_date end + +function pretty_float(x) + if x % 1 == 0 then + return tostring(math.floor(x)) + else + return tostring(x) + end +end diff --git a/plugins/9gag.lua b/plugins/9gag.lua index 94afe03..40a6454 100644 --- a/plugins/9gag.lua +++ b/plugins/9gag.lua @@ -26,9 +26,9 @@ end return { 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 = { - "^/9gag$" + "^#9gag$" }, run = run } diff --git a/plugins/afk.lua b/plugins/afk.lua index 7d2c4dc..745dc24 100644 --- a/plugins/afk.lua +++ b/plugins/afk.lua @@ -107,10 +107,10 @@ end return { 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 = { - "^/([A|a][F|f][K|k])$", - "^/([A|a][F|f][K|k]) (.*)$" + "^#([Aa][Ff][Kk])$", + "^#([Aa][Ff][Kk]) (.*)$" }, run = run, pre_process = pre_process diff --git a/plugins/akasblog.lua b/plugins/akasblog.lua index c8788b5..f6a09b4 100644 --- a/plugins/akasblog.lua +++ b/plugins/akasblog.lua @@ -46,8 +46,8 @@ end return { description = "Sendet letzten Aka's Blog Beitrag", - usage = "/aka", - patterns = {"^/[Aa][Kk][Aa]$"}, + usage = "#aka", + patterns = {"^#[Aa][Kk][Aa]$"}, run = run } diff --git a/plugins/akasblog_search.lua b/plugins/akasblog_search.lua index 32ead68..a0b0da2 100644 --- a/plugins/akasblog_search.lua +++ b/plugins/akasblog_search.lua @@ -47,8 +47,8 @@ end return { description = "Suche für Aka's Blog", - usage = "/aka [BEGRIFF]", - patterns = {"^/[Aa][Kk][Aa] (.*)$"}, + usage = "#aka [BEGRIFF]", + patterns = {"^#[Aa][Kk][Aa] (.*)$"}, run = run } diff --git a/plugins/aktien.lua b/plugins/aktien.lua index 6059ca8..0934925 100644 --- a/plugins/aktien.lua +++ b/plugins/aktien.lua @@ -41,12 +41,12 @@ end return { description = "Sendet Aktieninfos", - usage = "/aktien [Symbol]: Sendet Aktieninfos", + usage = "#aktien [Symbol]: Sendet Aktieninfos", patterns = { - "^/aktien ([A-Za-z0-9]+)$", - "^/stocks ([A-Za-z0-9]+)$", - "^/aktie ([A-Za-z0-9]+)$", - "^/stock ([A-Za-z0-9]+)$" + "^#aktien ([A-Za-z0-9]+)$", + "^#stocks ([A-Za-z0-9]+)$", + "^#aktie ([A-Za-z0-9]+)$", + "^#stock ([A-Za-z0-9]+)$" }, run = run } diff --git a/plugins/app_store.lua b/plugins/app_store.lua index f57fb33..f33f2ff 100644 --- a/plugins/app_store.lua +++ b/plugins/app_store.lua @@ -111,10 +111,10 @@ end return { description = "Sendet iPhone App-Store Info.", usage = {"Link zu App auf iTunes", - "/itunes (ID)" + "#itunes (ID)" }, patterns = {"itunes.apple.com/(.*)/app/(.*)/id(%d+)", - "^/itunes (%d+)$" + "^#itunes (%d+)$" }, run = run } diff --git a/plugins/birthday_get.lua b/plugins/birthday_get.lua index 92406a5..75c5e1b 100644 --- a/plugins/birthday_get.lua +++ b/plugins/birthday_get.lua @@ -40,12 +40,12 @@ end return { description = "Zeigt Geburtstage, die mit /setbd gesetzt wurden", usage = { - "/getbd: Gibt alle Geburtstage aus", - "/getbd (Name): Gibt den Geburtstag aus." + "#getbd: Gibt alle Geburtstage aus", + "#getbd (Name): Gibt den Geburtstag aus." }, patterns = { - "^(/getbd) (.+)$", - "^/getbd$" + "^(#getbd) (.+)$", + "^#getbd$" }, run = run } \ No newline at end of file diff --git a/plugins/birthday_set.lua b/plugins/birthday_set.lua index c7d4a6b..a62d01f 100644 --- a/plugins/birthday_set.lua +++ b/plugins/birthday_set.lua @@ -1,6 +1,6 @@ local function save_value(msg, name, value) if (not name or not value) then - return "Benutzung: /setbd [Name] [Tag. Monat]" + return "Benutzung: #setbd [Name] [Tag. Monat]" end local hash = 'telegram:birthdays' @@ -37,11 +37,11 @@ end return { description = "Speichert Geburtstage.", usage = { - "/setbd [Name] [Tag. Monat]: Speichert ein Geburtstag.", - "/setbd (Name) nil: Löscht Geburtstag" + "#setbd [Name] [Tag. Monat]: Speichert ein Geburtstag.", + "#setbd (Name) nil: Löscht Geburtstag" }, patterns = { - "^/setbd ([^%s]+) (.+)$" + "^#setbd ([^%s]+) (.+)$" }, run = run } \ No newline at end of file diff --git a/plugins/boobs.lua b/plugins/boobs.lua index 9cfcaae..e0dfd05 100644 --- a/plugins/boobs.lua +++ b/plugins/boobs.lua @@ -40,11 +40,11 @@ end local function run(msg, matches) local url = nil - if matches[1] == "/boobs" then + if matches[1] == "#boobs" then url = getRandomBoobs() end - if matches[1] == "/butts" then + if matches[1] == "#butts" then url = getRandomButts() end @@ -59,8 +59,8 @@ end return { description = "Sendet ein zuflliges Boobs/Butts Bild", - usage = {"/boobs","/butts"}, - patterns = {"^/boobs$","^/butts$"}, + usage = {"#boobs","#butts"}, + patterns = {"^#boobs$","^#butts$"}, run = run } diff --git a/plugins/btc.lua b/plugins/btc.lua index b8428e9..692033e 100644 --- a/plugins/btc.lua +++ b/plugins/btc.lua @@ -25,7 +25,7 @@ local function run(msg, matches) local amt = nil -- Get the global match out of the way - if matches[1] == "!btc" then + if matches[1] == "#btc" then return getBTCX(amt,cur) end @@ -43,15 +43,15 @@ end return { description = "Globaler Bitcoin-Wert (in EUR oder USD)", usage = { - "/btc: Zeigt aktuellen Bitcoin-Kurs", - "/btc [EUR|USD] [Menge]: Rechnet Bitcoin in Euro/USD um" + "#btc: Zeigt aktuellen Bitcoin-Kurs", + "#btc [EUR|USD] [Menge]: Rechnet Bitcoin in Euro/USD um" }, patterns = { - "^/btc$", - "^/btc ([Ee][Uu][Rr])$", - "^/btc ([Uu][Ss][Dd])$", - "^/btc (EUR) (%d+[%d%.]*)$", - "^/btc (USD) (%d+[%d%.]*)$" + "^#btc$", + "^#btc ([Ee][Uu][Rr])$", + "^#btc ([Uu][Ss][Dd])$", + "^#btc (EUR) (%d+[%d%.]*)$", + "^#btc (USD) (%d+[%d%.]*)$" }, run = run } \ No newline at end of file diff --git a/plugins/change_pic.lua b/plugins/change_pic.lua index da5329c..2a5a5aa 100644 --- a/plugins/change_pic.lua +++ b/plugins/change_pic.lua @@ -8,8 +8,8 @@ end return { description = "", - usage = {"/pic BILDURL"}, - patterns = {"^/pic (.*)$"}, + usage = {"#pic BILDURL"}, + patterns = {"^#pic (.*)$"}, run = run, notyping = true } diff --git a/plugins/channels.lua b/plugins/channels.lua index 8c378bb..b1caeb5 100644 --- a/plugins/channels.lua +++ b/plugins/channels.lua @@ -38,7 +38,7 @@ local function pre_process(msg) -- If is sudo can reeanble the channel if is_sudo(msg) then - if msg.text == "/channel enable" then + if msg.text == "#channel enable" then enable_channel(msg) end end @@ -65,12 +65,12 @@ end return { description = "(De)aktiviert den Bot im Chat (nur Superuser).", usage = { - "/channel enable: Aktiviert den Bot im Chat", - "/channel disable: Deaktiviert den Bot im Chat" + "#channel enable: Aktiviert den Bot im Chat", + "#channel disable: Deaktiviert den Bot im Chat" }, patterns = { - "^/channel? (enable)", - "^/channel? (disable)" + "^#channel? (enable)", + "^#channel? (disable)" }, run = run, privileged = true, diff --git a/plugins/chucknorris.lua b/plugins/chucknorris.lua index 7915948..9d034e8 100644 --- a/plugins/chucknorris.lua +++ b/plugins/chucknorris.lua @@ -12,7 +12,7 @@ end return { description = "Sendet Chuck Norris Witze (Englisch)", - usage = {"/cn"}, - patterns = {"^/cn$"}, + usage = {"#cn"}, + patterns = {"^#cn$"}, run = run } \ No newline at end of file diff --git a/plugins/cleverbot.lua b/plugins/cleverbot.lua index 739212d..0cf1b3e 100644 --- a/plugins/cleverbot.lua +++ b/plugins/cleverbot.lua @@ -19,8 +19,8 @@ end return { description = "Chat mit CleverBot", - usage = "/cbot [Text]: Befragt den Cleverbot", - patterns = {"^/cbot (.*)$"}, + usage = "#cbot [Text]: Befragt den Cleverbot", + patterns = {"^#cbot (.*)$"}, run = run } diff --git a/plugins/cowsay.lua b/plugins/cowsay.lua index 735947a..32170c3 100644 --- a/plugins/cowsay.lua +++ b/plugins/cowsay.lua @@ -12,7 +12,7 @@ end return { description = "", usage = {""}, - patterns = {"^/cowsay (.*)$"}, + patterns = {"^#cowsay (.*)$"}, run = run } --by Akamaru [https://ponywave.de] \ No newline at end of file diff --git a/plugins/create_sticker.lua b/plugins/create_sticker.lua index 4deb9ec..57b6143 100644 --- a/plugins/create_sticker.lua +++ b/plugins/create_sticker.lua @@ -47,9 +47,9 @@ end return { 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 = { - "^/sticker (https?://[%w-_%.%?%.:/%+=&]+)" + "^#sticker (https?://[%w-_%.%?%.:/%+=&]+)" }, run = run } diff --git a/plugins/credentials_manager.lua b/plugins/credentials_manager.lua index e499134..18e4e99 100644 --- a/plugins/credentials_manager.lua +++ b/plugins/credentials_manager.lua @@ -82,16 +82,16 @@ function run(msg, matches) return 'Das Plugin solltest du nur per PN nutzen!' end - if matches[1] == "!creds" then + if matches[1] == "#creds" then 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 key = string.sub(matches[3], 1, 1000) return add_creds(var, key) - elseif matches[1] == "!creds del" then + elseif matches[1] == "#creds del" then local var = string.lower(matches[2]) 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 newvar = string.lower(string.sub(matches[3], 1, 1000)) return rename_creds(var, newvar) @@ -101,10 +101,10 @@ end return { description = "Loginmanager fr Telegram (nur Superuser)", usage = { - "/creds: Zeigt alle Logindaten und API-Keys", - "/creds add [Variable] [Key]: Speichert Key mit der Variable ein", - "/creds del [Variable]: Lscht Key mit der Variable", - "/creds rename [Variable] [Neuer Name]: Benennt Variable um, behlt Key bei" + "#creds: Zeigt alle Logindaten und API-Keys", + "#creds add [Variable] [Key]: Speichert Key mit der Variable ein", + "#creds del [Variable]: Lscht Key mit der Variable", + "#creds rename [Variable] [Neuer Name]: Benennt Variable um, behlt Key bei" }, patterns = { "^(/creds)$", diff --git a/plugins/curl_head.lua b/plugins/curl_head.lua index 5ffe390..acaefb5 100644 --- a/plugins/curl_head.lua +++ b/plugins/curl_head.lua @@ -18,7 +18,7 @@ end return { description = "Fhrt Befehle in der Konsole aus", usage = {""}, - patterns = {"^/[Hh][Ee][Aa][Dd] (.*)$","^/[Dd][Ii][Gg] (.*)"}, + patterns = {"^#[Hh][Ee][Aa][Dd] (.*)$","^#[Dd][Ii][Gg] (.*)"}, run = run } --by Akamaru [https://ponywave.de] \ No newline at end of file diff --git a/plugins/currency.lua b/plugins/currency.lua index 1c4d83a..a7b3a6a 100644 --- a/plugins/currency.lua +++ b/plugins/currency.lua @@ -51,12 +51,12 @@ end return { 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 = { - "^/money ([A-Za-z]+)$", - "^/money ([A-Za-z]+) ([A-Za-z]+)$", - "^(money ([A-Za-z]+) ([A-Za-z]+) (%d+[%d%.,]*)$", - "^(/eur)$" + "^#money ([A-Za-z]+)$", + "^#money ([A-Za-z]+) ([A-Za-z]+)$", + "^(#money ([A-Za-z]+) ([A-Za-z]+) (%d+[%d%.,]*)$", + "^(#eur)$" }, run = run } diff --git a/plugins/danbooru.lua b/plugins/danbooru.lua index 3ee56ee..f433f40 100644 --- a/plugins/danbooru.lua +++ b/plugins/danbooru.lua @@ -19,7 +19,7 @@ local function run(msg, matches) local url = URL - if matches[1] == "/dan" then + if matches[1] == "#dan" then url = url .. URL_NEW else url = url .. URL_POP @@ -57,15 +57,15 @@ end return { description = "Gets a random fresh or popular image from Danbooru", usage = { - "/dan - gets a random fresh image from Danbooru 🔞", - "/dan d - random daily popular image 🔞", - "/dan w - random weekly popular image 🔞", - "/dan m - random monthly popular image 🔞"}, + "#dan - gets a random fresh image from Danbooru 🔞", + "#dan d - random daily popular image 🔞", + "#dan w - random weekly popular image 🔞", + "#dan m - random monthly popular image 🔞"}, patterns = { - "^/dan$", - "^/dan ?(d)$", - "^/dan ?(w)$", - "^/dan ?(m)$"}, + "^#dan$", + "^#dan ?(d)$", + "^#dan ?(w)$", + "^#dan ?(m)$"}, run = run } diff --git a/plugins/danbooru2.lua b/plugins/danbooru2.lua index 9315483..bfac6b3 100644 --- a/plugins/danbooru2.lua +++ b/plugins/danbooru2.lua @@ -33,8 +33,8 @@ end return { description = "Sendet ein zufälliges Bild von Danbooru.", - usage = {"/danbooru [Tags]","/db [Tags]"}, - patterns = {"^/danbooru (.*)$","^/db (.*)$"}, + usage = {"#danbooru [Tags]","#db [Tags]"}, + patterns = {"^#danbooru (.*)$","^#db (.*)$"}, run = run } diff --git a/plugins/date.lua b/plugins/date.lua index 503cde1..0c0a6ab 100644 --- a/plugins/date.lua +++ b/plugins/date.lua @@ -29,8 +29,8 @@ end return { description = "Zeigt das aktuelle Datum und Zeit an", - usage = {"/date"}, - patterns = {"^/[D|d]ate$","^/[D|d]atum$"}, + usage = {"/#date"}, + patterns = {"^#[Dd][Aa][Tt][Ee]$","^#[Dd][Aa][Tt][Uu][Mm]$"}, run = run } --by Akamaru [https://ponywave.de] diff --git a/plugins/derpibooru.lua b/plugins/derpibooru.lua index f9cbf80..a373447 100644 --- a/plugins/derpibooru.lua +++ b/plugins/derpibooru.lua @@ -37,8 +37,8 @@ end return { description = "Sendet zuflliges Bild von Derpibooru.", - usage = {"/derpibooru [Tags]","/dp [Tags]"}, - patterns = {"^/derpibooru (.*)$","^/dp (.*)$"}, + usage = {"#derpibooru [Tags]","#dp [Tags]"}, + patterns = {"^#derpibooru (.*)$","^#dp (.*)$"}, run = run } diff --git a/plugins/derpibooru_nsfw.lua b/plugins/derpibooru_nsfw.lua index 9b35c1d..5a73708 100644 --- a/plugins/derpibooru_nsfw.lua +++ b/plugins/derpibooru_nsfw.lua @@ -37,8 +37,8 @@ end return { description = "Sendet zuflliges Bild von Derpibooru.", - usage = {"/derpibooru2 [Tags]","/dp2 [Tags]"}, - patterns = {"^/derpibooru2 (.*)$","^/dp2 (.*)$"}, + usage = {"#derpibooru2 [Tags]","#dp2 [Tags]"}, + patterns = {"^#derpibooru2 (.*)$","^#dp2 (.*)$"}, run = run } diff --git a/plugins/dns.lua b/plugins/dns.lua index 3e25f55..0db4b05 100644 --- a/plugins/dns.lua +++ b/plugins/dns.lua @@ -32,8 +32,8 @@ end return { description = "Löst Domain nach IP auf.", - usage = "/dns [Domain]", - patterns = {"^/dns (.*)$"}, + usage = "#dns [Domain]", + patterns = {"^#dns (.*)$"}, run = run } diff --git a/plugins/dogify.lua b/plugins/dogify.lua index dd221f3..e6513ef 100644 --- a/plugins/dogify.lua +++ b/plugins/dogify.lua @@ -8,7 +8,7 @@ end return { description = "Erstelle ein Doge Bild mit Wörtern", - usage = {"/dogify das/was/du/willst"}, - patterns = {"^/dogify (.+)$","^/doge (.+)$"}, + usage = {"#dogify das/was/du/willst"}, + patterns = {"^#dogify (.+)$","^#doge (.+)$"}, run = run } \ No newline at end of file diff --git a/plugins/e621.lua b/plugins/e621.lua index 41c2005..b779278 100644 --- a/plugins/e621.lua +++ b/plugins/e621.lua @@ -28,8 +28,8 @@ end return { description = "Sendet zufälliges Bild von e621.", - usage = {"/e621 [Tags]"}, - patterns = {"^/e621 (.*)$"}, + usage = {"#e621 [Tags]"}, + patterns = {"^#e621 (.*)$"}, run = run } diff --git a/plugins/echo.lua b/plugins/echo.lua index 323cd5b..21ff352 100644 --- a/plugins/echo.lua +++ b/plugins/echo.lua @@ -11,7 +11,7 @@ end return { description = "Wiederholt euch", - usage = {"/echo [Satz]","/Echo [Satz]"}, - patterns = {"^/echo (.*)$","^/Echo (.*)$"}, + usage = {"#echo [Satz]"}, + patterns = {"^#[Ee][Cc][Hh][Oo] (.*)$"}, run = run } diff --git a/plugins/ehentai.lua b/plugins/ehentai.lua index f75eb4e..0708a35 100644 --- a/plugins/ehentai.lua +++ b/plugins/ehentai.lua @@ -42,7 +42,7 @@ end function run(msg, matches) local url = nil local txt = nil - if matches[1] == "/eh" then + if matches[1] == "#eh" then url, txt = get_popular() elseif matches[1] == "pop" then url, txt = get_popular() @@ -57,14 +57,14 @@ end return { description = "Send an e-hentai manga info.", usage = { - "/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 top: Send a > 4-star e-hentai manga info." + "#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 top: Send a > 4-star e-hentai manga info." }, patterns = { - "^/eh$", - "^/eh (pop)$", - "^/eh (top)$", + "^#eh$", + "^#eh (pop)$", + "^#eh (top)$", }, run = run } diff --git a/plugins/emoticons.lua b/plugins/emoticons.lua index d0960c2..91e7039 100644 --- a/plugins/emoticons.lua +++ b/plugins/emoticons.lua @@ -1,11 +1,11 @@ -function run(msg, matches) +function run(msg, matches) return '😄😃😀😊☺️😉😍😘😚😗😙😜😝😛😳😁😔😌😒😞😣😢😂😭😪😥😰😅😓😩😫😨😱😠😡😤😖😆😋😷😎😴😵😲😟😦😧😈👿😮😬😐😕😯😶😇😏😑👲👳👮👷💂👶👦👧👨👩👴👵👱👼👸😺😸😻😽😼🙀😿😹😾👹👺🙈🙉🙊💀👽💩🔥✨🌟💫💥💢💦💧💤💨👂👀👃👅👄👍👎👌👊✊✌️👋✋👐👆👇👉👈🙌🙏☝️👏💪🚶🏃💃👫👪👬👭💏💑👯🙆🙅💁🙋💆💇💅👰🙎🙍🙇🎩👑👒👟👞👡👠👢👕👔👚👗🎽👖👘👙💼👜👝👛👓🎀🌂💄💛💙💜💚❤️💔💗💓💕💖💞💘💌💋💍💎👤👥💬👣💭🐶🐺🐱🐭🐹🐰🐸🐯🐨🐻🐷🐽🐮🐗🐵🐒🐴🐑🐘🐼🐧🐦🐤🐥🐣🐔🐍🐢🐛🐝🐜🐞🐌🐙🐚🐠🐟🐬🐳🐋🐄🐏🐀🐃🐅🐇🐉🐎🐐🐓🐕🐖🐁🐂🐲🐡🐊🐫🐪🐆🐈🐩🐾💐🌸🌷🍀🌹🌻🌺🍁🍃🍂🌿🌾🍄🌵🌴🌲🌳🌰🌱🌼🌐🌞🌝🌚🌑🌒🌓🌔🌕🌖🌗🌘🌜🌛🌙🌍🌎🌏🌋🌌🌠⭐️☀️⛅️☁️⚡️☔️❄️⛄️🌀🌁🌈🌊🎍💝🎎🎒🎓🎏🎆🎇🎐🎑🎃👻🎅🎄🎁🎋🎉🎊🎈🎌🔮🎥📷📹📼💿📀💽💾💻📱☎️📞📟📠📡📺📻🔊🔉🔈🔇🔔🔕📢📣⏳⌛️⏰⌚️🔓🔒🔏🔐🔑🔎💡🔦🔆🔅🔌🔋🔍🛁🛀🚿🚽🔧🔩🔨🚪🚬💣🔫🔪💊💉💰💴💵💷💶💳💸📲📧📥📤✉️📩📨📯📫📪📬📭📮📦📝📄📃📑📊📈📉📜📋📅📆📇📁📂✂️📌📎✒️✏️📏📐📕📗📘📙📓📔📒📚📖🔖📛🔬🔭📰🎨🎬🎤🎧🎼🎵🎶🎹🎻🎺🎷🎸👾🎮🃏🎴🀄️🎲🎯🏈🏀⚽️⚾️🎾🎱🏉🎳⛳️🚵🚴🏁🏇🏆🎿🏂🏊🏄🎣☕️🍵🍶🍼🍺🍻🍸🍹🍷🍴🍕🍔🍟🍗🍖🍝🍛🍤🍱🍣🍥🍙🍘🍚🍜🍲🍢🍡🍳🍞🍩🍮🍦🍨🍧🎂🍰🍪🍫🍬🍭🍯🍎🍏🍊🍋🍒🍇🍉🍓🍑🍈🍌🍐🍍🍠🍆🍅🌽🏠🏡🏫🏢🏣🏥🏦🏪🏩🏨💒⛪️🏬🏤🌇🌆🏯🏰⛺️🏭🗼🗾🗻🌄🌅🌃🗽🌉🎠🎡⛲️🎢🚢⛵️🚤🚣⚓️🚀✈️💺🚁🚂🚊🚉🚞🚆🚄🚅🚈🚇🚝🚋🚃🚎🚌🚍🚙🚘🚗🚕🚖🚛🚚🚨🚓🚔🚒🚑🚐🚲🚡🚟🚠🚜💈🚏🎫🚦🚥⚠️🚧🔰⛽️🏮🎰♨️🗿🎪🎭📍🚩🇯🇵🇰🇷🇩🇪🇨🇳🇺🇸🇫🇷🇪🇸🇮🇹🇷🇺🇬🇧1⃣2⃣3⃣4⃣5⃣6⃣7⃣8⃣9⃣0⃣🔟🔢#⃣🔣⬆️⬇️⬅️➡️🔠🔡🔤↗️↖️↘️↙️↔️↕️🔄◀️▶️🔼🔽↩️↪️ℹ️⏪⏩⏫⏬⤵️⤴️🆗🔀🔁🔂🆕🆙🆒🆓🆖📶🎦🈁🈯️🈳🈵🈴🈲🉐🈹🈺🈶🈚️🚻🚹🚺🚼🚾🚰🚮🅿️♿️🚭🈷🈸🈂Ⓜ️🛂🛄🛅🛃🉑㊙️㊗️🆑🆘🆔🚫🔞📵🚯🚱🚳🚷🚸⛔️✳️❇️❎✅✴️💟🆚📳📴🅰🅱🆎🅾💠➿♻️♈️♉️♊️♋️♌️♍️♎️♏️♐️♑️♒️♓️⛎🔯🏧💹💲💱©®™❌‼️⁉️❗️❓❕❔⭕️🔝🔚🔙🔛🔜🔃🕛🕧🕐🕜🕑🕝🕒🕞🕓🕟🕔🕠🕕🕖🕗🕘🕙🕚🕡🕢🕣🕤🕥🕦✖️➕➖➗♠️♥️♣️♦️💮💯✔️☑️🔘🔗➰〰〽️🔱◼️◻️◾️◽️▪️▫️🔺🔲🔳⚫️⚪️🔴🔵🔻⬜️⬛️🔶🔷🔸🔹' end return { description = "Sendet alle Emoticons", - usage = {"/emoticons","/Emoticons"}, - patterns = {"^/emoticons","^/Emoticons"}, + usage = {"#emoticons"}, + patterns = {"^#emoticons"}, run = run } --by Akamaru [https://ponywave.de] \ No newline at end of file diff --git a/plugins/epg.lua b/plugins/epg.lua index e7dabe3..ac166d0 100644 --- a/plugins/epg.lua +++ b/plugins/epg.lua @@ -41,12 +41,12 @@ end return { description = "TV-Programm abrufen", usage = { - "/epg 20:15: TV-Programm fr 20:15", - "/epg jetzt. Jetziges TV-Programm" + "#epg 20:15: TV-Programm fr 20:15", + "#epg jetzt. Jetziges TV-Programm" }, patterns = { - "^/epg (20%:15)$", - "^/epg (jetzt)" + "^#epg (20%:15)$", + "^#epg (jetzt)" }, run = run } diff --git a/plugins/expand.lua b/plugins/expand.lua index 6feb270..fcbd5db 100644 --- a/plugins/expand.lua +++ b/plugins/expand.lua @@ -18,9 +18,9 @@ end return { description = "Erweitert eine verkürzte URL", - usage = "/expand [URL]: Erweitert einen verkürzten Link", + usage = "#expand [URL]: Erweitert einen verkürzten Link", patterns = { - "^/expand (https?://[%w-_%.%?%.:/%+=&]+)$" + "^#expand (https?://[%w-_%.%?%.:/%+=&]+)$" }, run = run } \ No newline at end of file diff --git a/plugins/face.lua b/plugins/face.lua index af661b4..89dd94a 100644 --- a/plugins/face.lua +++ b/plugins/face.lua @@ -69,12 +69,12 @@ end return { description = "Who is in that photo?", usage = { - "/face [url]", - "/recognise [url]" + "#face [url]", + "#recognise [url]" }, patterns = { - "^/face (.*)$", - "^/recognise (.*)$" + "^#face (.*)$", + "^#recognise (.*)$" }, run = run } \ No newline at end of file diff --git a/plugins/flip_text.lua b/plugins/flip_text.lua index a390dbf..763b485 100644 --- a/plugins/flip_text.lua +++ b/plugins/flip_text.lua @@ -4,10 +4,10 @@ function run(msg, matches) local receiver = get_receiver(msg) if string.match(msg.text, '"') then return 'Vergiss es' - elseif string.match(msg.text, '/flip') then + elseif string.match(msg.text, '#flip') then local text = run_bash('flip "' .. text .. '"') 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') send_msg(receiver, text, ok_cb, false) end @@ -16,8 +16,8 @@ end return { description = "", usage = {""}, - patterns = {"^/flip (.*)$", - "^/rev (.*)"}, + patterns = {"^#flip (.*)$", + "^#rev (.*)"}, run = run } --by Akamaru [https://ponywave.de] \ No newline at end of file diff --git a/plugins/forecast.lua b/plugins/forecast.lua index 3ce1bdb..93f8738 100644 --- a/plugins/forecast.lua +++ b/plugins/forecast.lua @@ -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), '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) else text = get_forecast(lat, lng) @@ -184,20 +184,20 @@ end return { description = "Wettervorhersage für deinen oder einen gewählten Ort", usage = { - "/f: Wettervorhersage für deine Stadt (/location set [Ort])", - "/f (Stadt): Wettervorhersage für diese Stadt", - "/fh: 24-Stunden-Wettervorhersage für deine Stadt (/location set [Ort])", - "/fh (Stadt): 24-Stunden-Wettervorhersage für diese Stadt" + "#f: Wettervorhersage für deine Stadt (/location set [Ort])", + "#f (Stadt): Wettervorhersage für diese Stadt", + "#fh: 24-Stunden-Wettervorhersage für deine Stadt (/location set [Ort])", + "#fh (Stadt): 24-Stunden-Wettervorhersage für diese Stadt" }, patterns = { - "^(/f)$", - "^(/f) (.*)$", - "^(/fh)$", - "^(/fh) (.*)$", - "^(/forecast)$", - "^(/forecast) (.*)$", - "^(/forecasth)$", - "^(/forecasth) (.*)$" + "^(#f)$", + "^(#f) (.*)$", + "^(#fh)$", + "^(#fh) (.*)$", + "^(#forecast)$", + "^(#forecast) (.*)$", + "^(#forecasth)$", + "^(#forecasth) (.*)$" }, run = run } diff --git a/plugins/ftp.lua b/plugins/ftp.lua index 75b7242..3fe3b90 100644 --- a/plugins/ftp.lua +++ b/plugins/ftp.lua @@ -25,8 +25,8 @@ end return { description = "Sendet FTP-Textdatei.", - usage = "/ftp [Dateiname-ohne-txt]: Sendet eine txt von einem FTP.", - patterns = {"^/ftp (.*)$"}, + usage = "#ftp [Dateiname-ohne-txt]: Sendet eine txt von einem FTP.", + patterns = {"^#ftp (.*)$"}, run = run } diff --git a/plugins/fusroga.lua b/plugins/fusroga.lua new file mode 100644 index 0000000..fd0104e --- /dev/null +++ b/plugins/fusroga.lua @@ -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] \ No newline at end of file diff --git a/plugins/gamesdb.lua b/plugins/gamesdb.lua index 6b44f17..8a74e94 100644 --- a/plugins/gamesdb.lua +++ b/plugins/gamesdb.lua @@ -131,8 +131,8 @@ end return { description = "Sendet Infos zu einem Spiel.", - usage = "/game [Spiel]: Sendet Infos zum Spiel", - patterns = {"^/game (.+)$"}, + usage = "/#game [Spiel]: Sendet Infos zum Spiel", + patterns = {"^#game (.+)$"}, run = run } diff --git a/plugins/gender.lua b/plugins/gender.lua index 61b3329..e70a17d 100644 --- a/plugins/gender.lua +++ b/plugins/gender.lua @@ -44,10 +44,10 @@ end return { description = "Sendet Geschlecht", - usage = "/geschlecht [Name]: Sendet Geschlecht", + usage = "#geschlecht [Name]: Sendet Geschlecht", patterns = { - "^/geschlecht (.*)$", - "^/gender (.*)$" + "^#geschlecht (.*)$", + "^#gender (.*)$" }, run = run } diff --git a/plugins/get.lua b/plugins/get.lua index f00a4cb..db93722 100644 --- a/plugins/get.lua +++ b/plugins/get.lua @@ -40,12 +40,12 @@ end return { description = "Bekommt Variablen, die mit !set gesetzt wurden", usage = { - "/get: Gibt alle Variablen aus", - "/get (Variable): Gibt die Variable aus." + "#get: Gibt alle Variablen aus", + "#get (Variable): Gibt die Variable aus." }, patterns = { - "^(/get) (.+)$", - "^/get$" + "^(#get) (.+)$", + "^#get$" }, run = run } \ No newline at end of file diff --git a/plugins/get_data.lua b/plugins/get_data.lua index 88981cc..033ec67 100644 --- a/plugins/get_data.lua +++ b/plugins/get_data.lua @@ -10,12 +10,12 @@ end return { description = "Ein plugin, um Bilder oder Dateien zu downloaden", - usage = {"/getdata [URL]", - "/wget [URL]", - "/getimg [URL]"}, - patterns = {"^/[Gg][Ee][Tt][Dd][Aa][Tt][Aa] (.*)$", - "/[Ww][Gg][Ee][Tt] (.*)$", - "^/[Gg][Ee][Tt][Ii][Mm][Gg] (.*)$" + usage = {"#getdata [URL]", + "#wget [URL]", + "#getimg [URL]"}, + patterns = {"^#[Gg][Ee][Tt][Dd][Aa][Tt][Aa] (.*)$", + "#[Ww][Gg][Ee][Tt] (.*)$", + "^#[Gg][Ee][Tt][Ii][Mm][Gg] (.*)$" }, run = run } diff --git a/plugins/gifeye.lua b/plugins/gifeye.lua index a995b1b..bfcf85d 100644 --- a/plugins/gifeye.lua +++ b/plugins/gifeye.lua @@ -12,8 +12,8 @@ end return { description = "Sendet GIFs von Gifeye.com", - usage = {"gifeye.com URL","/gifeye [ID]","/ge [ID]"}, - patterns = {"https?://gifeye.com/([%w-_%.%?%.:,/%+=&#!]+)$","^/gifeye (.*)$","^/ge (.*)$"}, + usage = {"gifeye.com URL","#gifeye [ID]","#ge [ID]"}, + patterns = {"https?://gifeye.com/([%w-_%.%?%.:,/%+=&#!]+)$","^#gifeye (.*)$","^#ge (.*)$"}, run = run } --by Akamaru [https://ponywave.de] \ No newline at end of file diff --git a/plugins/giphy.lua b/plugins/giphy.lua index 652ffa1..d527459 100644 --- a/plugins/giphy.lua +++ b/plugins/giphy.lua @@ -59,8 +59,8 @@ end return { description = "Sucht und sendet ein GIF von Giphy", - usage = {"/gif [Begriff]","/giphy [Begriff]"}, - patterns = {"^/gif$","^/gif (.*)","^/giphy (.*)","^/giphy$"}, + usage = {"#gif [Begriff]","#giphy [Begriff]"}, + patterns = {"^#gif$","^#gif (.*)","^#giphy (.*)","^#giphy$"}, run = run } diff --git a/plugins/glitch.lua b/plugins/glitch.lua index 31c461c..3325ebb 100644 --- a/plugins/glitch.lua +++ b/plugins/glitch.lua @@ -133,11 +133,11 @@ do return { 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.", patterns = { - "^/glitch ([^ ]*) ([0-9]*)$", - "^/glitch ([^ ]*)$" + "^#glitch ([^ ]*) ([0-9]*)$", + "^#glitch ([^ ]*)$" }, run = run } diff --git a/plugins/google.lua b/plugins/google.lua index 2239f95..aa772a1 100644 --- a/plugins/google.lua +++ b/plugins/google.lua @@ -45,9 +45,9 @@ end return { description = "Durchsucht Google", - usage = "/google [Suchbegriff]: Durchsucht Google", + usage = "#google [Suchbegriff]: Durchsucht Google", patterns = { - "^/[Gg][Oo][Oo][Gg][Ll][Ee] (.*)$", + "^#[Gg][Oo][Oo][Gg][Ll][Ee] (.*)$", "^%.[Gg][Oo][Oo][Gg][Ll][Ee] (.*)$" }, run = run diff --git a/plugins/google_books.lua b/plugins/google_books.lua index 147daab..ceb0740 100644 --- a/plugins/google_books.lua +++ b/plugins/google_books.lua @@ -62,8 +62,9 @@ end return { description = "Sucht nach Bchern in Google Books.", - usage = "/books [Suchbegriff]: Sucht nach Bchern in Google Books", - patterns = {"^/books (.*)$"}, + usage = " + #books [Suchbegriff]: Sucht nach Bchern in Google Books", + patterns = {"^#books (.*)$"}, run = run } diff --git a/plugins/gronkh_soundboard.lua b/plugins/gronkh_soundboard.lua index 3bea08e..9693b92 100644 --- a/plugins/gronkh_soundboard.lua +++ b/plugins/gronkh_soundboard.lua @@ -27,11 +27,11 @@ end return { description = "Gronkh Soundboard", - usage = {"/gronkh [Sound]: Sendet ein Sound", - "/gronkh liste: Zeigt alle verfügbare Sounds", - "/gronkh random: Sendet ein zufälligen Sound (Kommt noch)"}, + usage = {"#gronkh [Sound]: Sendet ein Sound", + "#gronkh liste: Zeigt alle verfügbare Sounds", + "#gronkh random: Sendet ein zufälligen Sound (Kommt noch)"}, patterns = { - "^/[Gg][Rr][Oo][Nn][Kk][Hh] (.*)$" + "^#[Gg][Rr][Oo][Nn][Kk][Hh] (.*)$" }, run = run } diff --git a/plugins/hdf.lua b/plugins/hdf.lua index 004ba77..1d792ab 100644 --- a/plugins/hdf.lua +++ b/plugins/hdf.lua @@ -20,8 +20,8 @@ end return { description = "Einfach mal die Fresse halten!", - usage = {"/hdf"}, - patterns = {"^/[H|h][D|d][F|f]$"}, + usage = {"#hdf"}, + patterns = {"^#[H|h][D|d][F|f]$"}, run = run } --by Akamaru [https://ponywave.de] \ No newline at end of file diff --git a/plugins/help.lua b/plugins/help.lua index dceecba..5c009be 100644 --- a/plugins/help.lua +++ b/plugins/help.lua @@ -88,9 +88,9 @@ do end local function run(msg, matches) - if matches[1] == "/hilfe" then + if matches[1] == "#hilfe" then return telegram_help() - elseif matches[1] == "/hilfe all" then + elseif matches[1] == "#hilfe all" then return help_all() else @@ -109,8 +109,8 @@ do return { description = "Zeigt die Plugins und Befehle", - usage = {"/hilfe","/hilfe all","/hilfe [Plugin]"}, - patterns = {"^/hilfe$","^/hilfe all","^/hilfe (.+)"}, + usage = {"#hilfe","#hilfe all","#hilfe [Plugin]"}, + patterns = {"^#hilfe$","^#hilfe all","^#hilfe (.+)"}, run = run } diff --git a/plugins/id.lua b/plugins/id.lua index 24b91e2..6358dc3 100644 --- a/plugins/id.lua +++ b/plugins/id.lua @@ -25,7 +25,7 @@ local function returnids(cb_extra, success, result) end 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)) 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 @@ -43,7 +43,7 @@ end return { description = "Zeige dir deine ID und die IDs aller Gruppenmitglieder an.", - usage = {"/id", "/myid"," /id chat"}, - patterns = {"^/id$","^/myid$","^/ids? (chat)"}, + usage = {"#id", "#myid"," #id chat"}, + patterns = {"^#id$","^#myid$","^#ids? (chat)"}, run = run } \ No newline at end of file diff --git a/plugins/imdb.lua b/plugins/imdb.lua index d6eaefe..ad7edde 100644 --- a/plugins/imdb.lua +++ b/plugins/imdb.lua @@ -66,8 +66,8 @@ end return { description = "Zeigt Info zu einem Film (von IMDB, englisch)", - usage = "/imdb [Film]: Zeigt Info zu Film", - patterns = {"^/imdb (.+)", + usage = "#imdb [Film]: Zeigt Info zu Film", + patterns = {"^#imdb (.+)", "imdb.com/title/(tt)(%d+[%d%.,]*)" }, run = run diff --git a/plugins/img_bing.lua b/plugins/img_bing.lua index 4da97f6..e875533 100644 --- a/plugins/img_bing.lua +++ b/plugins/img_bing.lua @@ -104,10 +104,10 @@ end return { description = "Sucht Bild mit Bing-API und versendet es (SafeSearch aktiv)", usage = { - "/imgbing [Suchbegriff]" + "#imgbing [Suchbegriff]" }, patterns = { - "^/imgbing (.*)$" + "^#imgbing (.*)$" }, run = run } diff --git a/plugins/img_blacklist.lua b/plugins/img_blacklist.lua index 507d21d..7155908 100644 --- a/plugins/img_blacklist.lua +++ b/plugins/img_blacklist.lua @@ -62,14 +62,14 @@ end return { description = "Blacklist-Manager für Bilder-Plugins (nur Superuser)", usage = { - "/imgblacklist show: Zeigt Blacklist", - "/imgblacklist add [Wort]: Fügt Wort der Blacklist hinzu", - "/imgblacklist remove [Wort]: Entfernt Wort aus der Blacklist" + "#imgblacklist show: Zeigt Blacklist", + "#imgblacklist add [Wort]: Fügt Wort der Blacklist hinzu", + "#imgblacklist remove [Wort]: Entfernt Wort aus der Blacklist" }, patterns = { - "^/imgblacklist show$", - "^/imgblacklist (add) (.*)$", - "^/imgblacklist (remove) (.*)$" + "^#imgblacklist show$", + "^#imgblacklist (add) (.*)$", + "^#imgblacklist (remove) (.*)$" }, run = run, privileged = true diff --git a/plugins/img_google.lua b/plugins/img_google.lua index b150415..51eeae1 100644 --- a/plugins/img_google.lua +++ b/plugins/img_google.lua @@ -83,10 +83,10 @@ end return { description = "Sucht Bild mit Google-API und versendet es (SafeSearch aktiv)", usage = { - "/img [Suchbegriff]" + "#img [Suchbegriff]" }, patterns = { - "^/img (.*)$" + "^#img (.*)$" }, run = run } diff --git a/plugins/img_google_nsfw.lua b/plugins/img_google_nsfw.lua index 7d66bf3..5805950 100644 --- a/plugins/img_google_nsfw.lua +++ b/plugins/img_google_nsfw.lua @@ -16,18 +16,6 @@ local function getNSFWImage(text) return google 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 cache = {} for v in pairs(results) do @@ -49,14 +37,14 @@ function run(msg, matches) local results = redis:smembers(hash) if not results[1] then print('doing web request') - results = getGoogleImage(text) + results = getNSFWImage(text) if results == 'QUOTAEXCEEDED' then return 'Kontingent für heute erreicht - nur noch gecachte Suchanfragen möglich!' end if not results then return "Kein Bild gefunden!" end - cache_google_image(results, text) + cache_nsfw_image(results, text) end -- Random image from table local i = math.random(#results) @@ -95,10 +83,10 @@ end return { description = "Sucht Bild mit Google-API und versendet es", usage = { - "/img2 [Suchbegriff]" + "#img2 [Suchbegriff]" }, patterns = { - "^/img2 (.*)$" + "^#img2 (.*)$" }, run = run } diff --git a/plugins/insider.lua b/plugins/insider.lua index 28fc4de..f4f7900 100644 --- a/plugins/insider.lua +++ b/plugins/insider.lua @@ -35,8 +35,8 @@ end return { description = "Die pegelf Insider!", - usage = {"/Insider","/insider"}, - patterns = {"^/Insider$","^/insider$"}, + usage = {"#Insider","#insider"}, + patterns = {"^#Insider$","^#insider$"}, run = run } --by Akamaru [https://ponywave.de] diff --git a/plugins/invite.lua b/plugins/invite.lua index 1057d3c..ed7faf0 100644 --- a/plugins/invite.lua +++ b/plugins/invite.lua @@ -35,8 +35,8 @@ end return { description = "Andere User zu einer Chat-Gruppe hinzufügen", - usage = "/invite name [user_name], /invite id [user_id]", - patterns = {"^/invite (name) (.*)$","^/invite (id) (%d+)$"}, + usage = "#invite name [user_name], #invite id [user_id]", + patterns = {"^#invite (name) (.*)$","^#invite (id) (%d+)$"}, run = run } diff --git a/plugins/ip_info.lua b/plugins/ip_info.lua index 666e893..47e7358 100644 --- a/plugins/ip_info.lua +++ b/plugins/ip_info.lua @@ -55,8 +55,8 @@ end return { description = "Sendet IP-Info", - usage = "/ip [IP]: Sendet Server-Infos", - patterns = {"^/ip (.*)$"}, + usage = "#ip [IP]: Sendet Server-Infos", + patterns = {"^#ip (.*)$"}, run = run } diff --git a/plugins/isup.lua b/plugins/isup.lua index 8b46232..f6853c3 100644 --- a/plugins/isup.lua +++ b/plugins/isup.lua @@ -204,19 +204,19 @@ end return { description = "Checkt, ob eine Webseite up ist.", usage = { - "/isup [Host]: Checkt, ob die Seite up ist", - "/isup cron [Host]: Checkt diese Seite alle 5 Minuten (nur Superuser)", - "/isup cron check: Prüfe alle Seiten jetzt", - "/isup cron show: Listet alle zu prüfenden Seiten auf", - "/isup cron delete [ID]: Checkt diese Seite nicht mehr" + "#isup [Host]: Checkt, ob die Seite up ist", + "#isup cron [Host]: Checkt diese Seite alle 5 Minuten (nur Superuser)", + "#isup cron check: Prüfe alle Seiten jetzt", + "#isup cron show: Listet alle zu prüfenden Seiten auf", + "#isup cron delete [ID]: Checkt diese Seite nicht mehr" }, patterns = { - "^/isup (cron check)$", - "^/isup (cron show)$", - "^/isup (cron delete) (%d+)$", - "^/isup (cron) (.*)$", - "^/isup (.*)$", - "^/ping (.*)$" + "^#isup (cron check)$", + "^#isup (cron show)$", + "^#isup (cron delete) (%d+)$", + "^#isup (cron) (.*)$", + "^#isup (.*)$", + "^#ping (.*)$" }, run = run, cron = cron diff --git a/plugins/justkitten.lua b/plugins/justkitten.lua index 02d69b5..b68b513 100644 --- a/plugins/justkitten.lua +++ b/plugins/justkitten.lua @@ -17,8 +17,8 @@ end return { description = "Sendet eins von 6 Just Kitten Bilder", - usage = {"/jk"}, - patterns = {"^/jk"}, + usage = {"#jk"}, + patterns = {"^#jk"}, run = run } --by Akamaru [https://ponywave.de] \ No newline at end of file diff --git a/plugins/kickstarter_search.lua b/plugins/kickstarter_search.lua index 015fe62..ac0d94f 100644 --- a/plugins/kickstarter_search.lua +++ b/plugins/kickstarter_search.lua @@ -43,8 +43,8 @@ end return { description = "Suche für Kickstarter", - usage = "/kicks [BEGRIFF]", - patterns = {"^/[Kk][Ii][Cc][Kk][Ss] (.*)$", + usage = "#kicks [BEGRIFF]", + patterns = {"^#[Kk][Ii][Cc][Kk][Ss] (.*)$", "https?://www.kickstarter.com/projects/[a-zA-Z0-9]+/(.*)$"}, run = run } diff --git a/plugins/kitty.lua b/plugins/kitty.lua index fd28f6d..313dc78 100644 --- a/plugins/kitty.lua +++ b/plugins/kitty.lua @@ -13,8 +13,8 @@ end return { description = "Sendet ein zufälliges Katzenbild", - usage = {"/kitty","/katze","/cat","/neko","/kadse"}, - patterns = {"^/kitty$","^/katze$","^/cat$","^/kadse$","^/kitty (.*)$","^/katze (.*)$","^/cat (.*)$","^/kadse (.*)$",}, + usage = {"#kitty","#katze","#cat","#neko","#kadse"}, + patterns = {"^#kitty$","^#katze$","^#cat$","^#kadse$","^#kitty (.*)$","^#katze (.*)$","^#cat (.*)$","^#kadse (.*)$",}, run = run } --by Akamaru [https://ponywave.de] \ No newline at end of file diff --git a/plugins/konachan.lua b/plugins/konachan.lua index f79ef04..2c3b4fd 100644 --- a/plugins/konachan.lua +++ b/plugins/konachan.lua @@ -24,8 +24,8 @@ end return { description = "Sendet ein Bild von Konachan.net [SFW]", - usage = {"/konachan [Tags]","/kc"}, - patterns = {"^/konachan (.*)$","^/kc (.*)$"}, + usage = {"#konachan [Tags]","#kc"}, + patterns = {"^#konachan (.*)$","^#kc (.*)$"}, run = run } diff --git a/plugins/konachan_nsfw.lua b/plugins/konachan_nsfw.lua index 0c718ad..56b8345 100644 --- a/plugins/konachan_nsfw.lua +++ b/plugins/konachan_nsfw.lua @@ -24,8 +24,8 @@ end return { description = "Sendet Bild von Konachan.com [NSFW]", - usage = {"/konansfw [Tags]","/kcn [Tags]"}, - patterns = {"^/konansfw (.*)$","^/kcn (.*)$"}, + usage = {"#konansfw [Tags]","#kcn [Tags]"}, + patterns = {"^#konansfw (.*)$","^#kcn (.*)$"}, run = run } diff --git a/plugins/location.lua b/plugins/location.lua index aaa64b1..ea695f3 100644 --- a/plugins/location.lua +++ b/plugins/location.lua @@ -8,6 +8,7 @@ -- Globals -- If you have a google api key for the geocoding/timezone api do +require("./plugins/time") local api_key = nil local base_api = "https://maps.googleapis.com/maps/api" @@ -52,8 +53,8 @@ end return { description = "Zeigt Informationen über einen Ort.", - usage = "/loc (Ort)", - patterns = {"^/loc (.*)$"}, + usage = "#loc (Ort)", + patterns = {"^#loc (.*)$"}, run = run } diff --git a/plugins/location_manager.lua b/plugins/location_manager.lua index e84c475..0cfc222 100644 --- a/plugins/location_manager.lua +++ b/plugins/location_manager.lua @@ -53,14 +53,14 @@ end return { description = "Orte-Manager", usage = { - "/location: Gibt deinen gesetzten Wohnort aus", - "/location set (Ort): Setzt deinen Wohnort auf diesen Ort", - "/location del: Lscht deinen angegebenen Wohnort" + "#location: Gibt deinen gesetzten Wohnort aus", + "#location set (Ort): Setzt deinen Wohnort auf diesen Ort", + "#location del: Lscht deinen angegebenen Wohnort" }, patterns = { - "^/location (set) (.*)$", - "^/location (del)$", - "^/location$" + "^#location (set) (.*)$", + "^#location (del)$", + "^#location$" }, run = run } diff --git a/plugins/love_calculator.lua b/plugins/love_calculator.lua index c1674cd..67668b3 100644 --- a/plugins/love_calculator.lua +++ b/plugins/love_calculator.lua @@ -1,4 +1,4 @@ --- This is a proprietary plugin, property of Andreas Bielawski, (c) 2015 +-- This is a proprietary plugin, property of Andreas Bielawski, (c) 2015 -- DO NOT USE WITHOUT PERMISSION do @@ -27,9 +27,9 @@ end return { 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 = { - "^/love (.+)+(.+)$" + "^#love (.+)+(.+)$" }, run = run } diff --git a/plugins/lucky_star.lua b/plugins/lucky_star.lua index f5e012c..261d86e 100644 --- a/plugins/lucky_star.lua +++ b/plugins/lucky_star.lua @@ -19,8 +19,8 @@ end return { description = "Sendet ein Bild von den Lucky Star Chars", - usage = {"/Kagami","/kagami","/Konata","/konata","/Tsukasa","/tsukasa","/Miyuki","/miyuki"}, - patterns = {"^/kagami$","^/Kagami$","^/konata$","^/Konata$","^/miyuki$","^/Miyuki$","^/tsukasa$","^/Tsukasa$"}, + usage = {"#Kagami","#kagami","#Konata","#konata","#Tsukasa","#tsukasa","#Miyuki","#miyuki"}, + patterns = {"^#kagami$","^#Kagami$","^#konata$","^#Konata$","^#miyuki$","^#Miyuki$","^#tsukasa$","^#Tsukasa$"}, run = run } --by Akamaru [https://ponywave.de] \ No newline at end of file diff --git a/plugins/lyrics.lua b/plugins/lyrics.lua index efc1036..691cf2e 100644 --- a/plugins/lyrics.lua +++ b/plugins/lyrics.lua @@ -3,7 +3,7 @@ do local apikey = cred_data.lyricsnmusic_apikey function getLyrics(text) - local q = string.match(text, "/lyrics (.+)") + local q = string.match(text, "#lyrics (.+)") q = url_encode(q) b = http.request("http://api.lyricsnmusic.com/songs?api_key="..apikey.."&q=" .. q) response = json:decode(b) @@ -39,8 +39,8 @@ end return { description = "Liedertext bekommen", - usage = {"/lyrics [Lied]"}, - patterns = {"^/lyrics (.*)$"}, + usage = {"#lyrics [Lied]"}, + patterns = {"^#lyrics (.*)$"}, run = run } diff --git a/plugins/manager.lua b/plugins/manager.lua index 005f4f2..b834ba7 100644 --- a/plugins/manager.lua +++ b/plugins/manager.lua @@ -227,30 +227,30 @@ end return { description = "Manager-Plugin für Whitelist, Kicks und Banns (nur Superuser)", usage = { - "/whitelist /: Aktiviert/deaktiviert Whitelist", - "/whitelist user : Whiteliste User", - "/whitelist chat: Whiteliste ganze Gruppe", - "/whitelist delete user : Lösche User von der Whitelist", - "/whitelist delete chat: Lösche ganze Gruppe von der Whitelist", - "/ban user : Kicke User vom Chat und kicke ihn, wenn er erneut beitritt", - "/ban delete : Entbanne User", - "/kick : Kicke User vom Chat", - "/makesudo user : Macht User zum Superuser", - "/makesudo delete : Macht User zum Superuser" + "#whitelist /: Aktiviert/deaktiviert Whitelist", + "#whitelist user : Whiteliste User", + "#whitelist chat: Whiteliste ganze Gruppe", + "#whitelist delete user : Lösche User von der Whitelist", + "#whitelist delete chat: Lösche ganze Gruppe von der Whitelist", + "#ban user : Kicke User vom Chat und kicke ihn, wenn er erneut beitritt", + "#ban delete : Entbanne User", + "#kick : Kicke User vom Chat", + "#makesudo user : Macht User zum Superuser", + "#makesudo delete : Macht User zum Superuser" }, patterns = { - "^/(whitelist) (enable)$", - "^/(whitelist) (disable)$", - "^/(whitelist) (user) (%d+)$", - "^/(whitelist) (chat)$", - "^/(whitelist) (delete) (user) (%d+)$", - "^/(whitelist) (delete) (chat)$", - "^/(ban) (user) (%d+)$", - "^/(ban) (delete) (%d+)$", - "^/(kick) (%d+)$", + "^#(whitelist) (enable)$", + "^#(whitelist) (disable)$", + "^#(whitelist) (user) (%d+)$", + "^#(whitelist) (chat)$", + "^#(whitelist) (delete) (user) (%d+)$", + "^#(whitelist) (delete) (chat)$", + "^#(ban) (user) (%d+)$", + "^#(ban) (delete) (%d+)$", + "^#(kick) (%d+)$", --"^//tgservice (.+)$", - "^/(makesudo) (user) (%d+)$", - "^/(makesudo) (delete) (%d+)$" + "^#(makesudo) (user) (%d+)$", + "^#(makesudo) (delete) (%d+)$" }, run = run, pre_process = pre_process, diff --git a/plugins/me.lua b/plugins/me.lua index d8cb34c..19f73b2 100644 --- a/plugins/me.lua +++ b/plugins/me.lua @@ -7,7 +7,7 @@ end return { description = "", usage = {""}, - patterns = {"^/me (.*)$"}, + patterns = {"^#me (.*)$"}, run = run } --by Akamaru [https://ponywave.de] \ No newline at end of file diff --git a/plugins/minecraft.lua b/plugins/minecraft.lua index bd2efee..370b9a8 100644 --- a/plugins/minecraft.lua +++ b/plugins/minecraft.lua @@ -1,6 +1,6 @@ local usage = { - "/mine [IP]: Sucht Minecraft-Server und sendet Infos. Standard-Port: 25565", - "/mine [IP] [Port]: Sucht Minecraft-Server auf Port und sendet Infos.", + "#mine [IP]: Sucht Minecraft-Server und sendet Infos. Standard-Port: 25565", + "#mine [IP] [Port]: Sucht Minecraft-Server auf Port und sendet Infos.", } local function mineSearch(ip, port, receiver) --25565 @@ -51,14 +51,14 @@ local function mineSearch(ip, port, receiver) --25565 end local function parseText(chat, text) - if (text == nil or text == "/mine") then + if (text == nil or text == "#mine") then return usage end - ip, port = string.match(text, "^/mine (.-) (.*)$") + ip, port = string.match(text, "^#mine (.-) (.*)$") if (ip ~= nil and port ~= nil) then return mineSearch(ip, port, chat) end - local ip = string.match(text, "^/mine (.*)$") + local ip = string.match(text, "^#mine (.*)$") if (ip ~= nil) then return mineSearch(ip, "25565", chat) end @@ -76,7 +76,7 @@ return { description = "Dursucht Minecraft-Server und sendet Infos", usage = usage, patterns = { - "^/mine (.*)$" + "^#mine (.*)$" }, run = run } \ No newline at end of file diff --git a/plugins/minecraft_skin.lua b/plugins/minecraft_skin.lua index 274854f..7a8bda8 100644 --- a/plugins/minecraft_skin.lua +++ b/plugins/minecraft_skin.lua @@ -7,8 +7,8 @@ end return { description = "Sendet einen 3D Minecraft Skin", - usage = {"/skin [Name]"}, - patterns = {"^/skin (.*)$",}, + usage = {"#skin [Name]"}, + patterns = {"^#skin (.*)$",}, run = run } --by Akamaru [https://ponywave.de] \ No newline at end of file diff --git a/plugins/music.lua b/plugins/music.lua index 836e00e..b95acde 100644 --- a/plugins/music.lua +++ b/plugins/music.lua @@ -1,4 +1,4 @@ -do +do -- Base search URL local BASE_URL = 'http://pleer.com/mobile/search?q=' @@ -77,8 +77,8 @@ return { description = 'Search and get music from pleer', - usage = {'/music','/musik'}, - patterns = {'^/music (.*)$','^/musik (.*)$'}, + usage = {'#music','#musik'}, + patterns = {'^#music (.*)$','^#musik (.*)$'}, run = run } diff --git a/plugins/music163.lua b/plugins/music163.lua index 9fe9bf6..4aeac97 100644 --- a/plugins/music163.lua +++ b/plugins/music163.lua @@ -39,11 +39,11 @@ end return { description = "Sendet MP3 und Infos eines Tracks von music.163.com", 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" }, patterns = { - "^/getmp3 (%d+[%d%.]*)", + "^#getmp3 (%d+[%d%.]*)", "music.163.com/%#/song%?id=(%d+[%d%.]*)", "music.163.com/song%?id=(%d+[%d%.]*)" }, diff --git a/plugins/myanimelist.lua b/plugins/myanimelist.lua index b16870a..7962b24 100644 --- a/plugins/myanimelist.lua +++ b/plugins/myanimelist.lua @@ -124,10 +124,10 @@ end return { description = "Sendet Infos zu einem Anime.", - usage = "/anime [Anime]: Sendet Infos zum Anime", - patterns = {"^/anime (.+)$", - "^/mal (.*)$", - "^/myanimelist (.*)$)", + usage = "#anime [Anime]: Sendet Infos zum Anime", + patterns = {"^#anime (.+)$", + "^#mal (.*)$", + "^#myanimelist (.*)$)", "^https?://myanimelist.net/anime/[0-9]+/(.*)$" }, run = run diff --git a/plugins/myanimelist_manga.lua b/plugins/myanimelist_manga.lua index ce148fe..9b040d7 100644 --- a/plugins/myanimelist_manga.lua +++ b/plugins/myanimelist_manga.lua @@ -123,8 +123,8 @@ end return { description = "Sendet Infos zu einem manga.", - usage = "/manga [manga]: Sendet Infos zum manga", - patterns = {"^/[Mm][Aa][Nn][Gg][Aa] (.+)$", + usage = "#manga [manga]: Sendet Infos zum manga", + patterns = {"^#[Mm][Aa][Nn][Gg][Aa] (.+)$", "^https?://myanimelist.net/manga/[0-9]+/(.*)$" }, run = run diff --git a/plugins/myanimelist_user.lua b/plugins/myanimelist_user.lua index b456590..0f4b73e 100644 --- a/plugins/myanimelist_user.lua +++ b/plugins/myanimelist_user.lua @@ -30,8 +30,8 @@ end return { description = "Sendet Infos zu einem MAL-User.", - usage = "/malu [Name]: Sendet Infos zum User", - patterns = {"^/malu (.+)$", + usage = "#malu [Name]: Sendet Infos zum User", + patterns = {"^#malu (.+)$", "myanimelist.net/profile/(.*)$" }, run = run diff --git a/plugins/myfigurecollection.lua b/plugins/myfigurecollection.lua index 9e306e0..157b072 100644 --- a/plugins/myfigurecollection.lua +++ b/plugins/myfigurecollection.lua @@ -40,8 +40,8 @@ end return { description = "Zeigt den zuletzt hinzugefügten Artikel eines MyFigureCollection Users", - usage = "/mfc [Name]", - patterns = {"^/[Mm][Ff][Cc] (.*)$", + usage = "#mfc [Name]", + patterns = {"^#[Mm][Ff][Cc] (.*)$", "myfigurecollection.net/user/(.*)$", "myfigurecollection.net/collection/(.*)$" }, diff --git a/plugins/notifyme.lua b/plugins/notifyme.lua index 709c0ec..b5e070f 100644 --- a/plugins/notifyme.lua +++ b/plugins/notifyme.lua @@ -81,12 +81,12 @@ end return { description = "Benachrichtigt User, wenn er/sie erwähnt wird.", usage = { - "/notify: Benachrichtigt dich privat, wenn du erwähnt wirst", - "/notify del: Benachrichtigt dich nicht mehr" + "#notify: Benachrichtigt dich privat, wenn du erwähnt wirst", + "#notify del: Benachrichtigt dich nicht mehr" }, patterns = { - "^/notify (del)$", - "^/notify$" + "^#notify (del)$", + "^#notify$" }, run = run, pre_process = pre_process, diff --git a/plugins/notizen.lua b/plugins/notizen.lua index 441ec31..9b6b304 100644 --- a/plugins/notizen.lua +++ b/plugins/notizen.lua @@ -21,7 +21,7 @@ end return { description = "Sendet eine Nachricht an dich selbst", - usage = {"/note [Nachricht]"}, - patterns = {"^/note (.*)$","^/notiz (.*)$"}, + usage = {"#note [Nachricht]"}, + patterns = {"^#note (.*)$","^#notiz (.*)$"}, run = run } \ No newline at end of file diff --git a/plugins/page2image.lua b/plugins/page2image.lua index 843f9b8..6433702 100644 --- a/plugins/page2image.lua +++ b/plugins/page2image.lua @@ -53,8 +53,8 @@ end return { description = "Sendet Webseiten-Screenshot.", - usage = {"/scrot2 [URL]"}, - patterns = {"^/scrot2 (https?://[%w-_%.%?%.:/%+=&]+)"}, + usage = {"#scrot2 [URL]"}, + patterns = {"^#scrot2 (https?://[%w-_%.%?%.:/%+=&]+)"}, run = run } diff --git a/plugins/pagespeed_insights.lua b/plugins/pagespeed_insights.lua index 9f7a612..bed6b02 100644 --- a/plugins/pagespeed_insights.lua +++ b/plugins/pagespeed_insights.lua @@ -21,8 +21,8 @@ end return { description = "Sendet PageSpeed-Score.", - usage = "/speed [URL]: Sendet PageSpeed-Score dieser Seite", - patterns = {"^/speed (https?://[%w-_%.%?%.:/%+=&]+)"}, + usage = "#speed [URL]: Sendet PageSpeed-Score dieser Seite", + patterns = {"^#speed (https?://[%w-_%.%?%.:/%+=&]+)"}, run = run } diff --git a/plugins/pegelf_mc.lua b/plugins/pegelf_mc.lua new file mode 100644 index 0000000..14faaa5 --- /dev/null +++ b/plugins/pegelf_mc.lua @@ -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 \ No newline at end of file diff --git a/plugins/plex.lua b/plugins/plex.lua index fd35089..d7d8f2c 100644 --- a/plugins/plex.lua +++ b/plugins/plex.lua @@ -129,8 +129,8 @@ end return { description = "Suche für Plex Media Server", - usage = "/plex [BEGRIFF]", - patterns = {"^/[Pp][Ll][Ee][Xx] (.*)$"}, + usage = "#plex [BEGRIFF]", + patterns = {"^#[Pp][Ll][Ee][Xx] (.*)$"}, run = run } diff --git a/plugins/plugins.lua b/plugins/plugins.lua index a81eb8e..c80d454 100644 --- a/plugins/plugins.lua +++ b/plugins/plugins.lua @@ -132,7 +132,7 @@ end local function run(msg, matches) -- Show the available plugins - if matches[1] == '/plugins' then + if matches[1] == '#plugins' then return list_plugins() end @@ -186,26 +186,26 @@ end return { description = "Aktiviert, deaktiviert und lädt Plugins (nur Superuser)", usage = { - "/plugins: Liste alle Plugins auf.", - "/plugins enable [plugin]: Aktiviert Plugin.", - "/plugins disable [plugin]: Deaktiviert Plugin.", - "/plugins enable [plugin] chat: Aktiviert Plugin in diesem Chat.", - "/plugins enable [plugin] chat : Aktiviert Plugin in Chat .", - "/plugins disable [plugin] chat: Deaktiviert Plugin in diesem Chat.", - "/plugins disable [plugin] chat : Deaktiviert Plugin in Chat .", - "/plugins reload: Lädt alle Plugins neu.", - "/reload: Lädt alle Plugins neu." + "#plugins: Liste alle Plugins auf.", + "#plugins enable [plugin]: Aktiviert Plugin.", + "#plugins disable [plugin]: Deaktiviert Plugin.", + "#plugins enable [plugin] chat: Aktiviert Plugin in diesem Chat.", + "#plugins enable [plugin] chat : Aktiviert Plugin in Chat .", + "#plugins disable [plugin] chat: Deaktiviert Plugin in diesem Chat.", + "#plugins disable [plugin] chat : Deaktiviert Plugin in Chat .", + "#plugins reload: Lädt alle Plugins neu.", + "#reload: Lädt alle Plugins neu." }, patterns = { - "^/plugins$", - "^/plugins? (enable) ([%w_%.%-]+)$", - "^/plugins? (disable) ([%w_%.%-]+)$", - "^/plugins? (enable) ([%w_%.%-]+) (chat) (%d+)", - "^/plugins? (enable) ([%w_%.%-]+) (chat)", - "^/plugins? (disable) ([%w_%.%-]+) (chat) (%d+)", - "^/plugins? (disable) ([%w_%.%-]+) (chat)", - "^/plugins? (reload)$", - "^/(reload)$" + "^#plugins$", + "^#plugins? (enable) ([%w_%.%-]+)$", + "^#plugins? (disable) ([%w_%.%-]+)$", + "^#plugins? (enable) ([%w_%.%-]+) (chat) (%d+)", + "^#plugins? (enable) ([%w_%.%-]+) (chat)", + "^#plugins? (disable) ([%w_%.%-]+) (chat) (%d+)", + "^#plugins? (disable) ([%w_%.%-]+) (chat)", + "^#plugins? (reload)$", + "^#(reload)$" }, run = run, privileged = true diff --git a/plugins/pokedex.lua b/plugins/pokedex.lua index 25f6ec3..79b9468 100644 --- a/plugins/pokedex.lua +++ b/plugins/pokedex.lua @@ -63,8 +63,8 @@ end return { description = "Pokedex für Telegram", - usage = {"/pokedex [Name/ID]","/pokemon [Name/ID]","/pkmn [Name/ID]"}, - patterns = {"^/pokedex (.*)$","^/pokemon (.+)$","^/pkmn (.+)$"}, + usage = {"#pokedex [Name/ID]","#pokemon [Name/ID]","#pkmn [Name/ID]"}, + patterns = {"^#pokedex (.*)$","^#pokemon (.+)$","^#pkmn (.+)$"}, run = run } diff --git a/plugins/ponyfaces.lua b/plugins/ponyfaces.lua index ce3ea59..fa66118 100644 --- a/plugins/ponyfaces.lua +++ b/plugins/ponyfaces.lua @@ -44,8 +44,8 @@ end return { description = "Sendet zuflliges Ponyface", - usage = "/ponyface [Tags]","/pf [Tags]", - patterns = {"^/ponyface (.*)$","^/pf (.*)$","ponyfac.es/(%d+[%d%.]*)"}, + usage = "#ponyface [Tags]","#pf [Tags]", + patterns = {"^#ponyface (.*)$","^#pf (.*)$","ponyfac.es/(%d+[%d%.]*)"}, run = run } diff --git a/plugins/ponywave.lua b/plugins/ponywave.lua index eee1dc5..d7c296e 100644 --- a/plugins/ponywave.lua +++ b/plugins/ponywave.lua @@ -44,8 +44,8 @@ end return { description = "Sendet letzten PonyWave Beitrag", - usage = "/pw", - patterns = {"^/[Pp][Ww]$"}, + usage = "#pw", + patterns = {"^#[Pp][Ww]$"}, run = run } diff --git a/plugins/porndoge.lua b/plugins/porndoge.lua index 0dd5d08..de5294b 100644 --- a/plugins/porndoge.lua +++ b/plugins/porndoge.lua @@ -9,7 +9,7 @@ end return { description = "", usage = {""}, - patterns = {"^/pdoge$"}, + patterns = {"^#pdoge$"}, run = run } --by Akamaru [https://ponywave.de] \ No newline at end of file diff --git a/plugins/pornhub_gif.lua b/plugins/pornhub_gif.lua index 205fe44..8b3c5fa 100644 --- a/plugins/pornhub_gif.lua +++ b/plugins/pornhub_gif.lua @@ -12,8 +12,8 @@ end return { description = "Sendet GIFs von Pornhub.com", - usage = {"pornhub.com URL","/porngif [ID]","/phg [ID]"}, - patterns = {"pornhub.com/gif/(.*)$","^/phg (.*)$","^/porngif (.*)$"}, + usage = {"pornhub.com URL","#porngif [ID]","#phg [ID]"}, + patterns = {"pornhub.com/gif/(.*)$","^#phg (.*)$","^#porngif (.*)$"}, run = run } --by Akamaru [https://ponywave.de] \ No newline at end of file diff --git a/plugins/qr_codes.lua b/plugins/qr_codes.lua index 570a900..36f402a 100644 --- a/plugins/qr_codes.lua +++ b/plugins/qr_codes.lua @@ -87,16 +87,16 @@ end return { description = {"qr code plugin for telegram, given a text it returns the qr code"}, usage = { - "/qr [text]", - '/qr "[background color]" "[data color]" [text]', + "#qr [text]", + '#qr "[background color]" "[data color]" [text]', ".......................................................", "Color through text: red|green|blue|purple|black|white|gray", "Or colors through hex notation: (\"a56729\" is brown)", "Or colors through decimals: (\"255-192-203\" is pink)" }, patterns = { - '^/qr "(.+)" "(.+)" (.+)$', - "^/qr (.+)$" + '^#qr "(.+)" "(.+)" (.+)$', + "^#qr (.+)$" }, run = run } diff --git a/plugins/quotes.lua b/plugins/quotes.lua index 057ff42..ba46e37 100644 --- a/plugins/quotes.lua +++ b/plugins/quotes.lua @@ -2,7 +2,7 @@ do local function save_quote(msg) if msg.text:sub(11):isempty() then - return "Benutzung: /addquote [Zitat]" + return "Benutzung: #addquote [Zitat]" end local quote = msg.text:sub(11) @@ -14,7 +14,7 @@ end local function delete_quote(msg) if msg.text:sub(11):isempty() then - return "Benutzung: /delquote [Zitat]" + return "Benutzung: #delquote [Zitat]" end local quote = msg.text:sub(11) @@ -36,7 +36,7 @@ local function get_quote(msg) print('Getting quote from redis set '..hash) local quotes_table = redis:smembers(hash) 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 return quotes_table[math.random(1,#quotes_table)] end @@ -54,7 +54,7 @@ local function list_quotes(msg) text = text..num..") "..quote..'\n' end 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 return text end @@ -80,16 +80,16 @@ end return { description = "Zitate speichern, löschen und abrufen.", usage = { - "/addquote [Zitat]: Fügt Zitat hinzu.", - "/quote: Gibt zufälliges Zitat aus.", - "/delquote [Zitat]: Löscht das Zitat (nur Superuser)", - "/listsquotes: Listet alle Zitate auf" + "#addquote [Zitat]: Fügt Zitat hinzu.", + "#quote: Gibt zufälliges Zitat aus.", + "#delquote [Zitat]: Löscht das Zitat (nur Superuser)", + "#listsquotes: Listet alle Zitate auf" }, patterns = { - "^/(delquote) (.+)$", - "^/(addquote) (.+)$", - "^/(quote)$", - "^/(listquotes)$" + "^#(delquote) (.+)$", + "^#(addquote) (.+)$", + "^#(quote)$", + "^#(listquotes)$" }, run = run } diff --git a/plugins/random_pic.lua b/plugins/random_pic.lua index 8921f48..c3f574f 100644 --- a/plugins/random_pic.lua +++ b/plugins/random_pic.lua @@ -37,8 +37,8 @@ end return { description = "Sendet ein zufälliges Bild", - usage = {"/rpic [Thema]","Themen:","anime","mlp","faktillon","faktastisch","gamefakt","faktglaublich"}, - patterns = {"^/rpic (.*)$"}, + usage = {"#rpic [Thema]","Themen:","anime","mlp","faktillon","faktastisch","gamefakt","faktglaublich"}, + patterns = {"^#rpic (.*)$"}, run = run } end \ No newline at end of file diff --git a/plugins/random_pic_nsfw.lua b/plugins/random_pic_nsfw.lua index 6a995ff..7f1f6b1 100644 --- a/plugins/random_pic_nsfw.lua +++ b/plugins/random_pic_nsfw.lua @@ -8,9 +8,9 @@ end function run(msg, matches) local pics = { -- add more below! - ["/nsfw"] = "../Bilder/Mikubot/nsfw/", - ["/nsfw gif"] = "../Bilder/Mikubot/nsfw/gifs/", - ["/nsfw shimakaze"] = "../Bilder/Mikubot/nsfw/Shimakaze/" + ["#nsfw"] = "../Bilder/Mikubot/nsfw/", + ["#nsfw gif"] = "../Bilder/Mikubot/nsfw/gifs/", + ["#nsfw shimakaze"] = "../Bilder/Mikubot/nsfw/Shimakaze/" } local receiver = get_receiver(msg) @@ -33,8 +33,8 @@ end return { description = "Sendet ein zufälliges Bild (NSFW)", - usage = {"/nsfw","/nsfw gif","/nsfw shimakaze"}, - patterns = {"^/nsfw$","^/nsfw gif$","^/nsfw shimakaze$"}, + usage = {"#nsfw","#nsfw gif","#nsfw shimakaze"}, + patterns = {"^#nsfw$","^#nsfw gif$","^#nsfw shimakaze$"}, run = run } end diff --git a/plugins/randoms.lua b/plugins/randoms.lua index d1ac010..1dd5d12 100644 --- a/plugins/randoms.lua +++ b/plugins/randoms.lua @@ -22,8 +22,8 @@ end return { description = "", - usage = "/random [Name]", - patterns = {"^/random (.*)$"}, + usage = "#random [Name]", + patterns = {"^#random (.*)$"}, run = run } --by Akamaru [https://ponywave.de] \ No newline at end of file diff --git a/plugins/rechner.lua b/plugins/rechner.lua index 8a69fcf..035fd2d 100644 --- a/plugins/rechner.lua +++ b/plugins/rechner.lua @@ -24,11 +24,11 @@ end return { description = "Rechnen mit der mathjs-API", usage = { - "/calc [Ausdruck]: Rechnet", + "#calc [Ausdruck]: Rechnet", "Weitere Hilfe: + = Plus, - = Minus, * = Mal, / = geteilt" }, patterns = { - "^/calc (.*)$" + "^#calc (.*)$" }, run = run } \ No newline at end of file diff --git a/plugins/reminder.lua b/plugins/reminder.lua index 7c2913b..c5961a0 100644 --- a/plugins/reminder.lua +++ b/plugins/reminder.lua @@ -33,12 +33,12 @@ end return { description = "Erinnert dich an etwas in XX Sekunden/Minuten (BETA)", usage = { - "/remindme (Zahl)s [Text]: Erinnert dich in XX Sekunden", - "/remindme (Zahl)m [Text]: Erinnert dich in XX Minuten" + "#remindme (Zahl)s [Text]: Erinnert dich in XX Sekunden", + "#remindme (Zahl)m [Text]: Erinnert dich in XX Minuten" }, patterns = { - "^/remindme (%d+)(s) (.+)$", - "^/remindme (%d+)(m) (.+)$", + "^#remindme (%d+)(s) (.+)$", + "^#remindme (%d+)(m) (.+)$", }, run = run } \ No newline at end of file diff --git a/plugins/rename.lua b/plugins/rename.lua index fec4cbf..299f689 100644 --- a/plugins/rename.lua +++ b/plugins/rename.lua @@ -7,7 +7,7 @@ end return { description = "", usage = {""}, - patterns = {"^/rename (.*)$"}, + patterns = {"^#rename (.*)$"}, run = run } --by Akamaru [https://ponywave.de] \ No newline at end of file diff --git a/plugins/riko.lua b/plugins/riko.lua index 3568b7c..cf0ce47 100644 --- a/plugins/riko.lua +++ b/plugins/riko.lua @@ -17,8 +17,8 @@ end return { description = "Postet ein Bild von riko.moe", - usage = "/riko", - patterns = {"^/[R|r]iko$"}, + usage = "#riko", + patterns = {"^#[Rr]iko$"}, run = run } -- Created by github.com/Brawl345 diff --git a/plugins/rss.lua b/plugins/rss.lua index 59c2f9d..3ca007b 100644 --- a/plugins/rss.lua +++ b/plugins/rss.lua @@ -178,7 +178,7 @@ local function run(msg, matches) id = "chat#id" .. msg.to.id end - if matches[1] == "/rss"then + if matches[1] == "#rss"then local chat_name = string.gsub(msg.to.print_name, "_", " ") return print_subs(id, chat_name) end @@ -198,16 +198,16 @@ end return { description = "RSS-Feed Reader", usage = {"RSS Befehle kann nur Sudo\n", - "/rss (Feed-Abos anzeigen)", - "/rss add [URL] (Diesen Feed abonnieren)", - "/rss remove [NR] (Diesen Feed deabonnieren)", - "/rss sync (Feeds aktualisieren)" + "#rss (Feed-Abos anzeigen)", + "#rss add [URL] (Diesen Feed abonnieren)", + "#rss remove [NR] (Diesen Feed deabonnieren)", + "#rss sync (Feeds aktualisieren)" }, patterns = { - "^/rss$", - "^/rss (add) (https?://[%w-_%.%?%.:/%+=&]+)$", - "^/rss (remove) (%d+)$", - "^/rss (sync)$" + "^#rss$", + "^#rss (add) (https?://[%w-_%.%?%.:/%+=&]+)$", + "^#rss (remove) (%d+)$", + "^#rss (sync)$" }, run = run, cron = cron, diff --git a/plugins/rule34.lua b/plugins/rule34.lua index 025a511..b07105c 100644 --- a/plugins/rule34.lua +++ b/plugins/rule34.lua @@ -41,8 +41,8 @@ end return { description = "Sendet zuflliges Bild von rule34.xxx", - usage = "/r34 [Tag]: Sendet zuflliges Bild von rule34.xxx", - patterns = {"^/r34 (.*)"}, + usage = "#r34 [Tag]: Sendet zuflliges Bild von rule34.xxx", + patterns = {"^#r34 (.*)"}, run = run } diff --git a/plugins/sankakucomplex.lua b/plugins/sankakucomplex.lua index 533b5a3..1ed8632 100644 --- a/plugins/sankakucomplex.lua +++ b/plugins/sankakucomplex.lua @@ -33,8 +33,8 @@ end return { description = "Sendet ein zufälliges Bild von Sankakucomplex.", - usage = {"/sankaku [Tags]","/sc [Tags]"}, - patterns = {"^/sankaku (.*)$","^/sc (.*)$"}, + usage = {"#sankaku [Tags]","#sc [Tags]"}, + patterns = {"^#sankaku (.*)$","^#sc (.*)$"}, run = run } diff --git a/plugins/saved_text.lua b/plugins/saved_text.lua index be0bf93..3248399 100644 --- a/plugins/saved_text.lua +++ b/plugins/saved_text.lua @@ -2,7 +2,7 @@ do local function save_text(msg) if msg.text:sub(10):isempty() then - return "Benutzung: /addtext [Text]" + return "Benutzung: #addtext [Text]" end local savedtext = msg.text:sub(10) @@ -14,7 +14,7 @@ end local function delete_text(msg) if msg.text:sub(10):isempty() then - return "Benutzung: /delquote [Text]" + return "Benutzung: #delquote [Text]" end local savedtext = msg.text:sub(10) @@ -75,9 +75,9 @@ return { description = "", usage = {}, patterns = { - "^/(deltext) (.+)$", - "^/(addtext) (.+)$", - "^/(listtext)$" + "^#(deltext) (.+)$", + "^#(addtext) (.+)$", + "^#(listtext)$" }, run = run, privileged = true diff --git a/plugins/set.lua b/plugins/set.lua index 95c8788..c0ea10c 100644 --- a/plugins/set.lua +++ b/plugins/set.lua @@ -1,6 +1,6 @@ local function save_value(msg, name, value) if (not name or not value) then - return "Benutzung: !set Variable Wert" + return "Benutzung: #set Variable Wert" end local hash = get_redis_hash(msg, 'variables') @@ -40,13 +40,13 @@ local function run(msg, matches) end return { - description = "Setzt Variablen, nutze !get zum Abrufen.", + description = "Setzt Variablen, nutze #get zum Abrufen.", usage = { - "/set [Variable] [Wert]: Speichert eine Variable mit einem Wert.", - "/set (Variable) nil: Löscht Variable" + "#set [Variable] [Wert]: Speichert eine Variable mit einem Wert.", + "#set (Variable) nil: Löscht Variable" }, patterns = { - "^/set ([^%s]+) (.+)$" + "^#set ([^%s]+) (.+)$" }, run = run } \ No newline at end of file diff --git a/plugins/sh.lua b/plugins/sh.lua index e950633..b2a8ff7 100644 --- a/plugins/sh.lua +++ b/plugins/sh.lua @@ -1,64 +1,64 @@ function run(msg, matches) local receiver = get_receiver(msg) - if string.match(msg.text, '^/[Ss][Hh]') then + if string.match(msg.text, '^#[Ss][Hh]') then text = run_sh(msg) send_msg(receiver, text, ok_cb, false) return end - if string.match(msg.text, '^/[Uu][Pp][Tt][Ii][Mm][Ee]$') then + if string.match(msg.text, '^#[Uu][Pp][Tt][Ii][Mm][Ee]$') then text = run_bash('uptime') send_msg(receiver, text, ok_cb, false) return end -- Requires scrot (sudo apt-get install scrot) - if string.match(msg.text, '^/[Ss][Cc][Rr][Ee][Ee][Nn]$') then + if string.match(msg.text, '^#[Ss][Cc][Rr][Ee][Ee][Nn]$') then text = run_bash("scrot 'scrot.png' -e 'mv $f ~/Mikubot/tmp/'") send_photo(get_receiver(msg), "tmp/scrot.png", ok_cb, false) return 'Screenshot wird gesendet!' end -- Requires fswebcam (sudo apt-get install fswebcam) - if string.match(msg.text, '^/[Ww][Ee][Bb][Cc][Aa][Mm]$') then + if string.match(msg.text, '^#[Ww][Ee][Bb][Cc][Aa][Mm]$') then text = run_bash("fswebcam -r 640x480 --png 9 -D 1 ~/Mikubot/tmp/webcam.png") send_photo(get_receiver(msg), "tmp/webcam.png", ok_cb, false) end -- You need to disable sudo password - if string.match(msg.text, '^/[Uu][Pp][Dd][Aa][Tt][Ee]$') then + if string.match(msg.text, '^#[Uu][Pp][Dd][Aa][Tt][Ee]$') then text = run_bash("sudo apt-get update") print(text) return 'Update durchgeführt!' end - if string.match(msg.text, '^/[Uu][Pp][Gg][Rr][Aa][Dd][Ee]$') then + if string.match(msg.text, '^#[Uu][Pp][Gg][Rr][Aa][Dd][Ee]$') then text = run_bash("sudo apt-get upgrade -y") print(text) return 'Upgrade durchgeführt!' end - if string.match(msg.text, '^/[Cc][Hh][Ee][Cc][Kk]$') then + if string.match(msg.text, '^#[Cc][Hh][Ee][Cc][Kk]$') then cmd = run_bash("sudo apt-get --just-print upgrade") text = 'Es gibt '..string.match(cmd, '(%d+) aktualisiert')..' Updates' return text end -- vcgencmd works only on Raspberry Pi - if string.match(msg.text, '^/[Tt][Ee][Mm][Pp]$') then + if string.match(msg.text, '^#[Tt][Ee][Mm][Pp]$') then text = run_bash('vcgencmd measure_temp') text = string.gsub(text, "temp=", " ") return "Die CPU Temperatur beträgt" ..text end - if string.match(msg.text, '^/[Vv][Oo][Ll][Tt]$') then + if string.match(msg.text, '^#[Vv][Oo][Ll][Tt]$') then text = run_bash('vcgencmd measure_volts') send_msg(receiver, text, ok_cb, false) return end - if string.match(msg.text, '^/[Tt][Aa][Kk][Tt]$') then + if string.match(msg.text, '^#[Tt][Aa][Kk][Tt]$') then text = run_bash('vcgencmd measure_clock arm') send_msg(receiver, text, ok_cb, false) return @@ -68,17 +68,17 @@ end return { description = "Führt Befehle in der Konsole aus", - usage = {"/sh [Befehl]","/uptime","/temp","/volt","/takt","/screen","/update","/upgrade"}, - patterns = {"^/[Ss][Hh] (.*)$", - "^/[Uu][Pp][Tt][Ii][Mm][Ee]$", - "^/[Ss][Cc][Rr][Ee][Ee][Nn]$", - "^/[Uu][Pp][Dd][Aa][Tt][Ee]$", - "^/[Uu][Pp][Gg][Rr][Aa][Dd][Ee]$", - "^/[Tt][Ee][Mm][Pp]$", - "^/[Vv][Oo][Ll][Tt]$", - "^/[Tt][Aa][Kk][Tt]$", - "^/[Cc][Hh][Ee][Cc][Kk]$", - "^/[Ww][Ee][Bb][Cc][Aa][Mm]$" + usage = {"#sh [Befehl]","#uptime","#temp","#volt","#takt","#screen","#update","#upgrade"}, + patterns = {"^#[Ss][Hh] (.*)$", + "^#[Uu][Pp][Tt][Ii][Mm][Ee]$", + "^#[Ss][Cc][Rr][Ee][Ee][Nn]$", + "^#[Uu][Pp][Dd][Aa][Tt][Ee]$", + "^#[Uu][Pp][Gg][Rr][Aa][Dd][Ee]$", + "^#[Tt][Ee][Mm][Pp]$", + "^#[Vv][Oo][Ll][Tt]$", + "^#[Tt][Aa][Kk][Tt]$", + "^#[Cc][Hh][Ee][Cc][Kk]$", + "^#[Ww][Ee][Bb][Cc][Aa][Mm]$" }, run = run, privileged = true diff --git a/plugins/sleep.lua b/plugins/sleep.lua index e900c46..4e89bd9 100644 --- a/plugins/sleep.lua +++ b/plugins/sleep.lua @@ -18,8 +18,8 @@ end return { description = "Setzt den Bot in schlaf", - usage = {"/sleep"}, - patterns = {"^/[Ss][Ll][Ee][Ee][Pp] (.*)$"}, + usage = {"#sleep"}, + patterns = {"^#[Ss][Ll][Ee][Ee][Pp] (.*)$"}, run = run, privileged = true } diff --git a/plugins/soundboard.lua b/plugins/soundboard.lua index f136b0a..a2b1733 100644 --- a/plugins/soundboard.lua +++ b/plugins/soundboard.lua @@ -26,11 +26,11 @@ end return { description = "Soundboard", - usage = {"/sound [Sound]: Sendet ein Sound", - "/sound liste: Zeigt alle verfügbare Sounds", - "/sound random: Sendet ein zufälligen Sound (Kommt noch)"}, + usage = {"#sound [Sound]: Sendet ein Sound", + "#sound liste: Zeigt alle verfügbare Sounds", + "#sound random: Sendet ein zufälligen Sound (Kommt noch)"}, patterns = { - "^/[Ss][Oo][Uu][Nn][Dd] (.*)$" + "^#[Ss][Oo][Uu][Nn][Dd] (.*)$" }, run = run } diff --git a/plugins/spam.lua b/plugins/spam.lua index 565760f..0ac3316 100644 --- a/plugins/spam.lua +++ b/plugins/spam.lua @@ -4,8 +4,8 @@ end return { description = "SPAM", - usage = {"/spam", "/Spam", "/SPAM"}, - patterns = {"^/spam","^/Spam","^/SPAM"}, + usage = {"#spam"}, + patterns = {"^#[Ss][Pp][Aa][Mm]"}, run = run } --by Akamaru [https://ponywave.de] \ No newline at end of file diff --git a/plugins/special.lua b/plugins/special.lua index dd6f906..ec1fef9 100644 --- a/plugins/special.lua +++ b/plugins/special.lua @@ -135,33 +135,33 @@ return { "^[Nn][Ii][Ii][Ss][Aa][Nn]$", "^[Nn][Ii][Ii](-)[Ss][Aa][Nn]$", "^[Nn][Ii][Ss][Ss][Aa][Nn]$", - "^/[Nn][Ee][Oo][Rr][Aa][Mm][Ee]$", - "^/[Nn][Aa][Uu]$", - "^/[Ff][Tt][Tt]$", - "^/[Ff][Tt][Ff]$", - "^/[Nn][Bb][Cc]$", - "^/[Ii][Dd][Cc]$", - "^/[Ll][Ff]$", - "^/[Ll][Oo][Dd]$", + "^#[Nn][Ee][Oo][Rr][Aa][Mm][Ee]$", + "^#[Nn][Aa][Uu]$", + "^#[Ff][Tt][Tt]$", + "^#[Ff][Tt][Ff]$", + "^#[Nn][Bb][Cc]$", + "^#[Ii][Dd][Cc]$", + "^#[Ll][Ff]$", + "^#[Ll][Oo][Dd]$", "^[Mm]ö[Pp]?$", "^[Mm][Ee][Ee][Pp]$", - "^/[Ff][Rr][Oo][Ss][Cc][Hh]$", - "^/[Bb][Aa][Rr][Uu][Ss][Aa][Mm][Ii][Kk][Oo][Ss][Uu]$", - "^/[Bb][Aa][Ll][Ss][Aa][Mm][Ii][Kk][Oo] [Ee][Ss][Ss][Ii][Gg]$", + "^#[Ff][Rr][Oo][Ss][Cc][Hh]$", + "^#[Bb][Aa][Rr][Uu][Ss][Aa][Mm][Ii][Kk][Oo][Ss][Uu]$", + "^#[Bb][Aa][Ll][Ss][Aa][Mm][Ii][Kk][Oo] [Ee][Ss][Ss][Ii][Gg]$", "^[Bb][Aa][Kk][Aa] [Bb][Oo][Tt]$", "^[Aa][Hh][Aa].[Pp][Nn][Gg]$", "^~?[Pp][Oo][Ii]$", - "^/[Tt][Hh][Yy][Mm][Ee]$", + "^#[Tt][Hh][Yy][Mm][Ee]$", "^[Yy][Oo][Ll][Oo]$", - "^/[Kk][Aa][Pp][Pp][Aa]$", + "^#[Kk][Aa][Pp][Pp][Aa]$", "[Ii] [Ww][Ii][Ss][Hh] [Ss][Qq][Uu][Ii][Dd][Ss] [Ww][Ee][Rr][Ee] [Rr][Ee][Aa][Ll]", --"[Ff][Gg][Tt]", - "^/[Kk][Ii][Ll][Ll] (.*)", + "^#[Kk][Ii][Ll][Ll] (.*)", "^[Ii][Nn][Ll][Oo][Vv][Ee]$", "^[Pp][Ee]$", "^[Vv][Aa]$", "^[Mm][Uu]$", - "^/[Ii][Yy][Kk][Ww][Ii][Mm]$" + "^#[Ii][Yy][Kk][Ww][Ii][Mm]$" }, run = run } diff --git a/plugins/speedtest.lua b/plugins/speedtest.lua index 4c4fea6..74961bc 100644 --- a/plugins/speedtest.lua +++ b/plugins/speedtest.lua @@ -13,8 +13,8 @@ end return { description = "Führt eine Speedtest aus", - usage = {"/speedtest"}, - patterns = {"^/[Ss][Pp][Ee][Ee][Dd][Tt][Ee][Ss][Tt]$"}, + usage = {"#speedtest"}, + patterns = {"^#[Ss][Pp][Ee][Ee][Dd][Tt][Ee][Ss][Tt]$"}, run = run } --by Akamaru [https://ponywave.de] \ No newline at end of file diff --git a/plugins/spotify_search.lua b/plugins/spotify_search.lua index 0a9a96a..61280ef 100644 --- a/plugins/spotify_search.lua +++ b/plugins/spotify_search.lua @@ -62,8 +62,8 @@ end return { description = "Sucht nach Tracks auf Spotify", - usage = "/spotify [Track]: Sucht nach einem Track auf Spotify", - patterns = {"^/spotify (.*)$"}, + usage = "#spotify [Track]: Sucht nach einem Track auf Spotify", + patterns = {"^#spotify (.*)$"}, run = run } diff --git a/plugins/stats.lua b/plugins/stats.lua index 18612df..4e7a782 100644 --- a/plugins/stats.lua +++ b/plugins/stats.lua @@ -146,8 +146,8 @@ end return { description = "Zeigt wieviel ihr spamt", - usage = {"/stats"}, - patterns = {"^/([Ss]tats)$"}, + usage = {"#stats"}, + patterns = {"^#([Ss]tats)$"}, run = run, pre_process = pre_process } diff --git a/plugins/sticker.lua b/plugins/sticker.lua index c74f4cc..45d480c 100644 --- a/plugins/sticker.lua +++ b/plugins/sticker.lua @@ -5,16 +5,16 @@ function run(msg, matches) send_document(get_receiver(msg), "sticker/facepalm.webp", ok_cb, false) elseif matches[1] == "all" then return [[ - /sticker nairaderp - /sticker facepalm + #sticker nairaderp + #sticker facepalm ]] end end return { description = "Sendet Custom Sticker", - usage = {"/sticker [Stickername]"}, - patterns = {"^/[S|s]ticker (.*)$"}, + usage = {"#sticker [Stickername]"}, + patterns = {"^#sticker (.*)$"}, run = run } --by Akamaru [https://ponywave.de] \ No newline at end of file diff --git a/plugins/stickerpacks.lua b/plugins/stickerpacks.lua index 9dd5a01..5c8b2fe 100644 --- a/plugins/stickerpacks.lua +++ b/plugins/stickerpacks.lua @@ -52,8 +52,8 @@ end return { description = "Sticker Pack Liste", - usage = {'/stickers'}, - patterns = {'^/[S|s]tickers$'}, + usage = {'#stickers'}, + patterns = {'^#stickers$'}, run = run } --by Akamaru [https://ponywave.de] \ No newline at end of file diff --git a/plugins/stille.lua b/plugins/stille.lua index a32dffe..3df8f61 100644 --- a/plugins/stille.lua +++ b/plugins/stille.lua @@ -2,7 +2,7 @@ do local function save_stille(msg) if msg.text:sub(11):isempty() then - return "Benutzung: /addstille [Zitat]" + return "Benutzung: #addstille [Zitat]" end local stille = msg.text:sub(11) @@ -14,7 +14,7 @@ end local function delete_stille(msg) if msg.text:sub(11):isempty() then - return "Benutzung: /delstille [Zitat]" + return "Benutzung: #delstille [Zitat]" end local stille = msg.text:sub(11) @@ -91,10 +91,10 @@ return { "stille: Gibt zufälliges Zitat aus." }, patterns = { - "^/(delstille) (.+)$", - "^/(addstille) (.+)$", + "^#(delstille) (.+)$", + "^#(addstille) (.+)$", "^*?[Ss][Tt][IiUu][Ll][Ll][Ee].?*?$", - "^/(liststille)$" + "^#(liststille)$" }, run = run } diff --git a/plugins/thc_search.lua b/plugins/thc_search.lua index 621d3e6..90f0d24 100644 --- a/plugins/thc_search.lua +++ b/plugins/thc_search.lua @@ -43,8 +43,8 @@ end return { description = "Suche für The Homebrew Cloud", - usage = "/thc [BEGRIFF]", - patterns = {"^/[Tt][Hh][Cc] (.*)$"}, + usage = "#thc [BEGRIFF]", + patterns = {"^#[Tt][Hh][Cc] (.*)$"}, run = run } diff --git a/plugins/time.lua b/plugins/time.lua index 2d524af..4872cc2 100644 --- a/plugins/time.lua +++ b/plugins/time.lua @@ -113,7 +113,7 @@ function getformattedLocalTime(area) end function run(msg, matches) - if string.match(msg.text, "^/[Z|z]eit$") or string.match(msg.text, "^/[T|t]ime$") then + if string.match(msg.text, "^#[Zz]eit$") or string.match(msg.text, "^#[Tt]ime$") then text = os.date("Es ist %H:%M:%S Uhr") return text else @@ -123,7 +123,7 @@ end return { description = "Zeigt die lokale Zeit in einer Zeitzone an", - usage = {'/zeit [Land/Ort]'}, - patterns = {'^/[Z|z]eit (.*)$','^/[T|t]ime (.*)$','^/[Z|z]eit$','^/[T|t]ime$'}, + usage = {'#zeit [Land/Ort]'}, + patterns = {'^#[Zz]eit (.*)$','^#[Tt]ime (.*)$','^/#[Zz]eit$','^#[Tt]ime$'}, run = run -} +} \ No newline at end of file diff --git a/plugins/torrent_search.lua b/plugins/torrent_search.lua index 37d6d74..64d9a2a 100644 --- a/plugins/torrent_search.lua +++ b/plugins/torrent_search.lua @@ -40,7 +40,7 @@ end return { description = "Suche nach Torrents", - usage = "/torrent [Begriff]", - patterns = {"^/torrent (.+)$","^/to (.+)$"}, + usage = "#torrent [Begriff]", + patterns = {"^#torrent (.+)$","^#to (.+)$"}, run = run } \ No newline at end of file diff --git a/plugins/translate.lua b/plugins/translate.lua index 94e8c80..18572f2 100644 --- a/plugins/translate.lua +++ b/plugins/translate.lua @@ -83,16 +83,16 @@ end return { description = "bersetze Text", usage = { - "/translate [Text]: bersetze Text in deutsch", - "/translate to:Zielsprache [Text]: bersetze Text in Zielsprache", - "/translate Quellsprache,Zielsprache [Text]: bersetze Text von beliebiger Sprache in beliebige Sprache", - "/whatlang [Text]: Gibt erkannte Sprache zurck" + "#translate [Text]: bersetze Text in deutsch", + "#translate to:Zielsprache [Text]: bersetze Text in Zielsprache", + "#translate Quellsprache,Zielsprache [Text]: bersetze Text von beliebiger Sprache in beliebige Sprache", + "#whatlang [Text]: Gibt erkannte Sprache zurck" }, patterns = { - "^/translate ([%w]+),([%a]+) (.+)", - "^/translate (to%:)([%w]+) (.+)", - "^/translate (.+)", - "^/(whatlang) (.+)" + "^#translate ([%w]+),([%a]+) (.+)", + "^#translate (to%:)([%w]+) (.+)", + "^#translate (.+)", + "^#(whatlang) (.+)" }, run = run } diff --git a/plugins/tts.lua b/plugins/tts.lua index f5abab4..5bb8d0a 100644 --- a/plugins/tts.lua +++ b/plugins/tts.lua @@ -38,12 +38,12 @@ end return { description = "Text-To-Speech", usage = { - "/tts [Text]: Sendet Sprachnachricht mit dem Text", - "/tts(Sprache) [Text]: Sendet Sprachnachricht in der Sprache mit dem Text" + "#tts [Text]: Sendet Sprachnachricht mit dem Text", + "#tts(Sprache) [Text]: Sendet Sprachnachricht in der Sprache mit dem Text" }, patterns = { - "^/tts (.+)$", - "^/tts(%w+) (.+)$" + "^#tts (.+)$", + "^#tts(%w+) (.+)$" }, run = run } \ No newline at end of file diff --git a/plugins/tvdb.lua b/plugins/tvdb.lua index fc7191e..651dd1e 100644 --- a/plugins/tvdb.lua +++ b/plugins/tvdb.lua @@ -85,8 +85,8 @@ end return { description = "Sendet Infos zu einer TV-Serie.", - usage = "/tv [TV-Serie]: Sendet Infos zur TV-Serie", - patterns = {"^/tv (.+)$"}, + usage = "#tv [TV-Serie]: Sendet Infos zur TV-Serie", + patterns = {"^#tv (.+)$"}, run = run } diff --git a/plugins/tweet.lua b/plugins/tweet.lua index 599f924..2299f86 100644 --- a/plugins/tweet.lua +++ b/plugins/tweet.lua @@ -237,18 +237,18 @@ end return { description = "Random tweew from user", usage = { - "/tweet id [id]: Get a random tweet from the user with that ID", - "/tweet id [id] last: Get a random tweet from the user with that ID", - "/tweet name [name]: Get a random tweet from the user with that name", - "/tweet name [name] last: Get a random tweet from the user with that name" + "#tweet id [id]: Get a random tweet from the user with that ID", + "#tweet id [id] last: Get a random tweet from the user with that ID", + "#tweet name [name]: Get a random tweet from the user with that name", + "#tweet name [name] last: Get a random tweet from the user with that name" }, patterns = { - "^/tweet (id) ([%w_%.%-]+)$", - "^/tweet (id) ([%w_%.%-]+) (last)$", - "^/tweet (id) ([%w_%.%-]+) (last) ([%d]+)$", - "^/tweet (name) ([%w_%.%-]+)$", - "^/tweet (name) ([%w_%.%-]+) (last)$", - "^/tweet (name) ([%w_%.%-]+) (last) ([%d]+)$" + "^#tweet (id) ([%w_%.%-]+)$", + "^#tweet (id) ([%w_%.%-]+) (last)$", + "^#tweet (id) ([%w_%.%-]+) (last) ([%d]+)$", + "^#tweet (name) ([%w_%.%-]+)$", + "^#tweet (name) ([%w_%.%-]+) (last)$", + "^#tweet (name) ([%w_%.%-]+) (last) ([%d]+)$" }, run = run } \ No newline at end of file diff --git a/plugins/twitter_send.lua b/plugins/twitter_send.lua index e88c0c8..c6fe1f5 100644 --- a/plugins/twitter_send.lua +++ b/plugins/twitter_send.lua @@ -43,8 +43,8 @@ end return { description = "Sende Tweets auf Twitter! twitter.com/Mikubot_", - usage = {"/tw [Text]"}, - patterns = {"^/tw (.+)"}, + usage = {"#tw [Text]"}, + patterns = {"^#tw (.+)"}, run = run, } diff --git a/plugins/urban_dictionary.lua b/plugins/urban_dictionary.lua index 638d050..3f6f842 100644 --- a/plugins/urban_dictionary.lua +++ b/plugins/urban_dictionary.lua @@ -33,8 +33,8 @@ end return { description = "Zeigt eine Urban Dictionary Definition", - usage = {"/ud [Begriff]"}, - patterns = {"^/ud (.*)$", + usage = {"#ud [Begriff]"}, + patterns = {"^#ud (.*)$", "^http://([A-Za-z0-9-_-]+).urbanup.com/", "^http://www.urbandictionary.com/define.php[?]term=([A-Za-z0-9-_-]+)" }, diff --git a/plugins/version.lua b/plugins/version.lua index 9e7d4a1..dd91eef 100644 --- a/plugins/version.lua +++ b/plugins/version.lua @@ -4,7 +4,7 @@ end return { description = "Zeigt die Bot Version", - usage = {"/version","/v"}, - patterns = {"^/version$","^/v$"}, + usage = {"#version","#v"}, + patterns = {"^#version$","^#v$"}, run = run } \ No newline at end of file diff --git a/plugins/videotogif.lua b/plugins/videotogif.lua index 313beb7..21b92d3 100644 --- a/plugins/videotogif.lua +++ b/plugins/videotogif.lua @@ -35,8 +35,8 @@ end return { description = "Konvertiert Video in GIF", - usage = "/vidtogif [URL]: Konvertiert Video in GIF", - patterns = {"^/vidtogif (.*)$"}, + usage = "#vidtogif [URL]: Konvertiert Video in GIF", + patterns = {"^#vidtogif (.*)$"}, run = run } diff --git a/plugins/wat.lua b/plugins/wat.lua index 1ebc506..ffc14e3 100644 --- a/plugins/wat.lua +++ b/plugins/wat.lua @@ -23,8 +23,8 @@ end return { description = "Sendet eins von 6 WAT Bilder", - usage = {"/wat","/Wat","/WAT"}, - patterns = {"^/wat$","^/Wat$","^/WAT$"}, + usage = {"#wat"}, + patterns = {"^#[Ww][Aa][Tt]$"}, run = run } --by Akamaru [https://ponywave.de] \ No newline at end of file diff --git a/plugins/weather.lua b/plugins/weather.lua index 8a4d68e..0c45fba 100644 --- a/plugins/weather.lua +++ b/plugins/weather.lua @@ -117,14 +117,14 @@ end return { description = "Wetter für deinen oder einen gewählten Ort", usage = { - "/wetter: Wetter für deinen Wohnort (!location set [Ort])", - "/wetter (Stadt): Wetter für diese Stadt" + "#wetter: Wetter für deinen Wohnort (!location set [Ort])", + "#wetter (Stadt): Wetter für diese Stadt" }, patterns = { - "^/wetter$", - "^/wetter (.*)$", - "^/w$", - "^/w (.*)$" + "^#wetter$", + "^#wetter (.*)$", + "^#w$", + "^#w (.*)$" }, run = run } diff --git a/plugins/webshot.lua b/plugins/webshot.lua index 8f98c36..40fb5e9 100644 --- a/plugins/webshot.lua +++ b/plugins/webshot.lua @@ -55,18 +55,18 @@ end return { description = "Sendet einen Screenshot einer Website.", usage = { - "/scrot [URL]: Fertigt Bild mit Größe 1024x768 (X) an", - "/scrot [T|S|E|N|M|L|X|F] [URL]: Fertigt Bild mit bestimmter Größe an (T = tiny, F = full)" + "#scrot [URL]: Fertigt Bild mit Größe 1024x768 (X) an", + "#scrot [T|S|E|N|M|L|X|F] [URL]: Fertigt Bild mit bestimmter Größe an (T = tiny, F = full)" }, patterns = { - "^/webshot ([T|t|S|s|E|e|N|n|M|m|L|l|X|x|F|f]) ([%w-_%.%?%.:,/%+=&#!]+)$", - "^/webshot ([T|t|S|s|E|e|N|n|M|m|L|l|X|x|F|f]) (https?://[%w-_%.%?%.:,/%+=&#!]+)$", - "^/webshot ([%w-_%.%?%.:,/%+=&#!]+)$", - "^/webshot (https?://[%w-_%.%?%.:,/%+=&#!]+)$", - "^/scrot ([T|t|S|s|E|e|N|n|M|m|L|l|X|x|F|f]) ([%w-_%.%?%.:,/%+=&#!]+)$", - "^/scrot ([T|t|S|s|E|e|N|n|M|m|L|l|X|x|F|f]) (https?://[%w-_%.%?%.:,/%+=&#!]+)$", - "^/scrot ([%w-_%.%?%.:,/%+=&#!]+)$", - "^/scrot (https?://[%w-_%.%?%.:,/%+=&#!]+)$" + "^#webshot ([T|t|S|s|E|e|N|n|M|m|L|l|X|x|F|f]) ([%w-_%.%?%.:,/%+=&#!]+)$", + "^#webshot ([T|t|S|s|E|e|N|n|M|m|L|l|X|x|F|f]) (https?://[%w-_%.%?%.:,/%+=&#!]+)$", + "^#webshot ([%w-_%.%?%.:,/%+=&#!]+)$", + "^#webshot (https?://[%w-_%.%?%.:,/%+=&#!]+)$", + "^#scrot ([T|t|S|s|E|e|N|n|M|m|L|l|X|x|F|f]) ([%w-_%.%?%.:,/%+=&#!]+)$", + "^#scrot ([T|t|S|s|E|e|N|n|M|m|L|l|X|x|F|f]) (https?://[%w-_%.%?%.:,/%+=&#!]+)$", + "^#scrot ([%w-_%.%?%.:,/%+=&#!]+)$", + "^#scrot (https?://[%w-_%.%?%.:,/%+=&#!]+)$" }, run = run } \ No newline at end of file diff --git a/plugins/whereisip.lua b/plugins/whereisip.lua index cb58b42..9784afc 100644 --- a/plugins/whereisip.lua +++ b/plugins/whereisip.lua @@ -17,7 +17,7 @@ end function run(msg,matches) local receiver = get_receiver(msg) - if matches[1] == "/whereisip" or matches[1] == "/ip" then + if matches[1] == "#whereisip" or matches[1] == "#ip" then message = "How to use:\n" .. matches[1] .. " nasa.gov\n" send_msg(receiver, message, ok_cb, false) return false @@ -29,15 +29,15 @@ end return { description = "Send the origin of an IP or domain", - usage = {"/ip (ip): Send the origin of an IP.", - "/ip (domain.com) Looks for his IP origin.", + usage = {"#ip (ip): Send the origin of an IP.", + "#ip (domain.com) Looks for his IP origin.", "You can find your ip in: http://lorenzomoreno.es/myip Credits: @rutrus" }, patterns = { - "^/whereisip$", - "^/ip$", - "^/whereisip ([%w.:]*)", - "^!/ip ([%w.:]*)$" + "^#whereisip$", + "^#ip$", + "^#whereisip ([%w.:]*)", + "^#ip ([%w.:]*)$" }, run = run } \ No newline at end of file diff --git a/plugins/wiki.lua b/plugins/wiki.lua index cc79650..11074c4 100644 --- a/plugins/wiki.lua +++ b/plugins/wiki.lua @@ -14,10 +14,10 @@ do end local wikiusage = { - "/wiki [Begriff]: Poste Artikel von der deutschen Wikipedia", - "/wiki(lang) [Begriff]: Poste Artikel aus anderer Sprache. Beispiel: /wikien Hello", - "/wiki search [Begriff]: Suche Text auf der deutschen Wikipedia", - "/wiki(lang) search [Begriff]: Suche Text auf einer anderssprachigen Wikipedia. Beispiel: /wikien search Hello", + "#wiki [Begriff]: Poste Artikel von der deutschen Wikipedia", + "#wiki(lang) [Begriff]: Poste Artikel aus anderer Sprache. Beispiel: /wikien Hello", + "#wiki search [Begriff]: Suche Text auf der deutschen Wikipedia", + "#wiki(lang) search [Begriff]: Suche Text auf einer anderssprachigen Wikipedia. Beispiel: /wikien search Hello", } local Wikipedia = { @@ -181,10 +181,10 @@ return { description = "Sendet Wikipedia Artikel", usage = wikiusage, patterns = { - "^/[Ww]iki(%w+) (search) (.+)$", - "^/[Ww]iki (search) ?(.*)$", - "^/[Ww]iki(%w+) (.+)$", - "^/[Ww]iki ?(.*)$", + "^#[Ww]iki(%w+) (search) (.+)$", + "^#[Ww]iki (search) ?(.*)$", + "^#[Ww]iki(%w+) (.+)$", + "^#[Ww]iki ?(.*)$", "(%w+).wikipedia.org/wiki/(.+)" }, run = run diff --git a/plugins/wuerfel.lua b/plugins/wuerfel.lua index af580ce..cfef2fa 100644 --- a/plugins/wuerfel.lua +++ b/plugins/wuerfel.lua @@ -7,8 +7,8 @@ end return { description = "Würfel eine Zahl zwischen 1 bis 6", - usage = {"/würfel"}, - patterns = {"^/würfel"}, + usage = {"#würfel"}, + patterns = {"^#würfel"}, run = run } end diff --git a/plugins/xkcd.lua b/plugins/xkcd.lua index 08ffbd3..da83530 100644 --- a/plugins/xkcd.lua +++ b/plugins/xkcd.lua @@ -34,7 +34,7 @@ end function run(msg, matches) local receiver = get_receiver(msg) - if matches[1] == "/xkcd" then + if matches[1] == "#xkcd" then url, title, alt = get_xkcd_random() else url, title, alt = get_xkcd(matches[1]) @@ -46,8 +46,8 @@ end return { description = "Sendet Comics von xkcd", - usage = {"/xkcd"}, - patterns = {"^/xkcd$","^/xkcd (%d+)","xkcd.com/(%d+)"}, + usage = {"#xkcd"}, + patterns = {"^#xkcd$","^#xkcd (%d+)","xkcd.com/(%d+)"}, run = run } diff --git a/plugins/yagyuu.lua b/plugins/yagyuu.lua index f002d1b..87721aa 100644 --- a/plugins/yagyuu.lua +++ b/plugins/yagyuu.lua @@ -17,8 +17,8 @@ end return { description = "Postet ein Bild von yagyuu.moe", - usage = "/yagyuu", - patterns = {"^/[Y|y]agyuu$"}, + usage = "#yagyuu", + patterns = {"^#[Yy][Aa][Gg][Yy][Uu][Uu]$"}, run = run } -- Created by github.com/Brawl345 diff --git a/plugins/yandere.lua b/plugins/yandere.lua index 126025e..0b380b8 100644 --- a/plugins/yandere.lua +++ b/plugins/yandere.lua @@ -29,8 +29,8 @@ end return { description = "Sendet zufälliges Bild von Yandere.", - usage = {"/yandere [Tags]","/yan [Tags]"}, - patterns = {"^/yandere (.*)$","^/yan (.*)$"}, + usage = {"#yandere [Tags]","#yan [Tags]"}, + patterns = {"^#yandere (.*)$","^#yan (.*)$"}, run = run } end \ No newline at end of file diff --git a/plugins/yoda.lua b/plugins/yoda.lua index 42e8dc3..a762b4b 100644 --- a/plugins/yoda.lua +++ b/plugins/yoda.lua @@ -36,9 +36,9 @@ end return { description = "Listen to Yoda and learn from his words!", - usage = "/yoda You will learn how to speak like me someday.", + usage = "#yoda You will learn how to speak like me someday.", patterns = { - "^/[Yy][Oo][Dd][Aa] (.*)$" + "^#[Yy][Oo][Dd][Aa] (.*)$" }, run = run } \ No newline at end of file diff --git a/plugins/yolo.lua b/plugins/yolo.lua index 4808726..faaa672 100644 --- a/plugins/yolo.lua +++ b/plugins/yolo.lua @@ -9,8 +9,8 @@ end return { description = "", - usage = {"/yolo"}, - patterns = {"^/[Yy][Oo][Ll][Oo]$"}, + usage = {"#yolo"}, + patterns = {"^#[Yy][Oo][Ll][Oo]$"}, run = run } --by Akamaru [https://ponywave.de] \ No newline at end of file diff --git a/plugins/yourls.lua b/plugins/yourls.lua index 34bb805..b195e6e 100644 --- a/plugins/yourls.lua +++ b/plugins/yourls.lua @@ -39,9 +39,9 @@ end return { description = "Kürzt einen Link", - usage = "/yourls [Link]: Kürzt einen Link mit YOURLS", + usage = "#yourls [Link]: Kürzt einen Link mit YOURLS", patterns = { - "^/yourls (https?://[%w-_%.%?%.:/%+=&]+)" + "^#yourls (https?://[%w-_%.%?%.:/%+=&]+)" }, run = run } diff --git a/plugins/youtube_dl.lua b/plugins/youtube_dl.lua index 8fff977..05f0aad 100644 --- a/plugins/youtube_dl.lua +++ b/plugins/youtube_dl.lua @@ -8,7 +8,7 @@ function run(msg, matches) return 'Vergiss es' end - if string.match(msg.text, "/mp4") then + if string.match(msg.text, "#mp4") then text = run_bash('youtube-dl -o "tmp/%(title)s.%(ext)s" '..URL) video = string.match(text, 'Merging formats into "tmp/(.*).mp4"') if not video then @@ -19,7 +19,7 @@ function run(msg, matches) send_video(get_receiver(msg), file, ok_cb, false) end - if string.match(msg.text, "/mp3") then + if string.match(msg.text, "#mp3") then text = run_bash('youtube-dl -o "tmp/%(title)s.%(ext)s" --extract-audio --audio-format mp3 '..URL) audio = string.match(text, '%[ffmpeg%] Destination: tmp/(.*).mp3') file = 'tmp/'..audio..'.mp3' @@ -39,8 +39,8 @@ end return { description = "Downloadet und sendet ein Video von verschiedenen Seiten mit youtube-dl", - usage = {"/mp4 [Link] (Um Video zu laden)","/mp3 [Link] (Um Audio zu laden)","Unterstützte Seiten: PonyWave.de/a/youtubedl"}, - patterns = {"^/mp4 (https?://[%w-_%.%?%.:/%+=&]+)$","^/mp3 (https?://[%w-_%.%?%.:/%+=&]+)$"}, + usage = {"#mp4 [Link] (Um Video zu laden)","#mp3 [Link] (Um Audio zu laden)","Unterstützte Seiten: PonyWave.de/a/youtubedl"}, + patterns = {"^#mp4 (https?://[%w-_%.%?%.:/%+=&]+)$","^#mp3 (https?://[%w-_%.%?%.:/%+=&]+)$"}, run = run } --by Akamaru [https://ponywave.de] \ No newline at end of file diff --git a/plugins/youtube_search.lua b/plugins/youtube_search.lua index c5a2483..1bd8465 100644 --- a/plugins/youtube_search.lua +++ b/plugins/youtube_search.lua @@ -44,8 +44,8 @@ end return { description = "Sucht ein YouTube-Video und sendet es", - usage = {"/youtube [Suchbegriff]","/yt [Suchbegriff]"}, - patterns = {"^/youtube (.*)$","^/yt (.*)$"}, + usage = {"#youtube [Suchbegriff]","#yt [Suchbegriff]"}, + patterns = {"^#youtube (.*)$","^#yt (.*)$"}, run = run } diff --git a/plugins/z0r.lua b/plugins/z0r.lua index 1e8ff21..3e089a4 100644 --- a/plugins/z0r.lua +++ b/plugins/z0r.lua @@ -12,8 +12,8 @@ end return { description = "Sendet Flashs von Z0R.de", - usage = {"z0r.de URL","/z0r [ID]"}, - patterns = {"https?://z0r.de/([%w-_%.%?%.:,/%+=&#!]+)$","^/[Zz]0[Rr] (.*)$"}, + usage = {"z0r.de URL","#z0r [ID]"}, + patterns = {"https?://z0r.de/([%w-_%.%?%.:,/%+=&#!]+)$","^#[Zz]0[Rr] (.*)$"}, run = run } --by Akamaru [https://ponywave.de] \ No newline at end of file