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 5325373a..74203a36 100644
--- a/src/room.py
+++ b/src/room.py
@@ -90,7 +90,7 @@ class Room(TextBuffer):
"""
self.color_state = color
- def add_message(self, txt, time=None, nickname=None, colorized=False):
+ def add_message(self, txt, time=None, nickname=None, colorized=False, forced_user=None):
"""
Note that user can be None even if nickname is not None. It happens
when we receive an history message said by someone who is not
@@ -103,6 +103,8 @@ class Room(TextBuffer):
user = self.get_user_by_name(nickname) if nickname is not None else None
if user:
user.set_last_talked(datetime.now())
+ if not user and forced_user:
+ user = forced_user
color = theme.COLOR_NORMAL_TEXT
if not time and nickname and\
nickname != self.own_nick and\