From 7b8a860de95f2af6855b1ba270e677a0eb4c044c Mon Sep 17 00:00:00 2001 From: Todd Eisenberger Date: Tue, 27 Sep 2011 10:14:18 -0700 Subject: [PATCH] Fix loading already loaded plugins --- src/core.py | 8 ++++---- src/plugin_manager.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/core.py b/src/core.py index 1f60e252..1a4d1f2d 100644 --- a/src/core.py +++ b/src/core.py @@ -129,8 +129,8 @@ class Core(object): 'server_cycle': (self.command_server_cycle, _('Usage: /server_cycle [domain] [message]\nServer Cycle: disconnect and reconnects in all the rooms in domain.'), None), 'bind': (self.command_bind, _('Usage: /bind \nBind: bind a key to an other key or to a “command”. For example "/bind ^H KEY_UP" makes Control + h do the same same than the Up key.'), None), 'pubsub': (self.command_pubsub, _('Usage: /pubsub \nPubsub: Open a pubsub browser on the given domain'), None), - 'load': (self.command_load, _('Usage: /load \nLoad: Load the specified python script'), self.plugin_manager.completion_load), - 'unload': (self.command_unload, _('Usage: /unload \nUnload: Unload the specified python script'), self.plugin_manager.completion_unload), + 'load': (self.command_load, _('Usage: /load \nLoad: Load the specified plugin'), self.plugin_manager.completion_load), + 'unload': (self.command_unload, _('Usage: /unload \nUnload: Unload the specified plugin'), self.plugin_manager.completion_unload), } self.key_func = { @@ -1137,7 +1137,7 @@ class Core(object): def command_load(self, arg): """ - /load + /load """ args = arg.split() if len(args) != 1: @@ -1148,7 +1148,7 @@ class Core(object): def command_unload(self, arg): """ - /unload + /unload """ args = arg.split() if len(args) != 1: diff --git a/src/plugin_manager.py b/src/plugin_manager.py index 1f0e89eb..df96e9ab 100644 --- a/src/plugin_manager.py +++ b/src/plugin_manager.py @@ -37,7 +37,7 @@ class PluginManager(object): def load(self, name): if name in self.plugins: - self.plugins[name].unload() + self.unload(name) try: if name in self.modules: