From 180bbc7b38f814ff506bb25091a908f02ba32b5c Mon Sep 17 00:00:00 2001 From: C. McEnroe Date: Wed, 12 Feb 2020 20:12:34 -0500 Subject: Add -N flag for notifications --- chat.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'chat.c') diff --git a/chat.c b/chat.c index c0950fb..dbd2784 100644 --- a/chat.c +++ b/chat.c @@ -94,11 +94,12 @@ int main(int argc, char *argv[]) { const char *user = NULL; const char *real = NULL; - const char *Opts = "!C:H:O:RS:a:c:eh:j:k:n:p:r:s:u:vw:"; + const char *Opts = "!C:H:N:O:RS:a: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' }, + { "notify", required_argument, NULL, 'N' }, { "open", required_argument, NULL, 'O' }, { "restrict", no_argument, NULL, 'R' }, { "bind", required_argument, NULL, 'S' }, @@ -124,6 +125,7 @@ int main(int argc, char *argv[]) { break; case '!': insecure = true; break; case 'C': utilPush(&urlCopyUtil, optarg); break; case 'H': hashInit = strtoul(optarg, NULL, 0); + break; case 'N': utilPush(&uiNotifyUtil, optarg); break; case 'O': utilPush(&urlOpenUtil, optarg); break; case 'R': self.restricted = true; break; case 'S': bind = optarg; -- cgit 1.4.1-2-gfad0