From db0e683d013f266ccf7505d2b2fae43432c62072 Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Wed, 6 Jun 2012 12:23:40 -0700 Subject: Don't request registration forms unless the register event is handled. Some servers end the stream if registration can not be completed in-band, which means always requesting the form can prevent regular login. --- sleekxmpp/plugins/xep_0077/register.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sleekxmpp/plugins/xep_0077/register.py b/sleekxmpp/plugins/xep_0077/register.py index 53cc9ef5..1d04ab25 100644 --- a/sleekxmpp/plugins/xep_0077/register.py +++ b/sleekxmpp/plugins/xep_0077/register.py @@ -50,7 +50,7 @@ class XEP_0077(BasePlugin): # We have already logged in with an account return False - if self.create_account: + if self.create_account and self.xmpp.event_handled('register'): form = self.get_registration() self.xmpp.event('register', form, direct=True) return True -- cgit v1.2.3