diff options
author | mathieui <mathieui@mathieui.net> | 2013-03-08 22:53:35 +0100 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2013-03-08 22:53:35 +0100 |
commit | 9885203c6799c121f5bc8a733dc1937fe8c1b4d6 (patch) | |
tree | 4190635a7c9c78d2dce1a4c8357ccb887f12b8af /plugins/mpd_client.py | |
parent | dbde08a5267cf003d8a4a9c16f5b18275e9a4bd1 (diff) | |
download | poezio-9885203c6799c121f5bc8a733dc1937fe8c1b4d6.tar.gz poezio-9885203c6799c121f5bc8a733dc1937fe8c1b4d6.tar.bz2 poezio-9885203c6799c121f5bc8a733dc1937fe8c1b4d6.tar.xz poezio-9885203c6799c121f5bc8a733dc1937fe8c1b4d6.zip |
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
Diffstat (limited to 'plugins/mpd_client.py')
-rw-r--r-- | plugins/mpd_client.py | 6 |
1 files changed, 3 insertions, 3 deletions
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) |