3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-28 05:29:25 +01:00

IRCS2SProtocol: fix extraneous umode based AWAY messages

This commit is contained in:
James Lu 2017-07-06 22:17:47 -07:00
parent 6636a19a2b
commit fa2c5d928a

View File

@ -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. # 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 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. # 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): def handle_mode(self, source, command, args):
"""Handles mode changes.""" """Handles mode changes."""