summaryrefslogtreecommitdiff
path: root/sleekxmpp/plugins/xep_0202/time.py
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2012-03-12 00:22:42 -0700
committerLance Stout <lancestout@gmail.com>2012-03-12 19:32:20 -0700
commit6497857495d185401426ba31441e3039fb316891 (patch)
tree7465813559a8781cf3f562bdffc3210c1f72fa27 /sleekxmpp/plugins/xep_0202/time.py
parent5a324c01de8cbca09609d7176306322bf24df414 (diff)
downloadslixmpp-6497857495d185401426ba31441e3039fb316891.tar.gz
slixmpp-6497857495d185401426ba31441e3039fb316891.tar.bz2
slixmpp-6497857495d185401426ba31441e3039fb316891.tar.xz
slixmpp-6497857495d185401426ba31441e3039fb316891.zip
Move XEP-0202 to new system.
Diffstat (limited to 'sleekxmpp/plugins/xep_0202/time.py')
-rw-r--r--sleekxmpp/plugins/xep_0202/time.py17
1 files changed, 7 insertions, 10 deletions
diff --git a/sleekxmpp/plugins/xep_0202/time.py b/sleekxmpp/plugins/xep_0202/time.py
index 2c6faa4b..ca388c5b 100644
--- a/sleekxmpp/plugins/xep_0202/time.py
+++ b/sleekxmpp/plugins/xep_0202/time.py
@@ -12,7 +12,7 @@ from sleekxmpp.stanza.iq import Iq
from sleekxmpp.xmlstream import register_stanza_plugin
from sleekxmpp.xmlstream.handler import Callback
from sleekxmpp.xmlstream.matcher import StanzaPath
-from sleekxmpp.plugins.base import base_plugin
+from sleekxmpp.plugins import BasePlugin
from sleekxmpp.plugins import xep_0082
from sleekxmpp.plugins.xep_0202 import stanza
@@ -20,18 +20,19 @@ from sleekxmpp.plugins.xep_0202 import stanza
log = logging.getLogger(__name__)
-class xep_0202(base_plugin):
+class XEP_0202(BasePlugin):
"""
XEP-0202: Entity Time
"""
+ name = 'xep_0202'
+ description = 'XEP-0202: Entity Time'
+ dependencies = set(['xep_0030', 'xep_0082'])
+ stanza = stanza
+
def plugin_init(self):
"""Start the XEP-0203 plugin."""
- self.xep = '0202'
- self.description = 'Entity Time'
- self.stanza = stanza
-
self.tz_offset = self.config.get('tz_offset', 0)
# As a default, respond to time requests with the
@@ -48,12 +49,8 @@ class xep_0202(base_plugin):
self._handle_time_request))
register_stanza_plugin(Iq, stanza.EntityTime)
- def post_init(self):
- """Handle cross-plugin interactions."""
- base_plugin.post_init(self)
self.xmpp['xep_0030'].add_feature('urn:xmpp:time')
-
def _handle_time_request(self, iq):
"""
Respond to a request for the local time.