From f4bb73b9b3b70831af771348cd5283a69fe9a0e9 Mon Sep 17 00:00:00 2001 From: Akamaru Date: Thu, 25 Aug 2016 23:17:46 +0200 Subject: [PATCH] =?UTF-8?q?Nur=20ein=20paar=20=C3=84nderungen=20.=5F.=20^^?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- miku/plugins/kickstarter_search.lua | 2 +- miku/plugins/respond.lua | 4 ---- miku/plugins/special.lua | 8 +++++++- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/miku/plugins/kickstarter_search.lua b/miku/plugins/kickstarter_search.lua index 1302db1..1c2a91f 100644 --- a/miku/plugins/kickstarter_search.lua +++ b/miku/plugins/kickstarter_search.lua @@ -5,7 +5,7 @@ function kickstarter_search:init(config) "/[Kk][Ii][Cc][Kk][Ss] (.+)$" } kickstarter_search.doc = [[* -]]..config.cmd_pat..[[kicks* __: Sucht Projekt auf Kickstarter]] +]]..config.cmd_pat..[[kicks* __: Sucht ein Projekt auf Kickstarter]] kickstarter_search.command = 'kicks ' end diff --git a/miku/plugins/respond.lua b/miku/plugins/respond.lua index 887432c..e327c82 100644 --- a/miku/plugins/respond.lua +++ b/miku/plugins/respond.lua @@ -6,7 +6,6 @@ function respond:init(config) "([Ee][Ii][Nn][Zz][Ii][Gg][Ss][Tt][Ee][Ss])", "([Ee][Ii][Nn][Zz][Ii][Gg][Ss][Tt][Ee][Rr])", "([Ee][Ii][Nn][Zz][Ii][Gg][Ss][Tt][Ee])", - "^[Bb][Oo][Tt]%??$", "^/([Ll][Oo][Dd])$", "^/([Ll][Ff])$", "^/([Kk][Aa])$", @@ -62,9 +61,6 @@ function respond:action(msg, config, matches) elseif string.match(msg.text, "([Ee][Ii][Nn][Zz][Ii][Gg][Ss][Tt][Ee])") then utilities.send_message(receiver, '*einzige') return - elseif string.match(msg.text, "[Bb][Oo][Tt]%??") then - utilities.send_reply(msg, '*Ich bin da, '..user_name..'!*', true) - return elseif string.match(msg.text, "[Ll][Oo][Dd]") then utilities.send_message(receiver, 'ಠ_ಠ') return diff --git a/miku/plugins/special.lua b/miku/plugins/special.lua index e5ba4f9..3dd5d09 100644 --- a/miku/plugins/special.lua +++ b/miku/plugins/special.lua @@ -2,6 +2,7 @@ local special = {} special.triggers = { "[Rr][Ii][Cc][Hh] [Bb][Ii][Tt][Cc][Hh]", + "^[Mm][Ii][Kk][Uu]%??$", "^/[Oo][Ll][Dd]$", "^[Nn][Yy][Uu]$", "^[Nn][Oo][Pp][Ee].[Aa][Vv][Ii]$", @@ -32,11 +33,16 @@ special.triggers = { } function special:action(msg, config, matches) + local user_name = get_name(msg) local msg_text = msg.text local output if msg_text:match("[Rr][Ii][Cc][Hh] [Bb][Ii][Tt][Cc][Hh]") then output = 'Akamaru ist nicht reich!' + elseif string.match(msg.text, "[Mm][Ii][Kk][Uu]%??") then + local alive_answers = {'Ja?','Was gibts, '..user_name..'?','Ja '..user_name..', was ist?', 'Ich bin noch da.', user_name, 'Nein!','So heiße ich', 'Nerv mich nicht!'} + local random_alive = math.random(8) + output = alive_answers[random_alive] elseif msg_text:match("/[Oo][Ll][Dd]") then output = 'Deine Mudda is old!' elseif msg_text:match("[Nn][Yy][Uu]") then @@ -81,7 +87,7 @@ function special:action(msg, config, matches) utilities.send_photo(msg.chat.id, download_to_file('http://img.ponywave.de/di/0SEY/barusamikosu.jpg'), nil, msg.message_id) return elseif msg_text:match("[Bb][Aa][Kk][Aa] [Bb][Oo][Tt]") then - output = 'Gomen\'nasai '..msg.from.first_name..'-sempai 😣' + output = 'Gomen\'nasai '..msg.from.first_name..'-senpai 😣' elseif msg_text:match("[Aa][Hh][Aa].[Pp][Nn][Gg]") then utilities.send_photo(msg.chat.id, download_to_file('http://img.ponywave.de/di/W97R/aha.png'), nil, msg.message_id) return