Implement support for startcmd.txt

This commit is contained in:
Juhani Krekelä 2021-01-20 20:04:09 +02:00
parent 86b0d4e337
commit 1ef4791a1d
1 changed files with 4 additions and 1 deletions

View File

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