Skip to content
Snippets Groups Projects
Commit ebc48d7a authored by dario's avatar dario
Browse files

notify.py: attempt to wait through server welcome message

parent dde4d085
No related branches found
No related tags found
No related merge requests found
......@@ -62,6 +62,13 @@ class IINotification(BaseNotification):
while not os.path.exists(cmd_in):
time.sleep(0.01)
## the server wants to send us stuff, and usually says "end of MOTD" at the end
cmd_out = os.path.join(self.dir, self.ircsrv, "out")
with open(cmd_out, "r") as f:
for line in f.readlines():
if line.find("MOTD") != -1:
break
with open(cmd_in, "a") as c:
c.write("/j " + self.chan + "\n")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment