From f1e3d9ab761bdacdb55708e79c7a71254db4ba1b Mon Sep 17 00:00:00 2001 From: Zev Benjamin Date: Wed, 26 Feb 2014 15:23:47 -0500 Subject: [PATCH] jabber_mirror: Require the --conference-domain option when running in 'public' mode (imported from commit 1dd564a212538e292ffc8b7a52caf7eae66d4475) --- bots/jabber_mirror.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bots/jabber_mirror.py b/bots/jabber_mirror.py index 66bee1a..e5a9a9d 100755 --- a/bots/jabber_mirror.py +++ b/bots/jabber_mirror.py @@ -66,7 +66,7 @@ class JabberToZulipBot(ClientXMPP): def session_start(self, event): self.get_roster() self.send_presence() - if options.mode == "public" and options.conference_domain is not None: + if options.mode == "public": for room in self.rooms: self.plugin['xep_0045'].joinMUC(room + "@" + options.conference_domain, self.nick) @@ -221,6 +221,9 @@ user and mirrors messages sent to Jabber rooms to Zulip.'''.replace("\n", " ")) if options.mode not in ('public', 'personal'): sys.exit("Bad value for --mode: must be one of 'public' or 'personal'") + if options.mode == 'public' and options.conference_domain is None: + sys.exit("--conference-domain is required when running in 'public' mode") + if options.jabber_password is None: options.jabber_password = getpass.getpass("Jabber password: ") if options.jabber_domain is None: