aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2019-08-24 18:01:16 +0200
committerTrygve Aaberge <trygveaa@gmail.com>2019-08-25 19:42:06 +0200
commit5e43f251b45ece5548cb5a4f141397787297533b (patch)
tree223f0ee2c84e51af778ade2a20db9083ae2f2246
parent560a22cf71aa29fbf175510cd0bc0595e4ce568a (diff)
downloadwee-slack-5e43f251b45ece5548cb5a4f141397787297533b.tar.gz
Print error in /part command when channel is not found
-rw-r--r--wee_slack.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/wee_slack.py b/wee_slack.py
index 9a17016..2024824 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -3537,6 +3537,8 @@ def part_command_cb(data, current_buffer, args):
if channel in cmap:
buffer_ptr = team.channels[cmap[channel]].channel_buffer
e.weechat_controller.unregister_buffer(buffer_ptr, update_remote=True, close_buffer=True)
+ else:
+ w.prnt(team.channel_buffer, "{}: No such channel".format(channel))
else:
e.weechat_controller.unregister_buffer(current_buffer, update_remote=True, close_buffer=True)
return w.WEECHAT_RC_OK_EAT