From b86afecfe7fdedcce826470ab349b54a36e24728 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Wed, 10 Mar 1999 23:21:53 +0000 Subject: gratuitous automatic CC-adding flag for multiple-recipient zephyrs --- clients/zwrite/zwrite.1 | 10 ++++++++++ clients/zwrite/zwrite.c | 27 +++++++++++++++++++++++++-- 2 files changed, 35 insertions(+), 2 deletions(-) (limited to 'clients/zwrite') diff --git a/clients/zwrite/zwrite.1 b/clients/zwrite/zwrite.1 index 900d28c..64453af 100644 --- a/clients/zwrite/zwrite.1 +++ b/clients/zwrite/zwrite.1 @@ -30,6 +30,8 @@ zwrite \- write to another user via Zephyr ] [ .BI -l ] [ +.BI -C +] [ .BI -O opcode ] [ .BI -s @@ -128,6 +130,14 @@ When the .B \-m option is used, no PING is sent. .TP +.B \-C +prepends a "CC:" line to the body of the message indicating the +recipients of the message. This is strictly a convenience: the +presence of a "CC:" line at the top of a zephyr body does not +necessarily indicate that this option was used, or that the message +really was sent to the listed users, and its lack doesn't indicate +that the message was not sent to multiple users. +.TP .B \-s \fIsignature\fR sets the signature to be included in the message. This overrides both the user's name (as found in the password file) and any diff --git a/clients/zwrite/zwrite.c b/clients/zwrite/zwrite.c index 453706c..407b020 100644 --- a/clients/zwrite/zwrite.c +++ b/clients/zwrite/zwrite.c @@ -28,7 +28,7 @@ static const char rcsid_zwrite_c[] = "$Id$"; #define MAXRECIPS 100 -int nrecips, msgarg, verbose, quiet, nodot; +int nrecips, msgarg, verbose, quiet, nodot, cc; char *whoami, *inst, *class, *opcode, *realm, *recips[MAXRECIPS]; Z_AuthProc auth; void un_tabify(); @@ -175,6 +175,9 @@ main(argc, argv) arg++; realm = argv[arg]; break; + case 'C': + cc = 1; + break; default: usage(whoami); } @@ -256,6 +259,26 @@ main(argc, argv) message[msgsize++] = '\0'; } + if (cc && nrecips > 1) { + int size = msgsize; + for (arg=0;arg