diff options
author | Ryan Huber <rhuber@gmail.com> | 2015-11-17 10:04:17 -0800 |
---|---|---|
committer | Ryan Huber <rhuber@gmail.com> | 2015-11-17 10:04:17 -0800 |
commit | ddce59c47ced37a4d68d90bfb147405588b3f488 (patch) | |
tree | fccc8be566c8d9011fd0fcc7c4cfe5c3dc6ecb0a | |
parent | c6ee4e8f89657571f20e1be5f3ff5b30454b5fcd (diff) | |
parent | 27144891f1d9280821c5fa99fe4665c2b9b5b682 (diff) | |
download | wee-slack-ddce59c47ced37a4d68d90bfb147405588b3f488.tar.gz |
Merge pull request #105 from rawdigits/tfheen/me-action-render
Render _foo bar baz_ as action messages
-rw-r--r-- | wee_slack.py | 5 |
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) |