From 10ae7bedbd1dac946ee97c3fb27676cde2237621 Mon Sep 17 00:00:00 2001 From: C. McEnroe Date: Tue, 11 Feb 2020 22:39:29 -0500 Subject: Add -R restricted flag --- chat.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'chat.c') diff --git a/chat.c b/chat.c index 4577bb7..14a02cb 100644 --- a/chat.c +++ b/chat.c @@ -93,12 +93,13 @@ int main(int argc, char *argv[]) { const char *user = NULL; const char *real = NULL; - const char *Opts = "!C:H:O:a:c:eh:j:k:n:p:r:s:u:vw:"; + const char *Opts = "!C:H:O:Ra:c:eh:j:k:n:p:r:s:u:vw:"; const struct option LongOpts[] = { { "insecure", no_argument, NULL, '!' }, { "copy", required_argument, NULL, 'C' }, { "hash", required_argument, NULL, 'H' }, { "open", required_argument, NULL, 'O' }, + { "restrict", no_argument, NULL, 'R' }, { "sasl-plain", required_argument, NULL, 'a' }, { "cert", required_argument, NULL, 'c' }, { "sasl-external", no_argument, NULL, 'e' }, @@ -122,6 +123,7 @@ int main(int argc, char *argv[]) { break; case 'C': urlCopyUtil = optarg; break; case 'H': hashInit = strtoul(optarg, NULL, 0); break; case 'O': urlOpenUtil = optarg; + break; case 'R': self.restricted = true; break; case 'a': sasl = true; self.plain = optarg; break; case 'c': cert = optarg; break; case 'e': sasl = true; -- cgit 1.4.1-2-gfad0