From 6b4b32ffc565eb82e48eb5564f1f336eecaef4dc Mon Sep 17 00:00:00 2001 From: "louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13" Date: Mon, 9 Aug 2010 00:23:59 +0000 Subject: Print a line separator to indicate the new messages. fixed #1487 --- src/room.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/room.py') diff --git a/src/room.py b/src/room.py index 4e341cbe..28e29b76 100644 --- a/src/room.py +++ b/src/room.py @@ -117,6 +117,20 @@ class Room(object): time = time if time is not None else datetime.now() self.messages.append(Message(txt, time, nickname, user, color)) + def remove_line_separator(self): + """ + Remove the line separator + """ + if None in self.messages: + self.messages.remove(None) + + def add_line_separator(self): + """ + add a line separator at the end of messages list + """ + if None not in self.messages: + self.messages.append(None) + def get_user_by_name(self, nick): for user in self.users: if user.nick == nick.encode('utf-8'): -- cgit v1.2.3