summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/tabs.py7
-rw-r--r--src/text_buffer.py3
2 files changed, 3 insertions, 7 deletions
diff --git a/src/tabs.py b/src/tabs.py
index 3f40ad12..c97f8a9f 100644
--- a/src/tabs.py
+++ b/src/tabs.py
@@ -1298,10 +1298,6 @@ class MucTab(ChatTab):
in the room anymore
"""
self.log_message(txt, time, nickname)
- special_message = False
- if txt.startswith('/me '):
- txt = "\x192}* \x195}" + nickname + ' ' + txt[4:]
- 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())
@@ -1319,9 +1315,6 @@ class MucTab(ChatTab):
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()
self._text_buffer.add_message(txt, time, nickname, nick_color, history, user)
diff --git a/src/text_buffer.py b/src/text_buffer.py
index 94bd94b9..9cf5e0d5 100644
--- a/src/text_buffer.py
+++ b/src/text_buffer.py
@@ -36,6 +36,9 @@ class TextBuffer(object):
def add_message(self, txt, time=None, nickname=None, nick_color=None, history=None, user=None):
time = time or datetime.now()
+ if txt.startswith('/me '):
+ txt = "\x192}* \x195}" + nickname + ' ' + txt[4:]
+ nickname = None
msg = Message(txt='%s\x19o'%(txt.replace('\t', ' '),), nick_color=nick_color,
time=time, str_time=time.strftime("%Y-%m-%d %H:%M:%S")\
if history else time.strftime("%H:%M:%S"),\