From 1ef4791a1d2aed33c7b7004e5c8e5385ac6d3ce9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juhani=20Krekel=C3=A4?= Date: Wed, 20 Jan 2021 20:04:09 +0200 Subject: [PATCH] Implement support for startcmd.txt --- botcmd.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/botcmd.py b/botcmd.py index b8d89e2..27c7f97 100644 --- a/botcmd.py +++ b/botcmd.py @@ -13,7 +13,10 @@ def initialize(*, config): # Blocks the bot until it's done, including PING/PONG handling # irc is the IRC API object def on_connect(*, irc): - pass + with open('startcmd.txt', 'r'): + for i in f: + while i[-1:] == '\n': i = i[:-1] + irc.send_raw(i.encode()) # on_quit(*, irc) # Called just before IRC bot sends QUIT