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/pacokick.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins/pacokick.py') diff --git a/plugins/pacokick.py b/plugins/pacokick.py index 053e6c22..358df013 100644 --- a/plugins/pacokick.py +++ b/plugins/pacokick.py @@ -5,13 +5,13 @@ from plugin import BasePlugin class Plugin(BasePlugin): def init(self): - self.add_command('pacokick', self.command_kick, + self.api.add_command('pacokick', self.command_kick, usage='', help='Kick a random user.', short='Kick a random user') def command_kick(self, arg): - tab = self.core.current_tab() + tab = self.api.current_tab() if isinstance(tab, MucTab): kickable = list(filter(lambda x: x.affiliation in ('none', 'member'), tab.users)) if kickable: @@ -20,4 +20,4 @@ class Plugin(BasePlugin): to_kick = to_kick.nick tab.command_kick(to_kick + ' ' +arg) else: - self.core.information('No one to kick :(', 'Info') + self.api.information('No one to kick :(', 'Info') -- cgit v1.2.3