comparison src/plugins/plugin_misc_register_account.py @ 1044:85c110c0be86

plugins misc_account, misc_register_account: manually delete the sessions when not needed anymore
author souliane <souliane@mailoo.org>
date Wed, 21 May 2014 23:17:51 +0200
parents 6e975c6b0faf
children b29452cab50b
comparison
equal deleted inserted replaced
1043:066308706dc6 1044:85c110c0be86
82 self.host.memory.setParam("Password", session_data["Password"], "Connection", profile_key=profile) 82 self.host.memory.setParam("Password", session_data["Password"], "Connection", profile_key=profile)
83 self.host.memory.setParam("Server", session_data["Server"], "Connection", profile_key=profile) 83 self.host.memory.setParam("Server", session_data["Server"], "Connection", profile_key=profile)
84 self.host.memory.setParam("Port", session_data["Port"], "Connection", profile_key=profile) 84 self.host.memory.setParam("Port", session_data["Port"], "Connection", profile_key=profile)
85 85
86 user = jid.parse(session_data['JabberID'])[0] 86 user = jid.parse(session_data['JabberID'])[0]
87 return self._registerNewAccount(user, session_data["Password"], None, session_data["Server"], profile_key=profile) 87 d = self._registerNewAccount(user, session_data["Password"], None, session_data["Server"], profile_key=profile)
88 del self._sessions[data['session_id']]
89 return d
88 90
89 def _registerNewAccount(self, user, password, email, host, port=5222, profile_key=C.PROF_KEY_NONE): 91 def _registerNewAccount(self, user, password, email, host, port=5222, profile_key=C.PROF_KEY_NONE):
90 """Connect to a server and create a new account using in-band registration. 92 """Connect to a server and create a new account using in-band registration.
91 @param user: login of the account 93 @param user: login of the account
92 @param password: password of the account 94 @param password: password of the account