Update legacy auth to be used outside of stream features.

Also, add detection of legacy XMPP version.
This commit is contained in:
Lance Stout
2012-10-01 16:27:55 -07:00
parent 94488fa2ea
commit 657102e938
3 changed files with 21 additions and 6 deletions

View File

@@ -212,6 +212,10 @@ class BaseXMPP(XMLStream):
self.stream_version = xml.get('version', '')
self.peer_default_lang = xml.get('{%s}lang' % XML_NS, None)
if not self.is_component and not self.stream_version:
log.warning('Legacy XMPP 0.9 protocol detected.')
self.event('legacy_protocol')
def process(self, *args, **kwargs):
"""Initialize plugins and begin processing the XML stream.