summaryrefslogtreecommitdiff
path: root/sleekxmpp/plugins/xep_0082.py
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2012-03-11 22:42:30 -0700
committerLance Stout <lancestout@gmail.com>2012-03-12 19:32:19 -0700
commit6d855ec06cd1fb7cdbef0f11d6d10e39766cc006 (patch)
tree763e77d63d756c8aa19bcad72de46b9d84d3f2dc /sleekxmpp/plugins/xep_0082.py
parent23cc62fe7cf10afed331d9130dad46f14fc6aa42 (diff)
downloadslixmpp-6d855ec06cd1fb7cdbef0f11d6d10e39766cc006.tar.gz
slixmpp-6d855ec06cd1fb7cdbef0f11d6d10e39766cc006.tar.bz2
slixmpp-6d855ec06cd1fb7cdbef0f11d6d10e39766cc006.tar.xz
slixmpp-6d855ec06cd1fb7cdbef0f11d6d10e39766cc006.zip
Move XEP-0082 to new system.
Diffstat (limited to 'sleekxmpp/plugins/xep_0082.py')
-rw-r--r--sleekxmpp/plugins/xep_0082.py15
1 files 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)