From 8a4891aff755ace579504ec8639cbebf996ea514 Mon Sep 17 00:00:00 2001 From: Zev Benjamin Date: Mon, 3 Mar 2014 01:38:35 -0500 Subject: [PATCH] jabber_mirror: Take the Jabber username as a separate option (imported from commit 86131c7502df7b841c34b09c0e94b071c89b3fde) --- bots/jabber_mirror.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bots/jabber_mirror.py b/bots/jabber_mirror.py index 9ba7157..fedd4a5 100755 --- a/bots/jabber_mirror.py +++ b/bots/jabber_mirror.py @@ -187,6 +187,10 @@ if __name__ == '__main__': default=False, action='store_true', help="Set if Jabber server is an OpenFire server") + jabber_group.add_option('--jabber-username', + default=None, + action='store', + help="Your Jabber username") jabber_group.add_option('--jabber-password', default=None, action='store', @@ -212,8 +216,7 @@ if __name__ == '__main__': if options.jabber_domain is None: sys.exit("Must specify a Jabber server") - (username, options.zulip_domain) = options.zulip_email.split("@") - jabber_username = username + '@' + options.jabber_domain + jabber_username = options.jabber_username + '@' + options.jabber_domain zulip = ZulipToJabberBot(zulip.init_from_options(options, "jabber_mirror")) rooms = [s['name'] for s in zulip.client.get_streams()['streams']]