summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2011-09-15 00:15:05 +0200
committermathieui <mathieui@mathieui.net>2011-09-15 00:15:05 +0200
commita3959bd12c2324f6e80e75e6f684cae65adaec5e (patch)
tree3a7996cb13750270c70375e8efabe55d2116661c
parentc332732d139eef10d2fe463e0ba2ce4c4e986ce7 (diff)
downloadpoezio-a3959bd12c2324f6e80e75e6f684cae65adaec5e.tar.gz
poezio-a3959bd12c2324f6e80e75e6f684cae65adaec5e.tar.bz2
poezio-a3959bd12c2324f6e80e75e6f684cae65adaec5e.tar.xz
poezio-a3959bd12c2324f6e80e75e6f684cae65adaec5e.zip
Fixes #2244
-rw-r--r--src/room.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/room.py b/src/room.py
index 58b96adb..83b00e62 100644
--- a/src/room.py
+++ b/src/room.py
@@ -99,9 +99,10 @@ class Room(TextBuffer):
in the room anymore
"""
self.log_message(txt, time, nickname)
+ special_message = False
if txt.startswith('/me '):
txt = "\x192* \x195" + nickname + ' ' + txt[4:]
- nickname = None
+ special_message = True
user = self.get_user_by_name(nickname) if nickname is not None else None
if user:
user.set_last_talked(datetime.now())
@@ -119,6 +120,9 @@ class Room(TextBuffer):
highlight = self.do_highlight(txt, time, nickname)
if highlight:
nick_color = highlight
+ if special_message:
+ txt = '\x195%s' % (txt,)
+ nickname = None
time = time or datetime.now()
message = Message(txt='%s\x19o'%(txt.replace('\t', ' '),), nick_color=nick_color,
time=time, str_time=time.strftime("%Y-%m-%d %H:%M:%S")\