mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-27 21:19:31 +01:00
IRCS2SProtocol: fix extraneous umode based AWAY messages
This commit is contained in:
parent
6636a19a2b
commit
fa2c5d928a
@ -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."""
|
||||||
|
Loading…
Reference in New Issue
Block a user