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/rainbow.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins/rainbow.py') diff --git a/plugins/rainbow.py b/plugins/rainbow.py index 3c4813d0..4a188b33 100644 --- a/plugins/rainbow.py +++ b/plugins/rainbow.py @@ -12,9 +12,9 @@ def rand_color(): class Plugin(BasePlugin): def init(self): - self.add_event_handler('muc_say', self.rainbowize) - self.add_event_handler('private_say', self.rainbowize) - self.add_event_handler('conversation_say', self.rainbowize) + self.api.add_event_handler('muc_say', self.rainbowize) + self.api.add_event_handler('private_say', self.rainbowize) + self.api.add_event_handler('conversation_say', self.rainbowize) def rainbowize(self, msg, tab): msg['body'] = ''.join(['%s%s' % (rand_color(),char,) for char in xhtml.clean_text(msg['body'])]) -- cgit v1.2.3