From 6d855ec06cd1fb7cdbef0f11d6d10e39766cc006 Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Sun, 11 Mar 2012 22:42:30 -0700 Subject: [PATCH] Move XEP-0082 to new system. --- sleekxmpp/plugins/xep_0082.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/sleekxmpp/plugins/xep_0082.py b/sleekxmpp/plugins/xep_0082.py index 25c80fd0..96eb331a 100644 --- a/sleekxmpp/plugins/xep_0082.py +++ b/sleekxmpp/plugins/xep_0082.py @@ -9,7 +9,7 @@ import logging import datetime as dt -from sleekxmpp.plugins.base import base_plugin +from sleekxmpp.plugins import BasePlugin, register_plugin from sleekxmpp.thirdparty import tzutc, tzoffset, parse_iso @@ -184,7 +184,8 @@ def datetime(year=None, month=None, day=None, hour=None, return value return format_datetime(value) -class xep_0082(base_plugin): + +class XEP_0082(BasePlugin): """ XEP-0082: XMPP Date and Time Profiles @@ -205,11 +206,12 @@ class xep_0082(base_plugin): parse -- Convert a time string into a Python datetime object. """ + name = 'xep_0082' + description = 'XEP-0082: XMPP Date and Time Profiles' + dependencies = set() + def plugin_init(self): """Start the XEP-0082 plugin.""" - self.xep = '0082' - self.description = 'XMPP Date and Time Profiles' - self.date = date self.datetime = datetime self.time = time @@ -217,3 +219,6 @@ class xep_0082(base_plugin): self.format_datetime = format_datetime self.format_time = format_time self.parse = parse + + +register_plugin(XEP_0082)