Neues Plugin imgur.lua

This commit is contained in:
Akamaru 2015-12-19 15:18:46 +01:00
parent 31c792468d
commit 47590c6cdc
2 changed files with 17 additions and 1 deletions

4
.gitignore vendored
View File

@ -5,4 +5,6 @@ plugins/test.lua
plugins/licht.lua
plugins/dantest.lua
plugins/stats2.lua
plugins/help2.lua
plugins/help2.lua
plugins/pegelf_img.lua
plugins/plex.lua

14
plugins/imgur.lua Normal file
View File

@ -0,0 +1,14 @@
local function run(msg, matches)
local receiver = get_receiver(msg)
local url = 'http://i.imgur.com/'..matches[1]..'.jpg'
print("Bild URL: "..url)
send_photo_from_url(receiver, url)
end
return {
description = "Imgur Mirror",
usage = {"Imgur Link"},
patterns = {"imgur.com/([A-Za-z0-9]+)$",},
run = run
}
--by Akamaru [https://ponywave.de]