diff --git a/notify.py b/notify.py index 6a0d9bbe9b62a13a6a81afe4491d00912ce9b278..381949fa53c942ab248444b33c1690854dfb2935 100644 --- a/notify.py +++ b/notify.py @@ -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")