From 3976faa3a7afe355978ff0534c265df5396766d4 Mon Sep 17 00:00:00 2001 From: Kiooeht Date: Mon, 9 May 2011 17:51:34 -0700 Subject: [PATCH] Bug fix: De-op in memos correctly --- CHANGELOG.mkdn | 1 + memos.py | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.mkdn b/CHANGELOG.mkdn index c293bfd..148c231 100644 --- a/CHANGELOG.mkdn +++ b/CHANGELOG.mkdn @@ -29,6 +29,7 @@ CHANGELOG * Quirk order actually works - Kiooeht [evacipatedBox] * Stay in memos on profile switch - Kiooeht [evacipatedBox] * Auto rejoin memos on reconnect - Kiooeht [evacipatedBox] + * De-Op in memos correctly - Kiooeht [evacipatedBox] ### 3.14.1 * Pesterchum 3.14 - illuminatedwax [ghostDunk] diff --git a/memos.py b/memos.py index 247a157..2fff37e 100644 --- a/memos.py +++ b/memos.py @@ -631,7 +631,7 @@ class PesterMemo(PesterConvo): oldnick = l[0] newnick = l[1] h = oldnick - if (update in ["join","left", "kick", "+o"]) \ + if (update in ["join","left", "kick", "+o", "-o"]) \ and channel != self.channel: return chums = self.userlist.findItems(h, QtCore.Qt.MatchFlags(0)) @@ -718,6 +718,14 @@ class PesterMemo(PesterConvo): if unicode(c.text()) == self.mainwindow.profile().handle: self.userlist.optionsMenu.addAction(self.opAction) self.userlist.optionsMenu.addAction(self.banuserAction) + elif update == "-o": + chums = self.userlist.findItems(h, QtCore.Qt.MatchFlags(0)) + for c in chums: + icon = QtGui.QIcon() + c.setIcon(icon) + if unicode(c.text()) == self.mainwindow.profile().handle: + self.userlist.optionsMenu.removeAction(self.opAction) + self.userlist.optionsMenu.removeAction(self.banuserAction) @QtCore.pyqtSlot() def addChumSlot(self):