Commit fdfb0864 authored by Philipp Hörist's avatar Philipp Hörist

PluginManager: Remove obsolete check on handler registration

parent fbd65d79
Pipeline #5647 passed with stages
in 2 minutes and 31 seconds
......@@ -57,7 +57,6 @@ class Client(ConnectionHandlers):
self.password = None
self._priority = 0
self.handlers_registered = False
self._connect_machine_calls = 0
self.avatar_conversion = False
self.addressing_supported = False
......@@ -175,7 +174,6 @@ class Client(ConnectionHandlers):
for handler in modules.get_handlers(self):
self._client.register_handler(handler)
self.handlers_registered = True
def process_ssl_errors(self):
if not self._ssl_errors:
......
......@@ -406,13 +406,8 @@ class PluginManager(metaclass=Singleton):
instance, name = module.get_instance(con)
modules.register_single_module(con, instance, name)
# If handlers have been registered, register the
# plugin handlers. Otherwise this will be done
# automatically on connecting
# in connection_handlers._register_handlers()
if con.handlers_registered:
for handler in instance.handlers:
con.connection.register_handler(handler)
for handler in instance.handlers:
con.connection.register_handler(handler)
def _unregister_modules_with_handlers(self, plugin):
if not hasattr(plugin, 'modules'):
......@@ -422,11 +417,8 @@ class PluginManager(metaclass=Singleton):
instance = con.get_module(module.name)
modules.unregister_single_module(con, module.name)
# Account is still connected and handlers are registered
# So just unregister the plugin handlers
if con.handlers_registered:
for handler in instance.handlers:
con.connection.unregister_handler(handler)
for handler in instance.handlers:
con.connection.unregister_handler(handler)
def activate_plugin(self, plugin):
'''
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment