From 2f4759b0e43478a5da99cf8338c755c2df9dbd28 Mon Sep 17 00:00:00 2001 From: BuildTools Date: Tue, 23 Feb 2021 16:21:57 +0100 Subject: [PATCH] Commented out isOn() and reverted chumroll change. It causes the client to fail to send out GETMOOD at launch. --- irc.py | 60 ++++++++++++++++++++++++++++++++-------------------------- 1 file changed, 33 insertions(+), 27 deletions(-) diff --git a/irc.py b/irc.py index 2c15c9c..09ced40 100644 --- a/irc.py +++ b/irc.py @@ -501,16 +501,16 @@ class PesterHandler(DefaultCommandHandler): if channel not in self.channelnames: self.channelnames[channel] = [] self.channelnames[channel].extend(namelist) - def ison(self, server, nick, nicks): - nicklist = nicks.split(" ") - getglub = "GETMOOD " - logging.info("---> recv \"ISON :%s\"" % nicks) - for nick_it in nicklist: - self.parent.moodUpdated.emit(nick_it, Mood(0)) - if nick_it in self.parent.mainwindow.namesdb["#pesterchum"]: - getglub += nick_it - if getglub != "GETMOOD ": - helpers.msg(self.client, "#pesterchum", getglub) + #def ison(self, server, nick, nicks): + # nicklist = nicks.split(" ") + # getglub = "GETMOOD " + # logging.info("---> recv \"ISON :%s\"" % nicks) + # for nick_it in nicklist: + # self.parent.moodUpdated.emit(nick_it, Mood(0)) + # if nick_it in self.parent.mainwindow.namesdb["#pesterchum"]: + # getglub += nick_it + # if getglub != "GETMOOD ": + # helpers.msg(self.client, "#pesterchum", getglub) def endofnames(self, server, nick, channel, msg): namelist = self.channelnames[channel] @@ -521,7 +521,13 @@ class PesterHandler(DefaultCommandHandler): self.joined = True self.parent.mainwindow.randhandler.setRunning(self.parent.mainwindow.randhandler.randNick in namelist) chums = self.mainwindow.chumList.chums - self.isOn(*chums) + #self.isOn(*chums) + lesschums = [] + for c in chums: + chandle = c.handle + if chandle in namelist: + lesschums.append(c) + self.getMood(*lesschums) def liststart(self, server, handle, *info): self.channel_list = [] @@ -575,19 +581,19 @@ class PesterHandler(DefaultCommandHandler): except socket.error: self.parent.setConnectionBroken() - def isOn(self, *chums): - isonNicks = "" - for c in chums: - chandle = c.handle - if len(chandle) >= 200: - try: - self.client.send("ISON", ":%s" % (isonNicks)) - except socket.error: - self.parent.setConnectionBroken() - isonNicks = "" - isonNicks += " " + chandle - if isonNicks != "": - try: - self.client.send("ISON", ":%s" % (isonNicks)) - except socket.error: - self.parent.setConnectionBroken() + #def isOn(self, *chums): + # isonNicks = "" + # for c in chums: + # chandle = c.handle + # if len(chandle) >= 200: + # try: + # self.client.send("ISON", ":%s" % (isonNicks)) + # except socket.error: + # self.parent.setConnectionBroken() + # isonNicks = "" + # isonNicks += " " + chandle + # if isonNicks != "": + # try: + # self.client.send("ISON", ":%s" % (isonNicks)) + # except socket.error: + # self.parent.setConnectionBroken()