summaryrefslogtreecommitdiff
path: root/src/room.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/room.py')
-rw-r--r--src/room.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/room.py b/src/room.py
index 7719dd67..1ca3f599 100644
--- a/src/room.py
+++ b/src/room.py
@@ -120,7 +120,9 @@ class Room(TextBuffer):
nick_color = highlight
time = time or datetime.now()
message = Message(txt='%s\x19o'%(txt,), nick_color=nick_color,
- time=time, nickname=nickname, user=user)
+ time=time, str_time=time.strftime("%Y-%m-%d %H:%M:%S")\
+ if history else time.strftime("%H:%M:%S"),\
+ nickname=nickname, user=user)
while len(self.messages) > self.messages_nb_limit:
self.messages.pop(0)
self.messages.append(message)