From 9885203c6799c121f5bc8a733dc1937fe8c1b4d6 Mon Sep 17 00:00:00 2001 From: mathieui Date: Fri, 8 Mar 2013 22:53:35 +0100 Subject: Update the plugins to use the PluginAPI Also: - Add get_conversation_messages() to PluginAPI - Make plugins_autoload colon-separated instead of space-separated (for consistency) - Replace a JID() with a safeJID() in the uptime plugin --- plugins/mpd_client.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins/mpd_client.py') diff --git a/plugins/mpd_client.py b/plugins/mpd_client.py index 47bbdf29..c215e971 100644 --- a/plugins/mpd_client.py +++ b/plugins/mpd_client.py @@ -9,7 +9,7 @@ import mpd class Plugin(BasePlugin): def init(self): for _class in (tabs.ConversationTab, tabs.MucTab, tabs.PrivateTab): - self.add_tab_command(_class, 'mpd', self.command_mpd, + self.api.add_tab_command(_class, 'mpd', self.command_mpd, usage='[full]', help='Sends a message showing the current song of an MPD instance. If full is provided, the message is more verbose.', short='Send the MPD status', @@ -34,8 +34,8 @@ class Plugin(BasePlugin): current_time = float(c.status()['elapsed']) pourcentage = int(current_time / float(current['time']) * 10) s += ' \x192}[\x191}' + '-'*(pourcentage-1) + '\x193}+' + '\x191}' + '-' * (10-pourcentage-1) + '\x192}]\x19o' - if not self.core.send_message('%s' % (s,)): - self.core.information('Cannot send result (%s)' % s, 'Error') + if not self.api.send_message('%s' % (s,)): + self.api.information('Cannot send result (%s)' % s, 'Error') def completion_mpd(self, the_input): return the_input.auto_completion(['full'], quotify=False) -- cgit v1.2.3