$Log$
+Revision 1.384 1999/10/14 03:04:16 ajc
+* Finished the netproc side of Z (zap/supersede) processing for replication
+
Revision 1.383 1999/10/13 04:24:18 ajc
* Added search-by-header-fields to CtdlForEachMessage(), and then to the
server MSGS command. This will have lots of uses.
Fri Jul 10 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
* Initial CVS import
-
"path",
"",
"rcpt",
- ""
+ "",
"time",
"subj",
"",
time_t xtime;
CIT_UBYTE ch;
char allkeys[256];
+ char display_name[256];
struct CtdlMessage *TheMessage = NULL;
if ((mode == MT_CITADEL) || (mode == MT_MIME)) {
+ strcpy(display_name, "<unknown>");
if (TheMessage->cm_fields['A']) {
strcpy(buf, TheMessage->cm_fields['A']);
PerformUserHooks(buf, (-1L), EVT_OUTPUTMSG);
if (TheMessage->cm_anon_type == MES_ANON)
- cprintf("from=****");
+ strcpy(display_name, "****");
else if (TheMessage->cm_anon_type == MES_AN2)
- cprintf("from=anonymous");
+ strcpy(display_name, "anonymous");
else
- cprintf("from=%s", buf);
+ strcpy(display_name, buf);
if ((is_room_aide())
&& ((TheMessage->cm_anon_type == MES_ANON)
|| (TheMessage->cm_anon_type == MES_AN2))) {
- cprintf(" [%s]", buf);
+ sprintf(&display_name[strlen(display_name)],
+ " [%s]", buf);
}
- cprintf("\n");
}
strcpy(allkeys, FORDER);
for (i=0; i<strlen(allkeys); ++i) {
k = (int) allkeys[i];
- if ((k != 'A') && (k != 'M')) {
- if (TheMessage->cm_fields[k] != NULL)
- cprintf("%s=%s\n",
- msgkeys[k],
- TheMessage->cm_fields[k]
+ if (k != 'M') {
+ if (TheMessage->cm_fields[k] != NULL) {
+ if (k == 'A') {
+ cprintf("%s=%s\n",
+ msgkeys[k],
+ display_name);
+ }
+ else {
+ cprintf("%s=%s\n",
+ msgkeys[k],
+ TheMessage->cm_fields[k]
);
+ }
+ }
}
}
getuser(&CC->usersupp, CC->curr_user);
if ((CC->usersupp.axlevel < 6)
&& (CC->usersupp.usernum != CC->quickroom.QRroomaide)
- && ((CC->quickroom.QRflags & QR_MAILBOX) == 0)) {
+ && ((CC->quickroom.QRflags & QR_MAILBOX) == 0)
+ && (!(CC->internal_pgm))) {
cprintf("%d Higher access required.\n",
ERROR + HIGHER_ACCESS_REQUIRED);
return;
char room[256];
char id[256];
char node[256];
+ long localzap = 0L;
+ int numzap = 0;
zaplist = fopen(ZAPLIST, "r");
if (zaplist == NULL) {
/* And only do the zap if we succeeded */
if (!strcasecmp(curr_rm, room)) {
-
-
-
- /* FIX not finished */
-
-
+
+ serv_puts("MSGS ALL|0|1");
+ serv_gets(buf);
+ if (buf[0]=='1') {
+ /* This is bogus, flush and go away */
+ while (serv_gets(buf), strcmp(buf, "000")) ;
+ }
+ else if (buf[0]=='8') {
+ sprintf(buf, "msgn|%s\nnode|%s\n000",
+ id, node);
+ serv_puts(buf);
+ numzap = 0;
+ while (serv_gets(buf), strcmp(buf, "000")) {
+ localzap = atol(buf);
+ ++numzap;
+ }
+ }
+
+ if (numzap > 0) {
+ sprintf(buf, "DELE %ld", localzap);
+ serv_puts(buf);
+ serv_gets(buf);
+ if (buf[0] != '2') {
+ syslog(LOG_ERR, "%s", buf);
+ }
+ }
+ if (numzap > 1) {
+ syslog(LOG_ERR, "Multiple messages are <%s@%s>",
+ id, node);
+ }
+
}
-
}
-
fclose(zaplist);
-
+ unlink(ZAPLIST);
}
-internet
-uum %s
-humannode Internet Gateway
-lastcontact 935635336 Wed Aug 25 22:42:16 1999
+test
+bin Mail
uncnsrd
bin Mail
-phonenum US 800 555 1212
-humannode My System
-lastcontact 935635337 Wed Aug 25 22:42:17 1999
+phonenum US 914 244 3252
+humannode Uncensored
+lastcontact 939870141 Wed Oct 13 23:02:21 1999
+
+internet
+uum %s
+humannode Internet Gateway
+lastcontact 939870141 Wed Oct 13 23:02:21 1999
-test
-bin Mail