mirror of
https://github.com/jlu5/PyLink.git
synced 2024-12-25 12:12:53 +01:00
clientbot: don't send duplicate away statuses
This commit is contained in:
parent
f54382534c
commit
451db74f0c
@ -777,11 +777,14 @@ class ClientbotWrapperProtocol(IRCCommonProtocol):
|
|||||||
# The rest are prefix modes. Multiple can be given by the IRCd if multiple are set
|
# The rest are prefix modes. Multiple can be given by the IRCd if multiple are set
|
||||||
log.debug('(%s) handle_352: status string on user %s: %s', self.name, nick, status)
|
log.debug('(%s) handle_352: status string on user %s: %s', self.name, nick, status)
|
||||||
if status[0] == 'G':
|
if status[0] == 'G':
|
||||||
|
if not self.users[uid].away:
|
||||||
|
# Only set away status if not previously set
|
||||||
log.debug('(%s) handle_352: calling away() with argument', self.name)
|
log.debug('(%s) handle_352: calling away() with argument', self.name)
|
||||||
self.away(uid, 'Away')
|
self.away(uid, 'Away')
|
||||||
elif status[0] == 'H':
|
elif status[0] == 'H':
|
||||||
|
if self.users[uid].away:
|
||||||
log.debug('(%s) handle_352: calling away() without argument', self.name)
|
log.debug('(%s) handle_352: calling away() without argument', self.name)
|
||||||
self.away(uid, '') # Unmark away status
|
self.away(uid, '') # Unmark away status, but only if /away was previously set
|
||||||
else:
|
else:
|
||||||
log.warning('(%s) handle_352: got wrong string %s for away status', self.name, status[0])
|
log.warning('(%s) handle_352: got wrong string %s for away status', self.name, status[0])
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user