From 598868939271a6b79be8edfc2e64740785c1b8b7 Mon Sep 17 00:00:00 2001 From: Daniel Kessler Date: Wed, 10 Jan 2018 13:33:38 -0800 Subject: [PATCH] Use string when comparing with info_get Currently the "detached" setting for `notify_when` does not detect attached relays, since it compares 0 to '0'. This PR fixes that by using string equality. --- pushjet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pushjet.py b/pushjet.py index ce87c17..0f050f6 100644 --- a/pushjet.py +++ b/pushjet.py @@ -137,7 +137,7 @@ def should_send(buffer, tags, nick, highlighted): elif notify_when == 'detached': # user has opted to only be notified when detached (relays) num_relays = weechat.info_get('relay_client_count', 'connected') - if num_relays != 0: + if num_relays != '0': # some relay(s) connected, bail return False