diff options
Diffstat (limited to 'src/window.py')
-rw-r--r-- | src/window.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/window.py b/src/window.py index 19fcc63b..7e2686be 100644 --- a/src/window.py +++ b/src/window.py @@ -70,11 +70,19 @@ class UserList(Win): def refresh(self, users): def compare_user(a, b): - if self.color_role[a.role] == self.color_role[b.role]: + try: + arole = self.color_role[a.role] + except KeyError: + arole = 1 + try: + brole = self.color_role[b.role] + except KeyError: + brole = 1 + if arole == brole: if a.nick.lower() < b.nick.lower(): return -1 return 1 - return self.color_role[a.role] - self.color_role[b.role] + return arole - brole if not self.visible: return self.win.erase() |