summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2012-06-06 12:23:40 -0700
committerLance Stout <lancestout@gmail.com>2012-06-06 12:23:40 -0700
commitdb0e683d013f266ccf7505d2b2fae43432c62072 (patch)
treeaaf4e939309344da21d63875a2af85587231468e
parente29a9e03941898b812f7b937651da9c561a3afad (diff)
downloadslixmpp-db0e683d013f266ccf7505d2b2fae43432c62072.tar.gz
slixmpp-db0e683d013f266ccf7505d2b2fae43432c62072.tar.bz2
slixmpp-db0e683d013f266ccf7505d2b2fae43432c62072.tar.xz
slixmpp-db0e683d013f266ccf7505d2b2fae43432c62072.zip
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.
-rw-r--r--sleekxmpp/plugins/xep_0077/register.py2
1 files changed, 1 insertions, 1 deletions
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