aboutsummaryrefslogtreecommitdiffstats
path: root/wee_slack.py
diff options
context:
space:
mode:
authorTollef Fog Heen <tfheen@err.no>2015-07-21 17:03:35 +0200
committerTollef Fog Heen <tfheen@err.no>2015-07-21 17:03:35 +0200
commit86a8db90da64c6c3746f14692d52cab41c101bdd (patch)
tree3a2bd2fb5d208013bddaa35b84f61a3012919b8a /wee_slack.py
parent0de554a8981450b0fa4ff9efbddd7d1c7262ae89 (diff)
downloadwee-slack-86a8db90da64c6c3746f14692d52cab41c101bdd.tar.gz
Ignore non-slack channels for nick_completion_cb too
Failing to ignore this leads to harmless, but annoying tracebacks when completing nicks in non-Slack channels.
Diffstat (limited to 'wee_slack.py')
-rw-r--r--wee_slack.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/wee_slack.py b/wee_slack.py
index 7e06768..10db281 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -1501,6 +1501,8 @@ def nick_completion_cb(data, completion_item, buffer, completion):
"""
channel = channels.find(buffer)
+ if channel is None or channel.members is None:
+ return w.WEECHAT_RC_OK
for m in channel.members:
user = channel.server.users.find(m)
w.hook_completion_list_add(completion, "@" + user.name, 1, w.WEECHAT_LIST_POS_SORT)