From 83a637bc290403134e5ac8c521eaba10b62f02a3 Mon Sep 17 00:00:00 2001 From: Andreas Bielawski Date: Wed, 3 Aug 2016 16:32:24 +0200 Subject: [PATCH] =?UTF-8?q?-=20dkjson=20durch=20lua-cjson=20ausgetauscht.?= =?UTF-8?q?=20Bitte=20lua-cjson=20installieren!=20-=20Surrogate=20unterst?= =?UTF-8?q?=C3=BCtzt=20jetzt=20auch=20@-Namen=20(und=20dadurch=20auch=20Ka?= =?UTF-8?q?n=C3=A4le)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- otouto/plugins/echo.lua | 2 +- otouto/plugins/surrogate.lua | 4 ++-- otouto/utilities.lua | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 2c652c5..09cfd01 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ Du benötigst **Lua 5.2+**, eine aktive **Redis-Instanz** und die folgenden **Lu * luasocket * luasec * multipart-post -* dkjson +* lua-cjson * lpeg * redis-lua * fakeredis diff --git a/otouto/plugins/echo.lua b/otouto/plugins/echo.lua index 3d9b154..55e9666 100644 --- a/otouto/plugins/echo.lua +++ b/otouto/plugins/echo.lua @@ -13,7 +13,7 @@ function echo:init(config) end function echo:inline_callback(inline_query, config, matches) - local text = matches[1] + local text = matches[1] local results = '[' -- enable custom markdown button diff --git a/otouto/plugins/surrogate.lua b/otouto/plugins/surrogate.lua index 2b52d94..8da3ae7 100644 --- a/otouto/plugins/surrogate.lua +++ b/otouto/plugins/surrogate.lua @@ -2,11 +2,11 @@ local surrogate = {} surrogate.triggers = { "^/s (%-%d+) +(.+)$", - "^/s (%d+) +(.+)$" + "^/s (%d+) +(.+)$", + "^/s (@[A-Za-z0-9-_-.-._.]+) +(.+)" } function surrogate:action(msg) - -- Supergroups don't work!? utilities.send_message(self, matches[1], matches[2], true, nil, true) return end diff --git a/otouto/utilities.lua b/otouto/utilities.lua index a18c930..1194b0d 100644 --- a/otouto/utilities.lua +++ b/otouto/utilities.lua @@ -8,7 +8,7 @@ http = require('socket.http') https = require('ssl.https') socket = require('socket') URL = require('socket.url') -json = require('dkjson') +json = require "cjson" serpent = require("serpent") bindings = require('otouto.bindings') redis = (loadfile "./otouto/redis.lua")()