From ba0e2c126287cd9aaf1458b4b01d912727d00d2a Mon Sep 17 00:00:00 2001 From: souliane Date: Thu, 7 Nov 2013 17:01:40 +0100 Subject: [PATCH] plugin misc_account: added method getNewAccountDomain --- src/plugins/plugin_misc_account.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/plugins/plugin_misc_account.py b/src/plugins/plugin_misc_account.py index 39c7d8b2..668dc79c 100755 --- a/src/plugins/plugin_misc_account.py +++ b/src/plugins/plugin_misc_account.py @@ -87,6 +87,7 @@ class MiscAccount(object): info(_(u"Plugin Account initialization")) self.host = host host.bridge.addMethod("registerSatAccount", ".plugin", in_sign='sss', out_sign='', method=self._registerAccount, async=True) + host.bridge.addMethod("getNewAccountDomain", ".plugin", in_sign='', out_sign='s', method=self._getNewAccountDomain, async=False) if not self._prosody_path: paths = which(_PROSODYCTL) if not paths: @@ -185,3 +186,8 @@ Goffi""" % {'login': login, 'password': password, 'jid': "%s@%s" % (login, _NEW_ d = sendmail(_email_host, _email_from, _REG_ADMIN_EMAIL, msg.as_string()) d.addCallbacks(email_ok, email_ko) + + def _getNewAccountDomain(self): + """@return: the domain that will be set to new account""" + return _NEW_ACCOUNT_DOMAIN +