Bug fix: Keep OP/Voice correct when someone changes nick

This commit is contained in:
Kiooeht 2011-06-02 10:02:24 -07:00
parent fad80398e8
commit eee4f1d065
2 changed files with 14 additions and 1 deletions

View file

@ -21,7 +21,8 @@ Bugs
* When using mood sort, scroll position jumps to last selected chum
* When switching chumhandles, OP doesn't appear to retain OP status (though they do)
* When left for a really long time, animations slow down pesterchum
* Openning resets appearance of OP/voice for anyone that become OP/voice after you joined a memo
* Openning userlist resets appearance of OP/voice for anyone that become OP/voice after you joined a memo
* No sign of error if regexp quirk is malformed (not enough captured groups, etc)
Mac Bugs
--------

View file

@ -765,6 +765,18 @@ class PesterMemo(PesterConvo):
self.times[h].removeTime(t.getTime())
if update == "nick":
self.addUser(newnick)
newchums = self.userlist.findItems(newnick, QtCore.Qt.MatchFlags(0))
for nc in newchums:
for c in chums:
if c.op:
nc.op = True
icon = PesterIcon(self.mainwindow.theme["memos/op/icon"])
nc.setIcon(icon)
if c.voice:
nc.voice = True
icon = PesterIcon(self.mainwindow.theme["memos/voice/icon"])
nc.setIcon(icon)
self.sortUsers()
elif update == "kick":
if len(chums) == 0:
return