diff options
author | louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13> | 2010-01-21 04:41:54 +0000 |
---|---|---|
committer | louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13> | 2010-01-21 04:41:54 +0000 |
commit | ef75b9f70c7548562979fb5d02e2d328cf9d3db9 (patch) | |
tree | bd1eebe7bdad46bbfd8472a2975754f26bdc890e | |
parent | f36fefdce5d9369516a7d88528902b5081080876 (diff) | |
download | poezio-ef75b9f70c7548562979fb5d02e2d328cf9d3db9.tar.gz poezio-ef75b9f70c7548562979fb5d02e2d328cf9d3db9.tar.bz2 poezio-ef75b9f70c7548562979fb5d02e2d328cf9d3db9.tar.xz poezio-ef75b9f70c7548562979fb5d02e2d328cf9d3db9.zip |
couleurs en fonction du role des gens dans les salons
-rw-r--r-- | src/gui.py | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -47,7 +47,7 @@ class User(object): self.role = role def change_nick(self, nick): - self.nick = nick + self.nick = nick.encode('utf-8') class Room(object): """ @@ -61,7 +61,7 @@ class Room(object): self.topic = '' def add_message(self, nick, msg): - self.lines.append((datetime.now(), nick, msg.encode('utf-8'))) + self.lines.append((datetime.now(), nick.encode('utf-8'), msg.encode('utf-8'))) def add_info(self, info): """ info, like join/quit/status messages""" @@ -131,6 +131,9 @@ class Gui(object): curses.noecho() curses.init_pair(1, curses.COLOR_WHITE, curses.COLOR_BLUE) curses.init_pair(2, curses.COLOR_BLUE, curses.COLOR_BLACK) + curses.init_pair(3, curses.COLOR_RED, curses.COLOR_BLACK) # Admin + curses.init_pair(4, curses.COLOR_BLUE, curses.COLOR_BLACK) # Participant + curses.init_pair(5, curses.COLOR_WHITE, curses.COLOR_BLACK) # Visitor def on_connected(self): pass |