diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core.py | 8 | ||||
-rw-r--r-- | src/plugin.py | 12 |
2 files changed, 17 insertions, 3 deletions
diff --git a/src/core.py b/src/core.py index 03f892b6..db8c257a 100644 --- a/src/core.py +++ b/src/core.py @@ -300,8 +300,12 @@ class Core(object): Load the plugins on startup. """ plugins = config.get('plugins_autoload', '') - for plugin in plugins.split(): - self.plugin_manager.load(plugin) + if ':' in plugins: + for plugin in plugins.split(':'): + self.plugin_manager.load(plugin) + else: + for plugin in plugins.split(): + self.plugin_manager.load(plugin) self.plugins_autoloaded = True def start(self): diff --git a/src/plugin.py b/src/plugin.py index 2ef83510..9687c1d2 100644 --- a/src/plugin.py +++ b/src/plugin.py @@ -119,6 +119,16 @@ class PluginAPI(object): """ return self.core.send_message(*args, **kwargs) + def get_conversation_messages(self, _, *args, **kwargs): + """ + Get all the Messages of the current Tab. + + :returns: The list of :py:class:`text_buffer.Message` objects. + :returns: None if the Tab does not inherit from ChatTab. + :rtype: :py:class:`list` + """ + return self.core.get_conversation_messages() + def add_timed_event(self, _, *args, **kwargs): """ Schedule a timed event. @@ -331,7 +341,7 @@ class PluginAPI(object): A list of the SleekXMPP events can be found here http://sleekxmpp.com/event_index.html """ - self.core.xmmp.add_event_handler(event_name, handler) + self.core.xmpp.add_event_handler(event_name, handler) def del_sleek_event_handler(self, module, event_name, handler): """ |