Änderung der Commands von / auf #

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

View File

@ -93,8 +93,8 @@ end
function pre_process_service_msg(msg)
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

View File

@ -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

View File

@ -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
}

View File

@ -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

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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 zufälliges Boobs/Butts Bild",
usage = {"/boobs","/butts"},
patterns = {"^/boobs$","^/butts$"},
usage = {"#boobs","#butts"},
patterns = {"^#boobs$","^#butts$"},
run = run
}

View File

@ -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
}

View File

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

View File

@ -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,

View File

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

View File

@ -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
}

View File

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

View File

@ -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
}

View File

@ -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 für Telegram (nur Superuser)",
usage = {
"/creds: Zeigt alle Logindaten und API-Keys",
"/creds add [Variable] [Key]: Speichert Key mit der Variable ein",
"/creds del [Variable]: Löscht Key mit der Variable",
"/creds rename [Variable] [Neuer Name]: Benennt Variable um, behält Key bei"
"#creds: Zeigt alle Logindaten und API-Keys",
"#creds add [Variable] [Key]: Speichert Key mit der Variable ein",
"#creds del [Variable]: Löscht Key mit der Variable",
"#creds rename [Variable] [Neuer Name]: Benennt Variable um, behält Key bei"
},
patterns = {
"^(/creds)$",

View File

@ -18,7 +18,7 @@ end
return {
description = "Führt 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]

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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]

View File

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

View File

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

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

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

View File

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

View File

@ -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
}

View File

@ -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
}

View File

@ -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]

View File

@ -170,7 +170,7 @@ local function run(msg, matches)
redis:hset('telegram:cache:weather:'..string.lower(city), 'lat', lat)
redis:hset('telegram:cache:weather:'..string.lower(city), '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
}

View File

@ -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
}

19
plugins/fusroga.lua Normal file
View File

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

View File

@ -131,8 +131,8 @@ end
return {
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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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]

View File

@ -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
}

View File

@ -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
}

View File

@ -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

View File

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

View File

@ -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
}

View File

@ -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]

View File

@ -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
}

View File

@ -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
}

View File

@ -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

View File

@ -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
}

View File

@ -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

View File

@ -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
}

View File

@ -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
}

View File

@ -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]

View File

@ -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
}

View File

@ -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
}

View File

@ -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

View File

@ -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]

View File

@ -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
}

View File

@ -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]

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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: Löscht deinen angegebenen Wohnort"
"#location: Gibt deinen gesetzten Wohnort aus",
"#location set (Ort): Setzt deinen Wohnort auf diesen Ort",
"#location del: Löscht deinen angegebenen Wohnort"
},
patterns = {
"^/location (set) (.*)$",
"^/location (del)$",
"^/location$"
"^#location (set) (.*)$",
"^#location (del)$",
"^#location$"
},
run = run
}

View File

@ -1,4 +1,4 @@
-- This is a proprietary plugin, property of Andreas Bielawski, (c) 2015 <andi (dot) b (at) outlook (dot) de>
-- This is a proprietary plugin, property of Andreas Bielawski, (c) 2015 <andi (dot) b (at) outlook (dot) de>
-- DO NOT USE WITHOUT PERMISSION
do
@ -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
}

View File

@ -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]

View File

@ -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
}

View File

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

View File

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

View File

@ -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
}

View File

@ -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]

View File

@ -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
}

View File

@ -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%.]*)"
},

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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/(.*)$"
},

View File

@ -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,

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

44
plugins/pegelf_mc.lua Normal file
View File

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

View File

@ -129,8 +129,8 @@ end
return {
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
}

View File

@ -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 <ID>: Aktiviert Plugin in Chat <ID>.",
"/plugins disable [plugin] chat: Deaktiviert Plugin in diesem Chat.",
"/plugins disable [plugin] chat <ID>: Deaktiviert Plugin in Chat <ID>.",
"/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 <ID>: Aktiviert Plugin in Chat <ID>.",
"#plugins disable [plugin] chat: Deaktiviert Plugin in diesem Chat.",
"#plugins disable [plugin] chat <ID>: Deaktiviert Plugin in Chat <ID>.",
"#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

View File

@ -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
}

View File

@ -44,8 +44,8 @@ end
return {
description = "Sendet zufälliges 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
}

View File

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

View File

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

View File

@ -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]

View File

@ -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
}

View File

@ -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
}

View File

@ -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

View File

@ -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

View File

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

View File

@ -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
}

View File

@ -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
}

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