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

control: don't remove network objects with virtual_parent on rehash

This commit is contained in:
James Lu 2019-02-08 15:10:21 -08:00
parent 6e7c58ee36
commit 5e1da09901

View File

@ -108,6 +108,10 @@ def rehash():
for network, ircobj in world.networkobjects.copy().items(): for network, ircobj in world.networkobjects.copy().items():
# Server was removed from the config file, disconnect them. # Server was removed from the config file, disconnect them.
log.debug('rehash: checking if %r is in new conf still.', network) log.debug('rehash: checking if %r is in new conf still.', network)
if hasattr(ircobj, 'virtual_parent'):
log.debug('rehash: not removing network object %r since it has a virtual parent.', network)
continue
if network not in new_conf['servers']: if network not in new_conf['servers']:
log.debug('rehash: removing connection to %r (removed from config).', network) log.debug('rehash: removing connection to %r (removed from config).', network)
remove_network(ircobj) remove_network(ircobj)