From fa2c5d928a520a49a84c07e5ddd4b85eccb0cdff Mon Sep 17 00:00:00 2001 From: James Lu Date: Thu, 6 Jul 2017 22:17:47 -0700 Subject: [PATCH] IRCS2SProtocol: fix extraneous umode based AWAY messages --- protocols/ircs2s_common.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/protocols/ircs2s_common.py b/protocols/ircs2s_common.py index 773e9e9..680d112 100644 --- a/protocols/ircs2s_common.py +++ b/protocols/ircs2s_common.py @@ -567,9 +567,9 @@ class IRCS2SProtocol(IRCCommonProtocol): # Check whether the user is marked away, and send a hook update only if the status has changed. away_status = (awaymode, None) in u.modes - if away_status != old_away_status: + if away_status != bool(old_away_status): # This sets a dummy away reason of "Away" because no actual text is provided. - self.call_hooks([uid, 'AWAY', {'text': 'Away'}]) + self.call_hooks([uid, 'AWAY', {'text': 'Away' if away_status else ''}]) def handle_mode(self, source, command, args): """Handles mode changes."""