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.
This commit is contained in:
Daniel Kessler 2018-01-10 13:33:38 -08:00 committed by GitHub
parent 7909ff2ba8
commit 5988689392
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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