Browse Source

fix les ping telegram

merge-requests/1/head
Klafyvel 8 years ago
parent
commit
19512c86ec
  1. 4
      bots.yaml
  2. 2
      klafirc/bot.py
  3. 2
      klafirc/settings.py

4
bots.yaml

@ -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]

2
klafirc/bot.py

@ -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,

2
klafirc/settings.py

@ -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'

Loading…
Cancel
Save