From 5e1da09901a9cde6808054fc3f0266e74e71133b Mon Sep 17 00:00:00 2001 From: James Lu Date: Fri, 8 Feb 2019 15:10:21 -0800 Subject: [PATCH] control: don't remove network objects with virtual_parent on rehash --- coremods/control.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/coremods/control.py b/coremods/control.py index 0805f47..2040603 100644 --- a/coremods/control.py +++ b/coremods/control.py @@ -108,6 +108,10 @@ def rehash(): for network, ircobj in world.networkobjects.copy().items(): # Server was removed from the config file, disconnect them. 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']: log.debug('rehash: removing connection to %r (removed from config).', network) remove_network(ircobj)