summaryrefslogtreecommitdiff
path: root/src/text_buffer.py
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2011-11-25 11:21:20 +0100
committerFlorent Le Coz <louiz@louiz.org>2011-11-25 11:42:50 +0100
commitbb22b39d559a2faa7817d579115a3f76b6a0ea30 (patch)
tree372f151b5cd5257ea1b71798a13976f44a746d34 /src/text_buffer.py
parent72c634aaeaaa83e05e159f68191f1f6e4e929c61 (diff)
downloadpoezio-bb22b39d559a2faa7817d579115a3f76b6a0ea30.tar.gz
poezio-bb22b39d559a2faa7817d579115a3f76b6a0ea30.tar.bz2
poezio-bb22b39d559a2faa7817d579115a3f76b6a0ea30.tar.xz
poezio-bb22b39d559a2faa7817d579115a3f76b6a0ea30.zip
/me now works in all chatabs
fixes #2302
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"),\