Move XEP-0086 to new system.
This commit is contained in:
parent
3fda053606
commit
2f677c98f8
2 changed files with 17 additions and 7 deletions
|
@ -6,5 +6,14 @@
|
||||||
See the file LICENSE for copying permission.
|
See the file LICENSE for copying permission.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
from sleekxmpp.plugins.base import register_plugin
|
||||||
|
|
||||||
from sleekxmpp.plugins.xep_0086.stanza import LegacyError
|
from sleekxmpp.plugins.xep_0086.stanza import LegacyError
|
||||||
from sleekxmpp.plugins.xep_0086.legacy_error import xep_0086
|
from sleekxmpp.plugins.xep_0086.legacy_error import XEP_0086
|
||||||
|
|
||||||
|
|
||||||
|
register_plugin(XEP_0086)
|
||||||
|
|
||||||
|
|
||||||
|
# Retain some backwards compatibility
|
||||||
|
xep_0086 = XEP_0086
|
||||||
|
|
|
@ -8,11 +8,11 @@
|
||||||
|
|
||||||
from sleekxmpp.stanza import Error
|
from sleekxmpp.stanza import Error
|
||||||
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
|
||||||
from sleekxmpp.plugins.xep_0086 import stanza, LegacyError
|
from sleekxmpp.plugins.xep_0086 import stanza, LegacyError
|
||||||
|
|
||||||
|
|
||||||
class xep_0086(base_plugin):
|
class XEP_0086(BasePlugin):
|
||||||
|
|
||||||
"""
|
"""
|
||||||
XEP-0086: Error Condition Mappings
|
XEP-0086: Error Condition Mappings
|
||||||
|
@ -33,10 +33,11 @@ class xep_0086(base_plugin):
|
||||||
iq['error']['legacy']['condition'] = ...
|
iq['error']['legacy']['condition'] = ...
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def plugin_init(self):
|
name = 'xep_0086'
|
||||||
self.xep = '0086'
|
description = 'XEP-0086: Error Condition Mappings'
|
||||||
self.description = 'Error Condition Mappings'
|
dependencies = set()
|
||||||
self.stanza = stanza
|
stanza = stanza
|
||||||
|
|
||||||
|
def plugin_init(self):
|
||||||
register_stanza_plugin(Error, LegacyError,
|
register_stanza_plugin(Error, LegacyError,
|
||||||
overrides=self.config.get('override', True))
|
overrides=self.config.get('override', True))
|
||||||
|
|
Loading…
Reference in a new issue