From 0d93e66a68ded28440e20cd7012b4e8b0c705fc6 Mon Sep 17 00:00:00 2001 From: C. McEnroe Date: Mon, 10 Feb 2020 05:50:28 -0500 Subject: Add -H --- chat.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'chat.c') diff --git a/chat.c b/chat.c index ff74485..c58fdc5 100644 --- a/chat.c +++ b/chat.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -46,6 +47,8 @@ size_t idNext = Network + 1; struct Self self = { .color = Default }; +uint32_t hashInit; + int procPipe[2] = { -1, -1 }; static void pipeRead(void) { @@ -81,10 +84,11 @@ int main(int argc, char *argv[]) { const char *user = NULL; const char *real = NULL; - const char *Opts = "!C:O:a:c:eh:j:k:n:p:r:u:vw:"; + const char *Opts = "!C:H:O:a:c:eh:j:k:n:p:r: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' }, { "sasl-plain", required_argument, NULL, 'a' }, { "cert", required_argument, NULL, 'c' }, @@ -106,6 +110,7 @@ int main(int argc, char *argv[]) { switch (opt) { break; case '!': insecure = true; break; case 'C': urlCopyUtil = optarg; + break; case 'H': hashInit = strtoul(optarg, NULL, 0); break; case 'O': urlOpenUtil = optarg; break; case 'a': sasl = true; self.plain = optarg; break; case 'c': cert = optarg; -- cgit 1.4.1-2-gfad0