Relay-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site seismo.CSS.GOV Posting-Version: version B 2.10.2 9/3/84; site panda.UUCP Path: seismo!harvard!talcott!panda!sources-request From: sources-request@panda.UUCP Newsgroups: mod.sources Subject: changes to notes Message-ID: <802@panda.UUCP> Date: 22 Aug 85 12:27:13 GMT Sender: jpn@panda.UUCP Lines: 1231 Approved: jpn@panda.UUCP Mod.sources: Volume 2, Issue 36 Submitted by: genrad!mit-eddie!mirror!rs (Rich Salz) This note contains modifications to the latest version of notes, 1.7. The diffs listed below will modify notes (version 1.7, at least) to understand moderated newsgroups, as well as "local" notesfiles. In a MODERATED notesfile, any attempt to write a note or send mail is turned into a call that sends mail to the moderator. For example, is the MODERATED flag is on for net.announce, any attempt to post their will instead be sent as mail to mark@cbosgd.att (or whatever). Note that it is still possible to "Copy" a note into a MODERATED notesfile. This can be prohibited by (a) turning off write permission on the all MODERATED notesfiles, or (b) added some trivial code to adnote.c. I did (a); if anyone wants the code for (b), let me know. The mapping of notesfile names to moderators is done in a file named "moderators" in the notesfile utility directory (default is /usr/spool/notes/.utilities). This file contains lines like: notesfile_name mail_address Blank lines, or lines starting with '#', are ignored. Here are a couple of lines from my "moderators" file: Here are a couple of lines from my .utilties/moderator file: # This comes from the posting by Gene Spafford # Correct addresses for mirror systems by R$, 19aug85. mod.map wjh12!ihnp4!cbosgd!mark mod.map.uucp wjh12!ihnp4!cbosgd!uucpmap # Here's handling an ARPA gateway'd list fa.laser-lover furuta%washington@cca # Here's one that we gateway ourselves ms.loops loops-users%berkeley@cca # Any valid address is ok ms.prisoner inmet!masscomp!allegra!sjuvax!ianucci Enough talk, here are the diffs. NOTE: THE RCS REVISIONS SHOW ARE WRONG. I BLEW IT! ===============================CUT HERE=============================== # This is a shell archive. Remove anything before this line, # then unpack it by saving it in a file and typing "sh file". # # Wrapped by mirror!rs on Tue Aug 20 12:22:27 EDT 1985 # Contents: DIFFS echo x - DIFFS sed 's/^XX//' > "DIFFS" <<'@//E*O*F DIFFS//' XXRCS file: RCS/dropt.c,v XXretrieving revision 1.1 XXdiff -c -r1.1 dropt.c XX*** /tmp/,RCSt1001754 Tue Aug 20 12:16:53 1985 XX--- dropt.c Tue Aug 20 11:53:19 1985 XX*************** XX*** 2,8 XX #include "structs.h" XX XX #ifdef RCSIDENT XX! static char rcsid[] = "$Header: dropt.c,v 1.1 85/08/19 15:50:25 rs Exp $"; XX #endif RCSIDENT XX XX #define BUFSZ 128 XX--- 2,8 ----- XX #include "structs.h" XX XX #ifdef RCSIDENT XX! static char rcsid[] = "$Header: dropt.c,v 1.6 85/08/20 11:52:58 rs Exp $"; XX #endif RCSIDENT XX XX #define BUFSZ 128 XX*************** XX*** 24,29 XX * -4 if the user hit cntrl d ( to total exit) XX * XX * original author/outliner : Ray Essick may 29, 1981 XX * XX */ XX XX--- 24,31 ----- XX * -4 if the user hit cntrl d ( to total exit) XX * XX * original author/outliner : Ray Essick may 29, 1981 XX+ * added the "moderated" flag:Rich $alz aug 19, 1985 XX+ * added "local" flag, toggle, YorN: Rich $alz aug 19, 1985 XX * XX */ XX XX*************** XX*** 35,41 XX netrow, /* networked */ XX expirerow, /* expire age */ XX longrow, /* longest ok text */ XX! worksetrow; /* working set */ XX static int lastrow; XX XX direct (io) struct io_f *io; XX--- 37,45 ----- XX netrow, /* networked */ XX expirerow, /* expire age */ XX longrow, /* longest ok text */ XX! worksetrow, /* working set */ XX! modrow, /* moderated flag */ XX! localrow; /* local flag */ XX static int lastrow; XX XX #define YorN(c) ((c) != 0 ? YES : NO) XX*************** XX*** 38,43 XX worksetrow; /* working set */ XX static int lastrow; XX XX direct (io) struct io_f *io; XX { XX int i; /* scratch */ XX--- 42,51 ----- XX localrow; /* local flag */ XX static int lastrow; XX XX+ #define YorN(c) ((c) != 0 ? YES : NO) XX+ static char YES[] = "YES"; XX+ static char NO[] = "NO "; XX+ XX direct (io) struct io_f *io; XX { XX int i; /* scratch */ XX*************** XX*** 113,129 XX break; /* skipt out of the loop */ XX XX case 'a': /* toggle anonymous option */ XX! locknf (io, DSCRLOCK); /* lock the thing for a minute */ XX! getdscr (io, &io -> descr); /* get up to date descriptor */ XX! if (io -> descr.d_stat & ANONOK) XX! io -> descr.d_stat &= NOT ANONOK; XX! else XX! io -> descr.d_stat |= ANONOK; XX! putdscr (io, &io -> descr); XX! unlocknf (io, DSCRLOCK); XX! at (anonrow, 18); XX! printf (io -> descr.d_stat & ANONOK ? "ON " : "OFF"); XX! redraw = 0; XX break; XX XX case 'A': /* Archive option */ XX--- 121,127 ----- XX break; /* skipt out of the loop */ XX XX case 'a': /* toggle anonymous option */ XX! toggle(io, ANONOK, anonrow); XX break; XX XX case 'A': /* Archive option */ XX*************** XX*** 127,143 XX break; XX XX case 'A': /* Archive option */ XX! locknf (io, DSCRLOCK); /* lock the thing for a minute */ XX! getdscr (io, &io -> descr); /* get up to date descriptor */ XX! if (io -> descr.d_stat & ISARCH) XX! io -> descr.d_stat &= NOT ISARCH; XX! else XX! io -> descr.d_stat |= ISARCH; XX! putdscr (io, &io -> descr); XX! unlocknf (io, DSCRLOCK); XX! at (archrow, 18); XX! printf (io -> descr.d_stat & ISARCH ? "YES" : "NO "); XX! redraw = 0; XX break; XX XX case 'l': /* message length */ XX--- 125,131 ----- XX break; XX XX case 'A': /* Archive option */ XX! toggle(io, ISARCH, archrow); XX break; XX XX case 'l': /* message length */ XX*************** XX*** 173,179 XX unlocknf (io, DSCRLOCK); /* all done ... */ XX at (longrow, 27); XX printf ("%ld bytes ", io -> descr.d_longnote); XX- redraw = 0; XX break; XX XX case 'c': /* compress the notefile */ XX--- 161,166 ----- XX unlocknf (io, DSCRLOCK); /* all done ... */ XX at (longrow, 27); XX printf ("%ld bytes ", io -> descr.d_longnote); XX break; XX XX case 'c': /* compress the notefile */ XX*************** XX*** 177,183 XX break; XX XX case 'c': /* compress the notefile */ XX- redraw = 0; XX if (io -> descr.d_stat & OPEN) XX { XX at (lastrow, 10); XX--- 164,169 ----- XX break; XX XX case 'c': /* compress the notefile */ XX if (io -> descr.d_stat & OPEN) XX { XX at (lastrow, 10); XX*************** XX*** 265,271 XX printf ("%ld days ", io -> descr.d_archtime); XX break; XX } XX- redraw = 0; XX break; XX XX case 'W': /* working Set size */ XX--- 251,256 ----- XX printf ("%ld days ", io -> descr.d_archtime); XX break; XX } XX break; XX XX case 'W': /* working Set size */ XX*************** XX*** 311,317 XX default: XX printf ("%ld Notes ", io -> descr.d_workset); XX } XX- redraw = 0; XX break; XX XX case 'E': /* keep/delete/default */ XX--- 296,301 ----- XX default: XX printf ("%ld Notes ", io -> descr.d_workset); XX } XX break; XX XX case 'E': /* keep/delete/default */ XX*************** XX*** 348,354 XX printf ("UNKNOWN"); XX break; XX } XX- redraw = 0; XX break; XX XX case 'D': /* Archive dirmsg */ XX--- 332,337 ----- XX printf ("UNKNOWN"); XX break; XX } XX break; XX XX case 'D': /* Archive dirmsg */ XX*************** XX*** 391,397 XX printf ("UNKNOWN "); XX break; XX } XX- redraw = 0; XX break; XX XX case 'o': /* toggle open status */ XX--- 374,379 ----- XX printf ("UNKNOWN "); XX break; XX } XX break; XX XX case 'o': /* toggle open status */ XX*************** XX*** 395,411 XX break; XX XX case 'o': /* toggle open status */ XX! locknf (io, DSCRLOCK); XX! getdscr (io, &io -> descr); XX! if (io -> descr.d_stat & OPEN) XX! io -> descr.d_stat &= NOT OPEN; XX! else XX! io -> descr.d_stat |= OPEN; XX! putdscr (io, &io -> descr); XX! unlocknf (io, DSCRLOCK); XX! at (openrow, 18); XX! printf (io -> descr.d_stat & OPEN ? "OPEN " : "CLOSED"); XX! redraw = 0; XX break; XX XX case 'n': /* toggle network status */ XX--- 377,383 ----- XX break; XX XX case 'o': /* toggle open status */ XX! toggle (io, OPEN, openrow); XX break; XX XX case 'M': /* toggle moderated status */ XX*************** XX*** 408,413 XX redraw = 0; XX break; XX XX case 'n': /* toggle network status */ XX locknf (io, DSCRLOCK); XX getdscr (io, &io -> descr); XX--- 380,393 ----- XX toggle (io, OPEN, openrow); XX break; XX XX+ case 'M': /* toggle moderated status */ XX+ toggle (io, MODERATED, modrow); XX+ break; XX+ XX+ case 'L': /* toggle local status */ XX+ toggle(io, LOCAL, localrow); XX+ break; XX+ XX case 'n': /* toggle network status */ XX toggle(io, NETWRKD, netrow); XX break; XX*************** XX*** 409,429 XX break; XX XX case 'n': /* toggle network status */ XX! locknf (io, DSCRLOCK); XX! getdscr (io, &io -> descr); XX! if (io -> descr.d_stat & NETWRKD) XX! { XX! io -> descr.d_stat &= NOT NETWRKD; XX! } XX! else XX! { XX! io -> descr.d_stat |= NETWRKD; XX! } XX! putdscr (io, &io -> descr); XX! unlocknf (io, DSCRLOCK); XX! at (netrow, 18); XX! printf (io -> descr.d_stat & NETWRKD ? "YES" : "NO "); XX! redraw = 0; XX break; XX XX XX--- 389,395 ----- XX break; XX XX case 'n': /* toggle network status */ XX! toggle(io, NETWRKD, netrow); XX break; XX XX XX*************** XX*** 524,530 XX XX default: XX printf ("\07"); XX- redraw = 0; XX goto getkey; /* hit a bad key */ XX XX } XX--- 490,495 ----- XX XX default: XX printf ("\07"); XX goto getkey; /* hit a bad key */ XX XX } XX*************** XX*** 553,559 XX printf (io -> descr.d_stat & OPEN ? "OPEN " : "CLOSED"); XX at (netrow = atrow++, atcol); XX printf ("(n) Networked: "); /* at(5,18); */ XX! printf (io -> descr.d_stat & NETWRKD ? "YES" : "NO "); XX at (archrow = atrow++, atcol); XX printf ("(A) Is Archive: "); /* at(6,18); */ XX printf (io -> descr.d_stat & ISARCH ? "YES" : "NO"); XX--- 518,524 ----- XX printf (io -> descr.d_stat & OPEN ? "OPEN " : "CLOSED"); XX at (netrow = atrow++, atcol); XX printf ("(n) Networked: "); /* at(5,18); */ XX! printf (YorN(io -> descr.d_stat & NETWRKD)); XX at (archrow = atrow++, atcol); XX printf ("(A) Is Archive: "); /* at(6,18); */ XX printf (YorN(io -> descr.d_stat & ISARCH)); XX*************** XX*** 556,562 XX printf (io -> descr.d_stat & NETWRKD ? "YES" : "NO "); XX at (archrow = atrow++, atcol); XX printf ("(A) Is Archive: "); /* at(6,18); */ XX! printf (io -> descr.d_stat & ISARCH ? "YES" : "NO"); XX at (expirerow = atrow++, atcol); XX printf ("(e) Expiration Threshold: "); /* at (6,27); */ XX switch ((int) (io -> descr.d_archtime)) XX--- 521,533 ----- XX printf (YorN(io -> descr.d_stat & NETWRKD)); XX at (archrow = atrow++, atcol); XX printf ("(A) Is Archive: "); /* at(6,18); */ XX! printf (YorN(io -> descr.d_stat & ISARCH)); XX! at (modrow = atrow++, atcol); XX! printf ("(M) Moderated: "); XX! printf (YorN(io -> descr.d_stat & MODERATED)); XX! at (localrow = atrow++, atcol); XX! printf ("(L) Local: "); XX! printf (YorN(io -> descr.d_stat & LOCAL)); XX at (expirerow = atrow++, atcol); XX printf ("(e) Expiration Threshold: "); /* at (6,27); */ XX switch ((int) (io -> descr.d_archtime)) XX*************** XX*** 631,637 XX atrow = 4; XX atcol = 40; XX at (atrow++, atcol); XX! printf ("Policy Note Exists: %s", io -> descr.d_plcy ? "YES" : "NO"); XX at (atrow++, atcol); XX printf ("Next note in slot: %d", io -> descr.d_nnote + 1); XX at (atrow++, atcol); XX--- 602,608 ----- XX atrow = 4; XX atcol = 40; XX at (atrow++, atcol); XX! printf ("Policy Note Exists: %s", YorN(io -> descr.d_plcy)); XX at (atrow++, atcol); XX printf ("Next note in slot: %d", io -> descr.d_nnote + 1); XX at (atrow++, atcol); XX*************** XX*** 646,649 XX if (atrow > lastrow) XX lastrow = atrow; XX lastrow++; XX } XX--- 617,637 ----- XX if (atrow > lastrow) XX lastrow = atrow; XX lastrow++; XX+ } XX+ XX+ toggle(io, flag, row) XX+ struct io_f *io; XX+ int flag; XX+ int row; XX+ { XX+ locknf (io, DSCRLOCK); XX+ getdscr (io, &io -> descr); XX+ if (io -> descr.d_stat & flag) XX+ io -> descr.d_stat &= NOT flag; XX+ else XX+ io -> descr.d_stat |= flag; XX+ putdscr (io, &io -> descr); XX+ unlocknf (io, DSCRLOCK); XX+ at (row, 18); XX+ printf (YorN(io -> descr.d_stat & flag)); XX } XX=================================================================== XXRCS file: RCS/gtext.c,v XXretrieving revision 1.1 XXdiff -c -r1.1 gtext.c XX*** /tmp/,RCSt1001754 Tue Aug 20 12:17:05 1985 XX--- gtext.c Tue Aug 20 12:10:09 1985 XX*************** XX*** 2,8 XX #include "structs.h" XX XX #ifdef RCSIDENT XX! static char rcsid[] = "$Header: gtext.c,v 1.1 85/08/19 19:50:41 rs Exp $"; XX #endif RCSIDENT XX XX /* XX--- 2,8 ----- XX #include "structs.h" XX XX #ifdef RCSIDENT XX! static char rcsid[] = "$Header: gtext.c,v 1.4 85/08/20 12:09:38 rs Exp $"; XX #endif RCSIDENT XX XX /* XX*************** XX*** 17,22 XX * modified again: rbe 12 nov 81 fix to version 7 and general shtuff XX * modified a third time to add insert-text for user XX * Ray Essick December 1981 XX */ XX XX long gettext (io, where, preface, editflag) XX--- 17,26 ----- XX * modified again: rbe 12 nov 81 fix to version 7 and general shtuff XX * modified a third time to add insert-text for user XX * Ray Essick December 1981 XX+ * modified to add non-portable way of appending a signature file. XX+ * Rich $alz July, 1985 XX+ * did signatures the "right" way (better, at least) - LOCAL flag XX+ * Rich $alz August, 1985 XX */ XX XX extern char hissig[]; XX*************** XX*** 19,24 XX * Ray Essick December 1981 XX */ XX XX long gettext (io, where, preface, editflag) XX struct io_f *io; XX struct daddr_f *where; /* where we left it */ XX--- 23,29 ----- XX * Rich $alz August, 1985 XX */ XX XX+ extern char hissig[]; XX long gettext (io, where, preface, editflag) XX struct io_f *io; XX struct daddr_f *where; /* where we left it */ XX*************** XX*** 58,63 XX { XX unlink (fn); /* might just be protections */ XX return ((long) 0); XX } XX XX count = pagein (io, scr, where); /* move text in */ XX--- 63,91 ----- XX { XX unlink (fn); /* might just be protections */ XX return ((long) 0); XX+ } XX+ XX+ if (hissig[0] && io -> descr.d_stat & NETWRKD XX+ && !(io -> descr.d_stat & LOCAL)) XX+ { XX+ c = askyn ("Add signature (y/n): "); XX+ printf ("\r \r"); XX+ if (c == 'y') XX+ { XX+ FILE * siggy; XX+ XX+ if ((siggy = fopen (hissig, "r")) == NULL) XX+ printf ("Can't find %s", hissig); XX+ else XX+ { XX+ /* Flop to append mode, append, flip back to read */ XX+ freopen (fn, "a", scr); XX+ while ((c = getc (siggy)) != EOF) XX+ putc (c, scr); XX+ fclose (siggy); XX+ freopen (fn, "r", scr); XX+ } XX+ } XX } XX XX count = pagein (io, scr, where); /* move text in */ XX=================================================================== XXRCS file: RCS/index.c,v XXretrieving revision 1.1 XXdiff -c -r1.1 index.c XX*** /tmp/,RCSt1001754 Tue Aug 20 12:17:12 1985 XX--- index.c Tue Aug 20 10:12:39 1985 XX*************** XX*** 2,8 XX #include "structs.h" XX XX #ifdef RCSIDENT XX! static char rcsid[] = "$Header: index.c,v 1.1 85/08/19 17:42:07 rs Exp $"; XX #endif RCSIDENT XX XX /* XX--- 2,8 ----- XX #include "structs.h" XX XX #ifdef RCSIDENT XX! static char rcsid[] = "$Header: index.c,v 1.3 85/08/20 10:10:23 rs Exp $"; XX #endif RCSIDENT XX XX /* XX*************** XX*** 20,25 XX * XX * Original Coding: Rob Kolstad Winter 1980 XX * modifications: Ray Essick December 1981 XX */ XX XX indx (io, firstdis, lastdis, respnum) XX--- 20,27 ----- XX * XX * Original Coding: Rob Kolstad Winter 1980 XX * modifications: Ray Essick December 1981 XX+ * added MODERATED code: Rich $alz August 1985 XX+ * added LOCAL flag: Rich $alz August 1985 XX */ XX XX static char YES[] = "YES"; XX*************** XX*** 22,27 XX * modifications: Ray Essick December 1981 XX */ XX XX indx (io, firstdis, lastdis, respnum) XX struct io_f *io; XX int *firstdis, XX--- 24,33 ----- XX * added LOCAL flag: Rich $alz August 1985 XX */ XX XX+ static char YES[] = "YES"; XX+ static char NO[] = "NO "; XX+ #define YorN(c) ((c) != 0 ? YES : NO) XX+ XX indx (io, firstdis, lastdis, respnum) XX struct io_f *io; XX int *firstdis, XX*************** XX*** 58,65 XX XX case 'W': /* this too shall write a note */ XX case 'w': /* write a note */ XX! return addnote (io, NULL, "Edit Note text:", "Note Title: ", NULL, EDIT); XX! /* do it */ XX XX case 'B': /* bitch, bitch, bitch */ XX if (init (&io2, GRIPES) < 0) /* no gripe file */ XX--- 64,80 ----- XX XX case 'W': /* this too shall write a note */ XX case 'w': /* write a note */ XX! if ( ! (io -> descr.d_stat & MODERATED ) ) XX! return addnote (io, NULL, "Edit Note text:", "Note Title: ", NULL, EDIT); XX! if (askyn ("Moderated; send mail to moderator? ") == 'y') XX! { XX! at (0, 1); XX! printf ("Subject: "); XX! if (gline (nfname, WDLEN) > 1) XX! mailit(io, (struct daddr_f *)0, (struct auth_f *)0, XX! (struct when_f *)0, nfname, 0, 0); XX! } XX! return (-1); XX XX XX case 'B': /* bitch, bitch, bitch */ XX*************** XX*** 61,66 XX return addnote (io, NULL, "Edit Note text:", "Note Title: ", NULL, EDIT); XX /* do it */ XX XX case 'B': /* bitch, bitch, bitch */ XX if (init (&io2, GRIPES) < 0) /* no gripe file */ XX { XX--- 76,82 ----- XX } XX return (-1); XX XX+ XX case 'B': /* bitch, bitch, bitch */ XX if (init (&io2, GRIPES) < 0) /* no gripe file */ XX { XX*************** XX*** 168,176 XX else XX { XX at (0, 10); XX! printf (" Anonymous: %s Networked: %s", XX! (io -> descr.d_stat & ANONOK) ? "YES" : "NO", XX! (io -> descr.d_stat & NETWRKD) ? "YES" : "NO"); XX continue; XX } XX XX--- 184,196 ----- XX else XX { XX at (0, 10); XX! printf ( XX! "Anonymous: %s Networked: %s Moderated: %s Local: %s", XX! YorN (io -> descr.d_stat & ANONOK), XX! YorN (io -> descr.d_stat & NETWRKD), XX! YorN (io -> descr.d_stat & MODERATED), XX! YorN (io -> descr.d_stat & LOCAL)); XX! XX continue; XX } XX XX=================================================================== XXRCS file: RCS/mailit.c,v XXretrieving revision 1.1 XXdiff -c -r1.1 mailit.c XX*** /tmp/,RCSt1001754 Tue Aug 20 12:17:19 1985 XX--- mailit.c Mon Aug 19 19:32:00 1985 XX*************** XX*** 2,8 XX #include "structs.h" XX XX #ifdef RCSIDENT XX! static char rcsid[] = "$Header: mailit.c,v 1.1 85/08/19 16:34:03 rs Exp $"; XX #endif RCSIDENT XX XX /* XX--- 2,8 ----- XX #include "structs.h" XX XX #ifdef RCSIDENT XX! static char rcsid[] = "$Header: mailit.c,v 1.2 85/08/19 19:31:29 rs Exp $"; XX #endif RCSIDENT XX XX /* XX*************** XX*** 20,25 XX * modified: Ray Essick December 1981. XX * modified again: Thanks to Malcolm Slaney of Purdue EE dept. XX * added the SUPERMAILER processing. May 25, 1982 XX * XX */ XX XX--- 20,27 ----- XX * modified: Ray Essick December 1981. XX * modified again: Thanks to Malcolm Slaney of Purdue EE dept. XX * added the SUPERMAILER processing. May 25, 1982 XX+ * added code to handle the MODERATED flag. XX+ * rich $alz, mirror systems, august 19, 1985 XX * XX */ XX XX*************** XX*** 41,47 XX #ifdef SUPERMAILER XX char subject[TITLEN + 20]; /* subject line for super mailer */ XX #endif XX- int i; XX FILE * txtfile; XX XX if (toauth) XX--- 43,48 ----- XX #ifdef SUPERMAILER XX char subject[TITLEN + 20]; /* subject line for super mailer */ XX #endif XX FILE * txtfile; XX XX if (io -> descr.d_stat & MODERATED) XX*************** XX*** 44,50 XX int i; XX FILE * txtfile; XX XX! if (toauth) XX { XX if (strcmp (author -> aname, "Anonymous") == 0) XX { XX--- 45,51 ----- XX #endif XX FILE * txtfile; XX XX! if (io -> descr.d_stat & MODERATED) XX { XX if (modaddress (io -> nf, whoto) == 1) XX { XX*************** XX*** 46,51 XX XX if (toauth) XX { XX if (strcmp (author -> aname, "Anonymous") == 0) XX { XX printf ("Can't send to Anonymous\n"); XX--- 47,63 ----- XX XX if (io -> descr.d_stat & MODERATED) XX { XX+ if (modaddress (io -> nf, whoto) == 1) XX+ { XX+ at (0, 1); XX+ printf ("\nComplain to a guru; can't find moderator!\007\n"); XX+ fflush (stdout); XX+ sleep (1); XX+ return (-1); /* no letter sent */ XX+ } XX+ } XX+ else if (toauth) XX+ { XX if (strcmp (author -> aname, "Anonymous") == 0) XX { XX printf ("Can't send to Anonymous\n"); XX*************** XX*** 53,62 XX sleep (1); XX return (-1); XX } XX- } XX- XX- if (toauth) XX- { XX if (strcmp (System, author -> asystem) != 0) XX { XX #ifdef USERHOST XX--- 65,70 ----- XX sleep (1); XX return (-1); XX } XX if (strcmp (System, author -> asystem) != 0) XX { XX #ifdef USERHOST XX*************** XX*** 169,172 XX #endif SUPERMAILER XX XX return 0; XX } XX--- 177,219 ----- XX #endif SUPERMAILER XX XX return 0; XX+ } XX+ XX+ modaddress (notesname, address) XX+ char *notesname; XX+ char *address; XX+ { XX+ char buff[WDLEN]; XX+ register FILE *mods; XX+ register char *p; XX+ XX+ sprintf (buff, "%s/%s/moderators", MSTDIR, UTILITY); XX+ XX+ if ((mods = fopen (buff, "r")) == NULL) XX+ { XX+ printf ("Can't open moderators file!\n"); XX+ return 1; XX+ } XX+ XX+ while (fgets ( buff, sizeof buff, mods)) XX+ { XX+ /* read lines of the form path; blanks and lines */ XX+ /* starting with "#" are comments. */ XX+ if (buff[0] == '\0' || buff[0] == '#' XX+ || (((p=index(buff, ' ')) == NULL) && (p=index(buff, '\t')) == NULL)) XX+ continue; XX+ *p++ = '\0'; /* split into halves */ XX+ while (*p == ' ' || *p == '\t') XX+ p++; /* skip whitespace */ XX+ if (!strcmp (notesname, buff)) XX+ { XX+ strcpy (address, p); XX+ address[strlen(address) - 1] = '\0'; /* kill the \n */ XX+ fclose (mods); XX+ return 0; XX+ } XX+ } XX+ XX+ fclose (mods); XX+ return 1; XX } XX=================================================================== XXRCS file: RCS/main.c,v XXretrieving revision 1.1 XXdiff -c -r1.1 main.c XX*** /tmp/,RCSt1001754 Tue Aug 20 12:17:27 1985 XX--- main.c Mon Aug 19 19:57:27 1985 XX*************** XX*** 3,9 XX #include "structs.h" XX XX #ifdef RCSIDENT XX! static char rcsid[] = "$Header: main.c,v 1.1 85/08/19 19:54:09 rs Exp $"; XX #endif RCSIDENT XX XX /* XX--- 3,9 ----- XX #include "structs.h" XX XX #ifdef RCSIDENT XX! static char rcsid[] = "$Header: main.c,v 1.2 85/08/19 19:57:11 rs Exp $"; XX #endif RCSIDENT XX XX /* XX*************** XX*** 16,21 XX * Original author: Rob Kolstad Winter, 1980. XX * Modifications: Ray Essick June, 1981. XX * Modified more: Ray Essick May, 1982. XX * XX * XX */ XX--- 16,23 ----- XX * Original author: Rob Kolstad Winter, 1980. XX * Modifications: Ray Essick June, 1981. XX * Modified more: Ray Essick May, 1982. XX+ * modified: Rich $alz July, 1985 XX+ * To add the hissig (signature file) variable. XX * XX */ XX XX*************** XX*** 17,23 XX * Modifications: Ray Essick June, 1981. XX * Modified more: Ray Essick May, 1982. XX * XX- * XX */ XX XX XX--- 19,24 ----- XX * modified: Rich $alz July, 1985 XX * To add the hissig (signature file) variable. XX * XX */ XX XX XX*************** XX*** 22,27 XX XX XX static int seqon = NOSEQ; /* sequencer mode */ XX XX main (argc, argv) XX char **argv; XX--- 23,29 ----- XX XX XX static int seqon = NOSEQ; /* sequencer mode */ XX+ char hissig[WDLEN]; /* signature file */ XX XX main (argc, argv) XX char **argv; XX*************** XX*** 60,65 XX /* XX * grab some variables from the environment XX */ XX if ((p = getenv ("SHELL")) != 0) XX hisshell = p; /* his shell */ XX if ((p = getenv ("NFED")) != 0) XX--- 62,69 ----- XX /* XX * grab some variables from the environment XX */ XX+ if ((p = getenv ("NFSIG")) != 0 && access (p, 04) >= 0) XX+ strcpy(hissig, p); /* his signature file */ XX if ((p = getenv ("SHELL")) != 0) XX hisshell = p; /* his shell */ XX if ((p = getenv ("NFED")) != 0) XX=================================================================== XXRCS file: RCS/readem.c,v XXretrieving revision 1.1 XXdiff -c -r1.1 readem.c XX*** /tmp/,RCSt1001754 Tue Aug 20 12:17:55 1985 XX--- readem.c Tue Aug 20 10:22:09 1985 XX*************** XX*** 4,10 XX #include XX XX #ifdef RCSIDENT XX! static char rcsid[] = "$Header: readem.c,v 1.1 85/08/19 16:33:49 rs Exp $"; XX #endif RCSIDENT XX XX XX--- 4,10 ----- XX #include XX XX #ifdef RCSIDENT XX! static char rcsid[] = "$Header: readem.c,v 1.3 85/08/20 10:21:11 rs Exp $"; XX #endif RCSIDENT XX XX XX*************** XX*** 19,24 XX * modified : ray essick may 22, 1981 XX * modified (again): Ray Essick December 1981 XX * modified (more): Ray Essick, February 1982 XX * XX */ XX readem (io, readnum, firstdis, resp) XX--- 19,26 ----- XX * modified : ray essick may 22, 1981 XX * modified (again): Ray Essick December 1981 XX * modified (more): Ray Essick, February 1982 XX+ * added MODERATED: Rich $alz, August 1985 XX+ * added LOCAL and YorN: Rich $alz, August 1985 XX * XX */ XX static char YES[] = "YES"; XX*************** XX*** 21,26 XX * modified (more): Ray Essick, February 1982 XX * XX */ XX readem (io, readnum, firstdis, resp) XX struct io_f *io; XX int *firstdis; XX--- 23,32 ----- XX * added LOCAL and YorN: Rich $alz, August 1985 XX * XX */ XX+ static char YES[] = "YES"; XX+ static char NO[] = "NO "; XX+ #define YorN(c) ((c) != 0 ? YES : NO) XX+ XX readem (io, readnum, firstdis, resp) XX struct io_f *io; XX int *firstdis; XX*************** XX*** 333,338 XX toauth = 0; XX wtext = 1; /* to others with text */ XX goto sendmail; XX case 'P': XX toauth = 1; XX wtext = 1; /* to author with text */ XX--- 339,345 ----- XX toauth = 0; XX wtext = 1; /* to others with text */ XX goto sendmail; XX+ /* mail to author, possibly with text. */ XX case 'P': XX case 'p': XX #ifdef NO_Pp_FOR_MODERATED XX*************** XX*** 334,342 XX wtext = 1; /* to others with text */ XX goto sendmail; XX case 'P': XX- toauth = 1; XX- wtext = 1; /* to author with text */ XX- goto sendmail; XX case 'p': XX toauth = 1; XX wtext = 0; /* to author, no text */ XX--- 341,346 ----- XX goto sendmail; XX /* mail to author, possibly with text. */ XX case 'P': XX case 'p': XX #ifdef NO_Pp_FOR_MODERATED XX /* some people may want this */ XX*************** XX*** 338,343 XX wtext = 1; /* to author with text */ XX goto sendmail; XX case 'p': XX toauth = 1; XX wtext = 0; /* to author, no text */ XX goto sendmail; XX--- 342,356 ----- XX /* mail to author, possibly with text. */ XX case 'P': XX case 'p': XX+ #ifdef NO_Pp_FOR_MODERATED XX+ /* some people may want this */ XX+ if (io -> d_descr.d_stat & MODERATED) XX+ { XX+ at (0, 10); XX+ printf ("Moderated; use 'm' or 'M' command\n"); XX+ continue; XX+ } XX+ #endif NO_Pp_FOR_MODERATED XX toauth = 1; XX wtext = c == 'P'; /* to author with text */ XX sendmail: /* jump to here once set mail parms */ XX*************** XX*** 339,347 XX goto sendmail; XX case 'p': XX toauth = 1; XX! wtext = 0; /* to author, no text */ XX! goto sendmail; XX! XX sendmail: /* jump to here once set mail parms */ XX if (resp) XX { XX--- 352,358 ----- XX } XX #endif NO_Pp_FOR_MODERATED XX toauth = 1; XX! wtext = c == 'P'; /* to author with text */ XX sendmail: /* jump to here once set mail parms */ XX if (resp) XX { XX*************** XX*** 454,462 XX if (allow (io, DRCTOK) == 0) XX { /* tell him what's up */ XX at (0, 10); XX! printf (" Anonymous: %s Networked: %s", XX! (io -> descr.d_stat & ANONOK) ? "YES" : "NO", XX! (io -> descr.d_stat & NETWRKD) ? "YES" : "NO"); XX replot = 0; /* leave on screen */ XX goto showit; XX } XX--- 465,476 ----- XX if (allow (io, DRCTOK) == 0) XX { /* tell him what's up */ XX at (0, 10); XX! printf ( XX! "Anonymous: %s Networked: %s Moderated: %s Local: %s", XX! YorN (io -> descr.d_stat & ANONOK), XX! YorN (io -> descr.d_stat & NETWRKD), XX! YorN (io -> descr.d_stat & MODERATED), XX! YorN (io -> descr.d_stat & LOCAL)); XX replot = 0; /* leave on screen */ XX goto showit; XX } XX*************** XX*** 527,532 XX case 'W': /* write a response with the text */ XX case 'w': /* let him write a response */ XX getdscr (io, &io -> descr); /* get up to date */ XX if (allow (io, RESPOK) == 0) XX { XX at (0, 10); XX--- 541,553 ----- XX case 'W': /* write a response with the text */ XX case 'w': /* let him write a response */ XX getdscr (io, &io -> descr); /* get up to date */ XX+ XX+ if (io -> descr.d_stat & MODERATED) XX+ { XX+ wtext = c == 'W'; /* don't care about toauth */ XX+ goto sendmail; XX+ } XX+ XX if (allow (io, RESPOK) == 0) XX { XX at (0, 10); XX=================================================================== XXRCS file: RCS/structs.h,v XXretrieving revision 1.1 XXdiff -c -r1.1 structs.h XX*** /tmp/,RCSt1001754 Tue Aug 20 12:18:12 1985 XX--- structs.h Tue Aug 20 10:27:02 1985 XX*************** XX*** 1,7 XX #include XX XX #if defined(RCSIDENT) && defined(MAINLINE) XX! static char zzstructs[] = "$Header: structs.h,v 1.1 85/08/19 16:04:13 rs Exp $"; XX #endif defined(RCSIDENT) && defined(MAINLINE) XX XX /* XX--- 1,7 ----- XX #include XX XX #if defined(RCSIDENT) && defined(MAINLINE) XX! static char zzstructs[] = "$Header: structs.h,v 1.7 85/08/20 10:25:43 rs Exp $"; XX #endif defined(RCSIDENT) && defined(MAINLINE) XX XX /* XX*************** XX*** 105,110 XX #define WRITONLY 0100 /* writeonly access when written */ XX #define ORPHND 0200 /* foster parent */ XX #define ISARCH 0400 /* is an archive */ XX XX /* change these only after modifying the table in access.c */ XX #define READOK 01 /* allow user to read */ XX--- 105,112 ----- XX #define WRITONLY 0100 /* writeonly access when written */ XX #define ORPHND 0200 /* foster parent */ XX #define ISARCH 0400 /* is an archive */ XX+ #define MODERATED 01000 /* mail to moderator */ XX+ #define LOCAL 02000 /* no signature */ XX XX /* change these only after modifying the table in access.c */ XX #define READOK 01 /* allow user to read */ @//E*O*F DIFFS// chmod u=rw,g=rw,o=rw DIFFS echo Inspecting for damage in transit... temp=/tmp/shar$$; dtemp=/tmp/.shar$$ trap "rm -f $temp $dtemp; exit" 0 1 2 3 15 cat > $temp <<\!!! 1165 4297 28165 DIFFS !!! wc DIFFS | sed 's=[^ ]*/==' | diff -b $temp - >$dtemp if [ -s $dtemp ] then echo "Ouch [diff of wc output]:" ; cat $dtemp else echo "No problems found." fi exit 0