Move feature_rosterver to new system.

This commit is contained in:
Lance Stout 2012-03-12 20:04:11 -07:00
parent 24ec448b7f
commit 7284ceb90c
2 changed files with 17 additions and 8 deletions

View file

@ -6,5 +6,14 @@
See the file LICENSE for copying permission. See the file LICENSE for copying permission.
""" """
from sleekxmpp.features.feature_rosterver.rosterver import feature_rosterver from sleekxmpp.plugins.base import register_plugin
from sleekxmpp.features.feature_rosterver.rosterver import FeatureRosterVer
from sleekxmpp.features.feature_rosterver.stanza import RosterVer from sleekxmpp.features.feature_rosterver.stanza import RosterVer
register_plugin(FeatureRosterVer)
# Retain some backwards compatibility
feature_rosterver = FeatureRosterVer

View file

@ -11,20 +11,20 @@ import logging
from sleekxmpp.stanza import Iq, StreamFeatures from sleekxmpp.stanza import Iq, StreamFeatures
from sleekxmpp.features.feature_rosterver import stanza from sleekxmpp.features.feature_rosterver 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.base import BasePlugin
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
class feature_rosterver(base_plugin): class FeatureRosterVer(BasePlugin):
name = 'feature_rosterver'
description = 'RFC 6121: Stream Feature: Roster Versioning'
dependences = set()
stanza = stanza
def plugin_init(self): def plugin_init(self):
self.name = 'Roster Versioning'
self.rfc = '6121'
self.description = 'Roster Versioning'
self.stanza = stanza
self.xmpp.register_feature('rosterver', self.xmpp.register_feature('rosterver',
self._handle_rosterver, self._handle_rosterver,
restart=False, restart=False,