New command added to youtube_search plugin

This commit is contained in:
Akamaru 2015-04-15 18:45:45 +02:00
parent cc6b4d76f4
commit 22cff42b7b
4 changed files with 29 additions and 3 deletions

24
plugins/boersedown.lua Normal file
View File

@ -0,0 +1,24 @@
socket = require("socket")
function cron()
-- Use yours desired web and id
local addr = "www.boerse.to"
local dest = "chat#id11215880"
-- Checks a TCP connexion
local connexion = socket.connect(addr, 80)
if not connexion then
local text = "boerse.to ist schon wieder Offline..."
print (text)
send_msg(dest, text, ok_cb, false)
else
connexion:close()
end
end
return {
description = "",
usage = "",
patterns = {},
run = nil,
cron = cron
}

View File

@ -46,7 +46,8 @@ return {
description = "Sucht ein Video auf YouTube und sendet es",
usage = "/youtube [Begriff]",
patterns = {
"^/youtube (.*)"
"^/youtube (.*)",
"^/yt (.*)"
},
run = run
}

View File

@ -1,3 +1,4 @@
function run_sh(msg)
name = get_name(msg)
text = ''