From 19512c86ec2c5ea06173fb110c6a7ea04805acef Mon Sep 17 00:00:00 2001 From: Klafyvel Date: Sat, 4 Aug 2018 15:31:12 +0200 Subject: [PATCH] fix les ping telegram --- bots.yaml | 4 ++-- klafirc/bot.py | 2 +- klafirc/settings.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bots.yaml b/bots.yaml index 05275e2..ba0ee5c 100644 --- a/bots.yaml +++ b/bots.yaml @@ -57,6 +57,6 @@ bots: channels: - server: irc.rezometz.org port: 6667 - channel: "#campus" - bots: [sel, Macron, Patou, Claudy, Chuck] + channel: "#test" + bots: [sel] diff --git a/klafirc/bot.py b/klafirc/bot.py index 2802047..39edd99 100644 --- a/klafirc/bot.py +++ b/klafirc/bot.py @@ -70,7 +70,7 @@ class Bot: username = user.split('!')[0] tg_user_match = self.tg_user_match.match(message) if 'bot' in username.lower() and tg_user_match: - username = '@' + tg_user_match.groupdict() + username = '@' + tg_user_match.groupdict()['username'] context = { 'server': self.server, diff --git a/klafirc/settings.py b/klafirc/settings.py index e5beb14..6a353b3 100644 --- a/klafirc/settings.py +++ b/klafirc/settings.py @@ -1,7 +1,7 @@ import logging from logging.handlers import RotatingFileHandler -DEBUG = False +DEBUG = True if not DEBUG: BOT_FILE = '/etc/klafirc/bots.yaml'