M guardian/conf.py => guardian/conf.py +2 -1
@@ 12,7 12,8 @@ except Exception:
pass # config.read("guardian/config/conf.cfg.sample")
-IRC_CHANNEL = config.get("irc", "channel", fallback="irc://irc.libera.chat/#testGuardian")
+IRC_CHANNEL = config.get(
+ "irc", "channel", fallback="")
IRKER_HOST = config.get("irc", "host", fallback="localhost")
IRKER_PORT = int(config.get("irc", "port", fallback=6659))
M guardian/notification.py => guardian/notification.py +2 -0
@@ 11,6 11,8 @@ from guardian import conf
def irker(message):
"""Send a JSON formatted message to an instance of irker."""
+ if not conf.IRC_CHANNEL:
+ raise "No IRC channel defined."
data = {"to": conf.IRC_CHANNEL, "privmsg": message}
try:
s = socket.create_connection((conf.IRKER_HOST, conf.IRKER_PORT))