Commit eb2e5825 authored by mathieui's avatar mathieui

Disable plugins on exit

parent f0fb3d5d
......@@ -2230,6 +2230,7 @@ class Core(object):
msg = arg
else:
msg = None
self.plugin_manager.disable_plugins()
self.disconnect(msg)
self.running = False
self.reset_curses()
......
......@@ -67,6 +67,13 @@ class PluginManager(object):
self.roster_elements = {}
self.plugin_api = PluginAPI(core, self)
def disable_plugins(self):
for plugin in set(self.plugins.keys()):
try:
self.unload(plugin)
except:
pass
def load(self, name, notify=True):
"""
Load a 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