Skip to content

Instantly share code, notes, and snippets.

@legastero
Created May 22, 2010 00:47
Show Gist options
  • Save legastero/409627 to your computer and use it in GitHub Desktop.
Save legastero/409627 to your computer and use it in GitHub Desktop.
def __handleRegistration(self, iq):
if iq['type'] == 'get':
# Registration form requested
userData = self.backend[iq['from'].bare]
self.sendRegistrationForm(iq, userData)
elif iq['type'] == 'set':
# Remove an account
if iq['register']['remove']:
self.backend.unregister(iq['from'].bare)
self.xmpp.event('unregistered_user', iq)
iq.reply().send()
return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment