From cc76046156c4057de029c9a31c144130dc23df38 Mon Sep 17 00:00:00 2001 From: yago Date: Sun, 15 Feb 2015 12:00:33 +0100 Subject: [PATCH] little changes --- bot/bot.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/bot/bot.lua b/bot/bot.lua index 928d76d..74fd762 100644 --- a/bot/bot.lua +++ b/bot/bot.lua @@ -47,6 +47,7 @@ function msg_valid(msg) end function do_lex(msg, text) + -- Plugins which implements lex. for name, desc in pairs(plugins) do if (desc.lex ~= nil) then result = desc.lex(msg, text) @@ -64,9 +65,9 @@ function do_action(msg) local receiver = get_receiver(msg) local text = msg.text - if msg.text == nil then + if text == nil then -- Not a text message, make text the same as what tg shows so - -- we can match on it. The plugin is resposible for handling + -- we can match on it. Maybe a plugin activated my media type. if msg.media ~= nil then text = '['..msg.media.type..']' end @@ -149,10 +150,13 @@ function create_config( ) config = { enabled_plugins = { "9gag", + "eur", "echo", + "btc", "get", "giphy", "google", + "gps", "help", "images", "img_google", @@ -164,6 +168,7 @@ function create_config( ) "time", "version", "weather", + "xkcd", "youtube" }, sudo_users = {our_id} }