diff options
author | Lance Stout <lancestout@gmail.com> | 2012-03-11 23:07:40 -0700 |
---|---|---|
committer | Lance Stout <lancestout@gmail.com> | 2012-03-12 19:32:19 -0700 |
commit | 2305cc61fd8134013cfe8ec4945ca743759bcf5f (patch) | |
tree | 98eb38822d534019ab56d0bb63e71fb6a254c902 /sleekxmpp/plugins/xep_0092 | |
parent | 2f677c98f8d4ba5ab7e358ba751d5d376dba5484 (diff) | |
download | slixmpp-2305cc61fd8134013cfe8ec4945ca743759bcf5f.tar.gz slixmpp-2305cc61fd8134013cfe8ec4945ca743759bcf5f.tar.bz2 slixmpp-2305cc61fd8134013cfe8ec4945ca743759bcf5f.tar.xz slixmpp-2305cc61fd8134013cfe8ec4945ca743759bcf5f.zip |
Move XEP-0092 to new system.
Diffstat (limited to 'sleekxmpp/plugins/xep_0092')
-rw-r--r-- | sleekxmpp/plugins/xep_0092/__init__.py | 11 | ||||
-rw-r--r-- | sleekxmpp/plugins/xep_0092/version.py | 20 |
2 files changed, 18 insertions, 13 deletions
diff --git a/sleekxmpp/plugins/xep_0092/__init__.py b/sleekxmpp/plugins/xep_0092/__init__.py index 7c5bdb76..293eaae6 100644 --- a/sleekxmpp/plugins/xep_0092/__init__.py +++ b/sleekxmpp/plugins/xep_0092/__init__.py @@ -6,6 +6,15 @@ See the file LICENSE for copying permission. """ +from sleekxmpp.plugins.base import register_plugin + from sleekxmpp.plugins.xep_0092 import stanza from sleekxmpp.plugins.xep_0092.stanza import Version -from sleekxmpp.plugins.xep_0092.version import xep_0092 +from sleekxmpp.plugins.xep_0092.version import XEP_0092 + + +register_plugin(XEP_0092) + + +# Retain some backwards compatibility +xep_0092 = XEP_0092 diff --git a/sleekxmpp/plugins/xep_0092/version.py b/sleekxmpp/plugins/xep_0092/version.py index ba72a9c3..c6223c10 100644 --- a/sleekxmpp/plugins/xep_0092/version.py +++ b/sleekxmpp/plugins/xep_0092/version.py @@ -13,27 +13,28 @@ from sleekxmpp 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.xep_0092 import Version +from sleekxmpp.plugins import BasePlugin +from sleekxmpp.plugins.xep_0092 import Version, stanza log = logging.getLogger(__name__) -class xep_0092(base_plugin): +class XEP_0092(BasePlugin): """ XEP-0092: Software Version """ + name = 'xep_0092' + description = 'XEP-0092: Software Version' + dependencies = set(['xep_0030']) + stanza = stanza + def plugin_init(self): """ Start the XEP-0092 plugin. """ - self.xep = "0092" - self.description = "Software Version" - self.stanza = sleekxmpp.plugins.xep_0092.stanza - self.name = self.config.get('name', 'SleekXMPP') self.version = self.config.get('version', sleekxmpp.__version__) self.os = self.config.get('os', '') @@ -47,11 +48,6 @@ class xep_0092(base_plugin): register_stanza_plugin(Iq, Version) - def post_init(self): - """ - Handle cross-plugin dependencies. - """ - base_plugin.post_init(self) self.xmpp.plugin['xep_0030'].add_feature('jabber:iq:version') def _handle_version(self, iq): |