aboutsummaryrefslogtreecommitdiffstats
path: root/server/xep_0077.py
diff options
context:
space:
mode:
authorGuillaume Horel <guillaume.horel@gmail.com>2011-05-16 08:45:24 -0400
committerGuillaume Horel <guillaume.horel@gmail.com>2011-05-16 08:45:24 -0400
commitd137a319efc660e201ce227bf2e9e762edab5207 (patch)
treec9304b936a429f2e1a4d24854b51dfb7f91f0d00 /server/xep_0077.py
parenta7adb48bae64720345440147e661b0369028b267 (diff)
downloadalias-d137a319efc660e201ce227bf2e9e762edab5207.tar.gz
Fixes in the config parser and various cleanups
Diffstat (limited to 'server/xep_0077.py')
-rw-r--r--server/xep_0077.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/server/xep_0077.py b/server/xep_0077.py
index 51122eb..47d6a7f 100644
--- a/server/xep_0077.py
+++ b/server/xep_0077.py
@@ -54,10 +54,10 @@ class Registration(ElementBase):
aliasform.addField(var="salt",ftype="text-single", label="Salt", required=True)
def get_form(self):
- return Form(self.xml.find('{jabber:x:data}x'))
+ return Form(self.xml.find('{jabber:x:data}x')).getValues()
def set_form(self, values):
- self.get_form().setValues(values)
+ Form(self.xml.find('{jabber:x:data}x')).setValues(values)
class xep_0077(base_plugin):
"""
@@ -94,8 +94,7 @@ class xep_0077(base_plugin):
iq.reply().send()
return
- registration_form = iq['register']['form']
- registration_info = registration_form.getValues()
+ registration_info = iq['register']['form']
for field in self.form_fields:
if not registration_info[field]:
# Incomplete Registration
@@ -128,7 +127,7 @@ class xep_0077(base_plugin):
if self.form_instructions:
reg['instructions'] = self.form_instructions
- if registrant.registered():
+ if registrant.is_registered():
reg['registered'] = True
reg['form'] = registrant.get_registration()
else: