summaryrefslogtreecommitdiff
path: root/sleekxmpp
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2012-03-12 19:52:20 -0700
committerLance Stout <lancestout@gmail.com>2012-03-12 19:52:20 -0700
commited5a2f400dc1ac5d6db3242857b1a3ac1c7f72d0 (patch)
tree97367e966787956dc8dbc0517e1adaa85637e786 /sleekxmpp
parent9596616b424417f8a03657dfc3c958eb92147a3b (diff)
downloadslixmpp-ed5a2f400dc1ac5d6db3242857b1a3ac1c7f72d0.tar.gz
slixmpp-ed5a2f400dc1ac5d6db3242857b1a3ac1c7f72d0.tar.bz2
slixmpp-ed5a2f400dc1ac5d6db3242857b1a3ac1c7f72d0.tar.xz
slixmpp-ed5a2f400dc1ac5d6db3242857b1a3ac1c7f72d0.zip
Move feature_session to new system.
Diffstat (limited to 'sleekxmpp')
-rw-r--r--sleekxmpp/features/feature_session/__init__.py11
-rw-r--r--sleekxmpp/features/feature_session/session.py14
2 files changed, 17 insertions, 8 deletions
diff --git a/sleekxmpp/features/feature_session/__init__.py b/sleekxmpp/features/feature_session/__init__.py
index 3c84baed..28bb3f77 100644
--- a/sleekxmpp/features/feature_session/__init__.py
+++ b/sleekxmpp/features/feature_session/__init__.py
@@ -6,5 +6,14 @@
See the file LICENSE for copying permission.
"""
-from sleekxmpp.features.feature_session.session import feature_session
+from sleekxmpp.plugins.base import register_plugin
+
+from sleekxmpp.features.feature_session.session import FeatureSession
from sleekxmpp.features.feature_session.stanza import Session
+
+
+register_plugin(FeatureSession)
+
+
+# Retain some backwards compatibility
+feature_session = FeatureSession
diff --git a/sleekxmpp/features/feature_session/session.py b/sleekxmpp/features/feature_session/session.py
index f2314c2b..c799a763 100644
--- a/sleekxmpp/features/feature_session/session.py
+++ b/sleekxmpp/features/feature_session/session.py
@@ -10,7 +10,7 @@ import logging
from sleekxmpp.stanza import Iq, StreamFeatures
from sleekxmpp.xmlstream import register_stanza_plugin
-from sleekxmpp.plugins.base import base_plugin
+from sleekxmpp.plugins import BasePlugin
from sleekxmpp.features.feature_session import stanza
@@ -18,14 +18,14 @@ from sleekxmpp.features.feature_session import stanza
log = logging.getLogger(__name__)
-class feature_session(base_plugin):
+class FeatureSession(BasePlugin):
- def plugin_init(self):
- self.name = 'Start Session'
- self.rfc = '3920'
- self.description = 'Start Session Stream Feature'
- self.stanza = stanza
+ name = 'feature_session'
+ description = 'RFC 3920: Stream Feature: Start Session'
+ dependencies = set()
+ stanza = stanza
+ def plugin_init(self):
self.xmpp.register_feature('session',
self._handle_start_session,
restart=False,