jabber_mirror: Take the Jabber username as a separate option
(imported from commit 86131c7502df7b841c34b09c0e94b071c89b3fde)
This commit is contained in:
parent
d0a875f88a
commit
8a4891aff7
|
@ -187,6 +187,10 @@ if __name__ == '__main__':
|
||||||
default=False,
|
default=False,
|
||||||
action='store_true',
|
action='store_true',
|
||||||
help="Set if Jabber server is an OpenFire server")
|
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',
|
jabber_group.add_option('--jabber-password',
|
||||||
default=None,
|
default=None,
|
||||||
action='store',
|
action='store',
|
||||||
|
@ -212,8 +216,7 @@ if __name__ == '__main__':
|
||||||
if options.jabber_domain is None:
|
if options.jabber_domain is None:
|
||||||
sys.exit("Must specify a Jabber server")
|
sys.exit("Must specify a Jabber server")
|
||||||
|
|
||||||
(username, options.zulip_domain) = options.zulip_email.split("@")
|
jabber_username = options.jabber_username + '@' + options.jabber_domain
|
||||||
jabber_username = username + '@' + options.jabber_domain
|
|
||||||
|
|
||||||
zulip = ZulipToJabberBot(zulip.init_from_options(options, "jabber_mirror"))
|
zulip = ZulipToJabberBot(zulip.init_from_options(options, "jabber_mirror"))
|
||||||
rooms = [s['name'] for s in zulip.client.get_streams()['streams']]
|
rooms = [s['name'] for s in zulip.client.get_streams()['streams']]
|
||||||
|
|
Loading…
Reference in a new issue