Fixed some tabulation

This commit is contained in:
yago 2015-03-04 23:51:36 +01:00
parent 565ac4db40
commit 7224cec834
5 changed files with 53 additions and 48 deletions

View File

@ -22,17 +22,17 @@ function stringlinks(results)
end
function run(msg, matches)
vardump(matches)
local results = googlethat(matches[1])
return stringlinks(results)
vardump(matches)
local results = googlethat(matches[1])
return stringlinks(results)
end
return {
description = "Searches Google and send results",
usage = "!google [terms]: Searches Google and send results",
patterns = {
"^!google (.*)$",
"^%.[g|G]oogle (.*)$"
},
run = run
description = "Searches Google and send results",
usage = "!google [terms]: Searches Google and send results",
patterns = {
"^!google (.*)$",
"^%.[g|G]oogle (.*)$"
},
run = run
}

View File

@ -1,15 +1,17 @@
do
function run(msg, matches)
return "Hello, " .. matches[1]
end
return {
description = "Says hello to someone",
usage = "say hello to [name]",
patterns = {
"^say hello to (.*)$",
"^Say hello to (.*)$"
},
run = run
description = "Says hello to someone",
usage = "say hello to [name]",
patterns = {
"^say hello to (.*)$",
"^Say hello to (.*)$"
},
run = run
}
end

View File

@ -61,14 +61,14 @@ function run(msg, matches)
end
return {
description = "Help plugin. Get info from other plugins. ",
usage = {
"!help: Show all the help",
"!help md: Generate a GitHub Markdown table"
},
patterns = {
"^!help$",
"^!help md$"
},
run = run
description = "Help plugin. Get info from other plugins. ",
usage = {
"!help: Show all the help",
"!help md: Generate a GitHub Markdown table"
},
patterns = {
"^!help$",
"^!help md$"
},
run = run
}

View File

@ -26,10 +26,10 @@ function run(msg, matches)
end
return {
description = "Search image with Google API and sends it.",
usage = "!img [term]: Random search an image with Google API.",
patterns = {"^!img (.*)$"},
run = run
description = "Search image with Google API and sends it.",
usage = "!img [term]: Random search an image with Google API.",
patterns = {"^!img (.*)$"},
run = run
}
end

View File

@ -1,23 +1,26 @@
do
function run(msg, matches)
file = download_to_file(matches[1])
send_document(get_receiver(msg), file, ok_cb, false)
file = download_to_file(matches[1])
send_document(get_receiver(msg), file, ok_cb, false)
end
return {
description = "When user sends media URL (ends with gif, mp4, pdf, etc.) download and send it to origin.",
usage = "",
patterns = {
"(https?://[%w-_%.%?%.:/%+=&]+%.gif)$",
"(https?://[%w-_%.%?%.:/%+=&]+%.mp4)$",
"(https?://[%w-_%.%?%.:/%+=&]+%.pdf)$",
"(https?://[%w-_%.%?%.:/%+=&]+%.ogg)$",
"(https?://[%w-_%.%?%.:/%+=&]+%.zip)$",
"(https?://[%w-_%.%?%.:/%+=&]+%.mp3)$",
"(https?://[%w-_%.%?%.:/%+=&]+%.rar)$",
"(https?://[%w-_%.%?%.:/%+=&]+%.wmv)$",
"(https?://[%w-_%.%?%.:/%+=&]+%.doc)$",
"(https?://[%w-_%.%?%.:/%+=&]+%.avi)$"
},
run = run
description = "When user sends media URL (ends with gif, mp4, pdf, etc.) download and send it to origin.",
usage = "",
patterns = {
"(https?://[%w-_%.%?%.:/%+=&]+%.gif)$",
"(https?://[%w-_%.%?%.:/%+=&]+%.mp4)$",
"(https?://[%w-_%.%?%.:/%+=&]+%.pdf)$",
"(https?://[%w-_%.%?%.:/%+=&]+%.ogg)$",
"(https?://[%w-_%.%?%.:/%+=&]+%.zip)$",
"(https?://[%w-_%.%?%.:/%+=&]+%.mp3)$",
"(https?://[%w-_%.%?%.:/%+=&]+%.rar)$",
"(https?://[%w-_%.%?%.:/%+=&]+%.wmv)$",
"(https?://[%w-_%.%?%.:/%+=&]+%.doc)$",
"(https?://[%w-_%.%?%.:/%+=&]+%.avi)$"
},
run = run
}
end