Well, you found me. Congratulations. Was it worth it?
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

25 lines
624 B

#!/usr/bin/env python3
import logging, re
from bot import Bot
LOG_FORMAT = "%(asctime)s [%(levelname)s] <%(filename)s> %(funcName)s: %(message)s"
logging.basicConfig(format=LOG_FORMAT, level=logging.DEBUG)
glados = Bot(
('irc.planet-casio.com', 6697),
('127.0.0.1', 5555),
["#general", "#glados"]
)
@glados.irc.on(lambda m: re.match("bonjour glados", m.text, re.IGNORECASE))
def say_hello(msg):
glados.irc.send(msg.to, f"Heureuse de vous revoir, {msg.author}")
@glados.v5.on(lambda c, m: True)
def announce(channels, message):
for c in channels:
glados.irc.send(c, message)
glados.start()