mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-01 01:09:22 +01:00
services_support: check service bot state, not is_internal_client before dynamically parting channels
If a channel still has e.g. relay users when the last local user leaves the channel, the services bots should stay put.
This commit is contained in:
parent
d46c494351
commit
c44aa64503
@ -143,7 +143,7 @@ def _services_dynamic_part(irc, channel):
|
||||
return
|
||||
|
||||
# If all remaining users in the channel are service bots, make them all part.
|
||||
if all(irc.is_internal_client(u) for u in irc.channels[channel].users):
|
||||
if all(irc.get_service_bot(u) for u in irc.channels[channel].users):
|
||||
for u in irc.channels[channel].users.copy():
|
||||
sbot = irc.get_service_bot(u)
|
||||
if sbot:
|
||||
|
Loading…
Reference in New Issue
Block a user