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

View File

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

View File

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

View File

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

View File

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