Move feature_bind to new system.
This commit is contained in:
parent
5a2cbbb731
commit
8d38fb511b
2 changed files with 17 additions and 8 deletions
|
@ -6,5 +6,14 @@
|
||||||
See the file LICENSE for copying permission.
|
See the file LICENSE for copying permission.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from sleekxmpp.features.feature_bind.bind import feature_bind
|
from sleekxmpp.plugins.base import register_plugin
|
||||||
|
|
||||||
|
from sleekxmpp.features.feature_bind.bind import FeatureBind
|
||||||
from sleekxmpp.features.feature_bind.stanza import Bind
|
from sleekxmpp.features.feature_bind.stanza import Bind
|
||||||
|
|
||||||
|
|
||||||
|
register_plugin(FeatureBind)
|
||||||
|
|
||||||
|
|
||||||
|
# Retain some backwards compatibility
|
||||||
|
feature_bind = FeatureBind
|
||||||
|
|
|
@ -11,20 +11,20 @@ import logging
|
||||||
from sleekxmpp.stanza import Iq, StreamFeatures
|
from sleekxmpp.stanza import Iq, StreamFeatures
|
||||||
from sleekxmpp.features.feature_bind import stanza
|
from sleekxmpp.features.feature_bind import stanza
|
||||||
from sleekxmpp.xmlstream import register_stanza_plugin
|
from sleekxmpp.xmlstream import register_stanza_plugin
|
||||||
from sleekxmpp.plugins.base import base_plugin
|
from sleekxmpp.plugins import BasePlugin, register_plugin
|
||||||
|
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class feature_bind(base_plugin):
|
class FeatureBind(BasePlugin):
|
||||||
|
|
||||||
|
name = 'feature_bind'
|
||||||
|
description = 'RFC 6120: Stream Feature: Resource Binding'
|
||||||
|
dependencies = set()
|
||||||
|
stanza = stanza
|
||||||
|
|
||||||
def plugin_init(self):
|
def plugin_init(self):
|
||||||
self.name = 'Bind Resource'
|
|
||||||
self.rfc = '6120'
|
|
||||||
self.description = 'Resource Binding Stream Feature'
|
|
||||||
self.stanza = stanza
|
|
||||||
|
|
||||||
self.xmpp.register_feature('bind',
|
self.xmpp.register_feature('bind',
|
||||||
self._handle_bind_resource,
|
self._handle_bind_resource,
|
||||||
restart=False,
|
restart=False,
|
||||||
|
|
Loading…
Reference in a new issue