summaryrefslogtreecommitdiff
path: root/src/core.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2012-07-03 13:44:15 +0200
committermathieui <mathieui@mathieui.net>2012-07-03 13:44:15 +0200
commit77e3f8893c39c10a0465780fb3046ce57c55f141 (patch)
tree0f7ed281a85afb0b50fa2e7d71c0cc2664dc7e4d /src/core.py
parent975e0d96b29ddf9c020519da6faec3f83add6e73 (diff)
downloadpoezio-77e3f8893c39c10a0465780fb3046ce57c55f141.tar.gz
poezio-77e3f8893c39c10a0465780fb3046ce57c55f141.tar.bz2
poezio-77e3f8893c39c10a0465780fb3046ce57c55f141.tar.xz
poezio-77e3f8893c39c10a0465780fb3046ce57c55f141.zip
Do not reload plugins on reconnection
If the plugins_autoload list was not empty, it caused the plugins to be reloaded upon each reconnection (with /connect or not). Now it does not.
Diffstat (limited to 'src/core.py')
-rw-r--r--src/core.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core.py b/src/core.py
index 6a0bff13..d272fe82 100644
--- a/src/core.py
+++ b/src/core.py
@@ -133,6 +133,7 @@ class Core(object):
self.own_nick = config.get('default_nick', '') or self.xmpp.boundjid.user
+ self.plugins_autoloaded = False
self.plugin_manager = PluginManager(self)
self.events = events.EventHandler()
@@ -305,6 +306,7 @@ class Core(object):
plugins = config.get('plugins_autoload', '')
for plugin in plugins.split():
self.plugin_manager.load(plugin)
+ self.plugins_autoloaded = True
def validate_ssl(self, pem):
"""
@@ -764,7 +766,8 @@ class Core(object):
Called when we are connected and authenticated
"""
self.connection_time = time.time()
- self.autoload_plugins()
+ if not self.plugins_autoloaded: # Do not reload plugins on reconnection
+ self.autoload_plugins()
self.information(_("Authentication success."))
self.information(_("Your JID is %s") % self.xmpp.boundjid.full)
if not self.xmpp.anon: