aboutsummaryrefslogtreecommitdiffstats
path: root/wee_slack.py
diff options
context:
space:
mode:
authorRyan Huber <rhuber@gmail.com>2016-11-22 15:09:16 -0800
committerGitHub <noreply@github.com>2016-11-22 15:09:16 -0800
commitf1cb8051a5c021d895954efea46de8fca1ace904 (patch)
tree8739fb9e3746fdc57d4bee28a0e5ca6d58aa51c9 /wee_slack.py
parentc908124654b151f6c847648d4f928ecf2ceef525 (diff)
parentc6c3b5f1a927f8bb6055af42c942c27253879d87 (diff)
downloadwee-slack-f1cb8051a5c021d895954efea46de8fca1ace904.tar.gz
Merge pull request #282 from rawdigits/update_hashtable_on_close
Update hashtable on buffer open
Diffstat (limited to 'wee_slack.py')
-rw-r--r--wee_slack.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/wee_slack.py b/wee_slack.py
index d36dc4b..1357b00 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -886,7 +886,7 @@ class User(object):
try:
if compare_str == self.name or compare_str == self.identifier:
return True
- elif compare_str[0] == '@' and compare_str[1:] == self.name:
+ elif compare_str[0] == '@' and compare_str[1:] == self.name:
return True
else:
return False
@@ -2100,6 +2100,11 @@ def buffer_closing_cb(signal, sig_type, data):
return w.WEECHAT_RC_OK
+def buffer_opened_cb(signal, sig_type, data):
+ channels.update_hashtable()
+ return w.WEECHAT_RC_OK
+
+
def buffer_switch_cb(signal, sig_type, data):
global previous_buffer, hotlist
# this is to see if we need to gray out things in the buffer list
@@ -2503,6 +2508,7 @@ if __name__ == "__main__":
w.hook_timer(1000 * 60 * 29, 0, 0, "slack_never_away_cb", "")
w.hook_timer(1000 * 60 * 5, 0, 0, "cache_write_cb", "")
w.hook_signal('buffer_closing', "buffer_closing_cb", "")
+ w.hook_signal('buffer_opened', "buffer_opened_cb", "")
w.hook_signal('buffer_switch', "buffer_switch_cb", "")
w.hook_signal('window_switch', "buffer_switch_cb", "")
w.hook_signal('input_text_changed', "typing_notification_cb", "")