From 7224cec8341ee78df5399d89f86ac7a32a27fb0a Mon Sep 17 00:00:00 2001 From: yago Date: Wed, 4 Mar 2015 23:51:36 +0100 Subject: [PATCH] Fixed some tabulation --- plugins/google.lua | 20 ++++++++++---------- plugins/hello.lua | 16 +++++++++------- plugins/help.lua | 20 ++++++++++---------- plugins/img_google.lua | 8 ++++---- plugins/media.lua | 37 ++++++++++++++++++++----------------- 5 files changed, 53 insertions(+), 48 deletions(-) diff --git a/plugins/google.lua b/plugins/google.lua index 61f6b2e..5e3434b 100644 --- a/plugins/google.lua +++ b/plugins/google.lua @@ -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 } diff --git a/plugins/hello.lua b/plugins/hello.lua index f9b13ba..706b3d1 100644 --- a/plugins/hello.lua +++ b/plugins/hello.lua @@ -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 \ No newline at end of file diff --git a/plugins/help.lua b/plugins/help.lua index c671ff1..186a2af 100644 --- a/plugins/help.lua +++ b/plugins/help.lua @@ -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 } \ No newline at end of file diff --git a/plugins/img_google.lua b/plugins/img_google.lua index 5335082..3e7c552 100644 --- a/plugins/img_google.lua +++ b/plugins/img_google.lua @@ -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 \ No newline at end of file diff --git a/plugins/media.lua b/plugins/media.lua index 6b86618..ce2c3fb 100644 --- a/plugins/media.lua +++ b/plugins/media.lua @@ -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 \ No newline at end of file