From 69787daf925f3987f1ddfb448a3db2ba3f03315e Mon Sep 17 00:00:00 2001 From: Andreas Bielawski Date: Sun, 4 Sep 2016 15:38:32 +0200 Subject: [PATCH] Banhammer-Warn-Text kann jetzt in der Config gesetzt werden --- config.lua.example | 9 ++++++++- otouto/plugins/banhammer.lua | 5 ++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/config.lua.example b/config.lua.example index 183899d..c5b5309 100644 --- a/config.lua.example +++ b/config.lua.example @@ -18,8 +18,15 @@ Dies ist die BETA-Version von Brawlbot v2. Sende /hilfe, um zu starten ]], - -- The symbol that starts a command. Usually noted as '/' in documentation. + + -- DO NOT CHANGE THIS cmd_pat = '/', + + -- Text for users, who are not approved + banhammer_text = [[ + Dies ist ein privater Bot, der erst nach einer Freischaltung benutzt werden kann. + This is a private bot, which can only be used after an approval. + ]], -- false = only whitelisted users can use inline querys -- NOTE that it doesn't matter, if the chat is whitelisted! The USER must be whitelisted! diff --git a/otouto/plugins/banhammer.lua b/otouto/plugins/banhammer.lua index 71a7b59..05bbb8c 100644 --- a/otouto/plugins/banhammer.lua +++ b/otouto/plugins/banhammer.lua @@ -156,7 +156,10 @@ function banhammer:pre_process(msg, config) end else if not has_been_warned then - utilities.send_reply(msg, "Dies ist ein privater Bot, der erst nach einer Freischaltung benutzt werden kann.\nThis is a private bot, which can only be after an approval.") + utilities.send_reply(msg, config.banhammer_text or [[ + Dies ist ein privater Bot, der erst nach einer Freischaltung benutzt werden kann. + This is a private bot, which can only be used after an approval. + ]]) redis:hset('user:'..user_id, 'has_been_warned', true) else print('User has already been warned!')