From 1d7901855eb291023d70523aa5ce227c572208b5 Mon Sep 17 00:00:00 2001 From: Andreas Bielawski Date: Thu, 28 Jul 2016 12:54:24 +0200 Subject: [PATCH] - Translate: Checkt, ob Bing-Key existiert - Wiki: Bugfix, wenn keine Parameter angegeben --- otouto/plugins/translate.lua | 5 +++++ otouto/plugins/wikipedia.lua | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/otouto/plugins/translate.lua b/otouto/plugins/translate.lua index a80cb9f..f9e8427 100644 --- a/otouto/plugins/translate.lua +++ b/otouto/plugins/translate.lua @@ -10,6 +10,11 @@ require("./otouto/plugins/pasteee") translate.command = 'translate [Text]' function translate:init(config) + if not cred_data.bing_key then + print('Missing config value: bing_key.') + print('translate.lua will not be enabled.') + return + end translate.triggers = { "^/translate ([%w]+),([%a]+) (.+)", "^/translate (to%:)([%w]+) (.+)", diff --git a/otouto/plugins/wikipedia.lua b/otouto/plugins/wikipedia.lua index 5d2d326..7a45519 100644 --- a/otouto/plugins/wikipedia.lua +++ b/otouto/plugins/wikipedia.lua @@ -209,7 +209,7 @@ function wikipedia:action(msg, config, matches) lang = nil end if term == "" then - utilities.send_reply(msg, self, wikipedia.doc) + utilities.send_reply(self, msg, wikipedia.doc) return end