From 5c9615cd4cd2ddc3fd0d49f11729733e3e5616b7 Mon Sep 17 00:00:00 2001 From: karxi Date: Mon, 19 Dec 2016 20:23:45 -0500 Subject: [PATCH] Fixed some bugs pertaining to bot detection. Later, this should be unified (when the class structure is readjusted) or at least turned into a proper mix-in. --- convo.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/convo.py b/convo.py index a87458e..15255ff 100644 --- a/convo.py +++ b/convo.py @@ -406,7 +406,7 @@ class PesterText(QtGui.QTextEdit): window.chatlog.log(parent.chum.handle, lexmsg) else: if ((window.idler.auto or window.idler.manual) and parent.chumopen - and not parent.isBot(handle)): + and not parent.isBot(chum.handle)): idlethreshhold = 60 if (not hasattr(self, 'lastmsg')) or \ datetime.now() - self.lastmsg > timedelta(0,idlethreshhold): @@ -425,8 +425,7 @@ class PesterText(QtGui.QTextEdit): self.parent().clearNewMessage() QtGui.QTextEdit.focusInEvent(self, event) - @staticmethod - def isBot(*args, **kwargs): + def isBot(self, *args, **kwargs): return self.parent().isBot(*args, **kwargs) def keyPressEvent(self, event): @@ -668,6 +667,9 @@ class PesterConvo(QtGui.QFrame): self.textArea.append(convertTags(msg)) self.mainwindow.chatlog.log(self.title(), msg) + def isBot(self, *args, **kwargs): + return self.parent().isBot(*args, **kwargs) + def updateMood(self, mood, unblocked=False, old=None): syscolor = QtGui.QColor(self.mainwindow.theme["convo/systemMsgColor"]) #~ if mood.name() == "offline" and self.chumopen == True and not unblocked: