summaryrefslogtreecommitdiff
path: root/src/text_buffer.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/text_buffer.py')
-rw-r--r--src/text_buffer.py3
1 files changed, 3 insertions, 0 deletions
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"),\