From fc7e0d46f9816195a8224b20ee6d15770582f84c Mon Sep 17 00:00:00 2001 From: Andreas Bielawski Date: Tue, 21 Jun 2016 16:20:56 +0200 Subject: [PATCH] Launch-Bugfixes! - Cats sendet wieder - About: /start als Pattern - Shell: return vergessen --- otouto/bot.lua | 10 ++-------- otouto/plugins/about.lua | 3 ++- otouto/plugins/cats.lua | 4 ++-- otouto/plugins/shell.lua | 1 + 4 files changed, 7 insertions(+), 11 deletions(-) diff --git a/otouto/bot.lua b/otouto/bot.lua index 350ab85..1014bfa 100644 --- a/otouto/bot.lua +++ b/otouto/bot.lua @@ -197,11 +197,8 @@ end function create_plugin_set() enabled_plugins = { 'control', - 'blacklist', 'about', - 'ping', - 'whoami', - 'nick', + 'id', 'echo', 'imgblacklist', 'gImages', @@ -213,12 +210,9 @@ function create_plugin_set() 'urbandictionary', 'time', 'reddit', + 'reddit_post', 'xkcd', - 'slap', - 'commit', - 'pun', 'currency', - 'shout', 'set', 'get', 'patterns', diff --git a/otouto/plugins/about.lua b/otouto/plugins/about.lua index 4bdda71..f460197 100644 --- a/otouto/plugins/about.lua +++ b/otouto/plugins/about.lua @@ -7,7 +7,8 @@ about.command = 'about' about.doc = '`Sendet Informationen über den Bot.`' about.triggers = { - '/about' + '/about', + '/start' } function about:action(msg, config) diff --git a/otouto/plugins/cats.lua b/otouto/plugins/cats.lua index d122f4b..4fd259c 100644 --- a/otouto/plugins/cats.lua +++ b/otouto/plugins/cats.lua @@ -27,11 +27,11 @@ local apikey = cred_data.cat_apikey or "" -- apply for one here: http://thecatap function cats:action(msg, config) if matches[1] == 'gif' then local url = 'http://thecatapi.com/api/images/get?type=gif&apikey='..apikey - local file = download_to_file(url) + local file = download_to_file(url, 'miau.gif') utilities.send_document(self, msg.chat.id, file, nil, msg.message_id) else local url = 'http://thecatapi.com/api/images/get?type=jpg,png&apikey='..apikey - local file = download_to_file(url) + local file = download_to_file(url, 'miau.png') utilities.send_photo(self, msg.chat.id, file, nil, msg.message_id) end end diff --git a/otouto/plugins/shell.lua b/otouto/plugins/shell.lua index d97ace6..ef3600c 100644 --- a/otouto/plugins/shell.lua +++ b/otouto/plugins/shell.lua @@ -10,6 +10,7 @@ function shell:action(msg, config) if msg.from.id ~= config.admin then utilities.send_reply(self, msg, config.errors.sudo) + return end local input = utilities.input(msg.text)