diff options
author | Ryan Huber <rhuber@gmail.com> | 2015-02-21 12:45:53 -0800 |
---|---|---|
committer | Ryan Huber <rhuber@gmail.com> | 2015-02-21 12:45:53 -0800 |
commit | 8f82ddd3f429019c32456b7cfb69fd5a264b7e25 (patch) | |
tree | e4fdd09748ab15329063e4c7d25fbff258eb4825 | |
parent | 640bc574e175131b12aba580688929f9727b7050 (diff) | |
download | wee-slack-8f82ddd3f429019c32456b7cfb69fd5a264b7e25.tar.gz |
don't print username in /me and do italics like official clients
-rw-r--r-- | wee_slack.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/wee_slack.py b/wee_slack.py index 9cf3e2f..f61caf7 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -701,7 +701,7 @@ def me_command_cb(data, current_buffer, args): if channels.find(current_buffer): channel = channels.find(current_buffer) nick = channel.server.nick - message = "{} {}".format(nick, args) + message = "_{}_".format(args) message = message.encode('utf-8') buffer_input_cb("", current_buffer, message) return w.WEECHAT_RC_OK @@ -1593,8 +1593,8 @@ if __name__ == "__main__": '|'.join(cmds.keys()), # Function name 'slack_command_cb', '') - w.hook_command('me', '', 'stuff', 'stuff2', '', 'me_command_cb', '') # w.hook_command('me', 'me_command_cb', '') + w.hook_command('me', '', 'stuff', 'stuff2', '', 'me_command_cb', '') w.hook_command_run('/query', 'join_command_cb', '') w.hook_command_run('/join', 'join_command_cb', '') w.hook_command_run('/part', 'part_command_cb', '') |