summaryrefslogtreecommitdiff
path: root/sleekxmpp
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2012-03-11 23:35:06 -0700
committerLance Stout <lancestout@gmail.com>2012-03-12 19:32:19 -0700
commit34a7a62c35ab9ef0c3ac7b3c86455402ac3386ab (patch)
tree6b6dfd5409e8d881c404961262ea6a8678758fd4 /sleekxmpp
parent2305cc61fd8134013cfe8ec4945ca743759bcf5f (diff)
downloadslixmpp-34a7a62c35ab9ef0c3ac7b3c86455402ac3386ab.tar.gz
slixmpp-34a7a62c35ab9ef0c3ac7b3c86455402ac3386ab.tar.bz2
slixmpp-34a7a62c35ab9ef0c3ac7b3c86455402ac3386ab.tar.xz
slixmpp-34a7a62c35ab9ef0c3ac7b3c86455402ac3386ab.zip
Move XEP-0128 to new system.
Diffstat (limited to 'sleekxmpp')
-rw-r--r--sleekxmpp/plugins/xep_0128/__init__.py11
-rw-r--r--sleekxmpp/plugins/xep_0128/extended_disco.py12
2 files changed, 16 insertions, 7 deletions
diff --git a/sleekxmpp/plugins/xep_0128/__init__.py b/sleekxmpp/plugins/xep_0128/__init__.py
index 3c6379a3..27c2cc33 100644
--- a/sleekxmpp/plugins/xep_0128/__init__.py
+++ b/sleekxmpp/plugins/xep_0128/__init__.py
@@ -6,5 +6,14 @@
See the file LICENSE for copying permission.
"""
+from sleekxmpp.plugins.base import register_plugin
+
from sleekxmpp.plugins.xep_0128.static import StaticExtendedDisco
-from sleekxmpp.plugins.xep_0128.extended_disco import xep_0128
+from sleekxmpp.plugins.xep_0128.extended_disco import XEP_0128
+
+
+register_plugin(XEP_0128)
+
+
+# Retain some backwards compatibility
+xep_0128 = XEP_0128
diff --git a/sleekxmpp/plugins/xep_0128/extended_disco.py b/sleekxmpp/plugins/xep_0128/extended_disco.py
index 5bb78320..d49741de 100644
--- a/sleekxmpp/plugins/xep_0128/extended_disco.py
+++ b/sleekxmpp/plugins/xep_0128/extended_disco.py
@@ -11,13 +11,13 @@ import logging
import sleekxmpp
from sleekxmpp import Iq
from sleekxmpp.xmlstream import register_stanza_plugin
-from sleekxmpp.plugins.base import base_plugin
+from sleekxmpp.plugins import BasePlugin
from sleekxmpp.plugins.xep_0004 import Form
from sleekxmpp.plugins.xep_0030 import DiscoInfo
from sleekxmpp.plugins.xep_0128 import StaticExtendedDisco
-class xep_0128(base_plugin):
+class XEP_0128(BasePlugin):
"""
XEP-0128: Service Discovery Extensions
@@ -39,11 +39,12 @@ class xep_0128(base_plugin):
del_extended_info -- Remove all extensions from a disco#info result.
"""
+ name = 'xep_0128'
+ description = 'XEP-0128: Service Discovery Extensions'
+ dependencies = set(['xep_0030', 'xep_0004'])
+
def plugin_init(self):
"""Start the XEP-0128 plugin."""
- self.xep = '0128'
- self.description = 'Service Discovery Extensions'
-
self._disco_ops = ['set_extended_info',
'add_extended_info',
'del_extended_info']
@@ -52,7 +53,6 @@ class xep_0128(base_plugin):
def post_init(self):
"""Handle cross-plugin dependencies."""
- base_plugin.post_init(self)
self.disco = self.xmpp['xep_0030']
self.static = StaticExtendedDisco(self.disco.static)