fix les ping telegram

This commit is contained in:
Klafyvel 2018-08-04 15:31:12 +02:00
parent 14acf07925
commit 19512c86ec
3 changed files with 4 additions and 4 deletions

View file

@ -57,6 +57,6 @@ bots:
channels: channels:
- server: irc.rezometz.org - server: irc.rezometz.org
port: 6667 port: 6667
channel: "#campus" channel: "#test"
bots: [sel, Macron, Patou, Claudy, Chuck] bots: [sel]

View file

@ -70,7 +70,7 @@ class Bot:
username = user.split('!')[0] username = user.split('!')[0]
tg_user_match = self.tg_user_match.match(message) tg_user_match = self.tg_user_match.match(message)
if 'bot' in username.lower() and tg_user_match: if 'bot' in username.lower() and tg_user_match:
username = '@' + tg_user_match.groupdict() username = '@' + tg_user_match.groupdict()['username']
context = { context = {
'server': self.server, 'server': self.server,

View file

@ -1,7 +1,7 @@
import logging import logging
from logging.handlers import RotatingFileHandler from logging.handlers import RotatingFileHandler
DEBUG = False DEBUG = True
if not DEBUG: if not DEBUG:
BOT_FILE = '/etc/klafirc/bots.yaml' BOT_FILE = '/etc/klafirc/bots.yaml'