aboutsummaryrefslogtreecommitdiffstats
path: root/wee_slack.py
diff options
context:
space:
mode:
authorRyan Huber <rhuber@gmail.com>2015-11-17 10:04:17 -0800
committerRyan Huber <rhuber@gmail.com>2015-11-17 10:04:17 -0800
commitddce59c47ced37a4d68d90bfb147405588b3f488 (patch)
treefccc8be566c8d9011fd0fcc7c4cfe5c3dc6ecb0a /wee_slack.py
parentc6ee4e8f89657571f20e1be5f3ff5b30454b5fcd (diff)
parent27144891f1d9280821c5fa99fe4665c2b9b5b682 (diff)
downloadwee-slack-ddce59c47ced37a4d68d90bfb147405588b3f488.tar.gz
Merge pull request #105 from rawdigits/tfheen/me-action-render
Render _foo bar baz_ as action messages
Diffstat (limited to 'wee_slack.py')
-rw-r--r--wee_slack.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/wee_slack.py b/wee_slack.py
index dd0fb6f..6e1b465 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -1472,6 +1472,11 @@ def process_message(message_json, cache=True):
channel.buffer_prnt(w.prefix("join").rstrip(), text, time)
elif message_json.get("subtype", "") == "channel_topic":
channel.buffer_prnt(w.prefix("network").rstrip(), text, time)
+ elif text.startswith("_") and text.endswith("_"):
+ text = text[1:-1]
+ if name != channel.server.nick:
+ text = name + " " + text
+ channel.buffer_prnt(w.prefix("action").rstrip(), text, time)
else:
channel.buffer_prnt(name, text, time)