summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core.py1
-rw-r--r--src/plugin_manager.py7
2 files changed, 8 insertions, 0 deletions
diff --git a/src/core.py b/src/core.py
index 8dd1b739..a37788e7 100644
--- a/src/core.py
+++ b/src/core.py
@@ -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()
diff --git a/src/plugin_manager.py b/src/plugin_manager.py
index afd04330..693a90c6 100644
--- a/src/plugin_manager.py
+++ b/src/plugin_manager.py
@@ -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.