]> code.citadel.org Git - citadel.git/blobdiff - citadel/msgbase.c
* citserver.c, msgbase.c, user_ops.c: hide the owner-prefix of mail
[citadel.git] / citadel / msgbase.c
index c683a6bdf3637a9eb9c36c6e67e504646374a8d4..e1322aeaa00fea8a5ce5aa6d96873ced919bf48a 100644 (file)
@@ -1,3 +1,4 @@
+/* $Id$ */
 #include <stdlib.h>
 #include <unistd.h>
 #include <stdio.h>
@@ -730,6 +731,7 @@ void save_message(char *mtmp,       /* file containing proper message */
        strcpy(actual_rm, CC->quickroom.QRname);
        strcpy(hold_rm, "");
        strcpy(recipient, rec);
+       strproc(recipient);
 
        /* If the user is a twit, move to the twit room for posting... */
        if (TWITDETECT) if (CC->usersupp.axlevel==2) {
@@ -757,7 +759,6 @@ void save_message(char *mtmp,       /* file containing proper message */
                strcpy(actual_rm, AIDEROOM);
                }
 
-
        /* This call to usergoto() changes rooms if necessary.  It also
         * causes the latest message list to be read into memory.
         */
@@ -766,6 +767,11 @@ void save_message(char *mtmp,      /* file containing proper message */
        /* read in the quickroom record, obtaining a lock... */
        lgetroom(&CC->quickroom, actual_rm);
 
+       /* Fix an obscure bug */
+       if (!strcasecmp(CC->quickroom.QRname, AIDEROOM)) {
+               CC->quickroom.QRflags = CC->quickroom.QRflags & ~QR_MAILBOX;
+               }
+
        /* Add the message pointer to the room */
        AddMessageToRoom(&CC->quickroom, newmsgid);
 
@@ -842,6 +848,7 @@ void make_message(
        /* Don't confuse the poor folks if it's not routed mail. */
        strcpy(dest_node, "");
 
+
        /* If net_type is M_BINARY, split out the destination node. */
        if (net_type == M_BINARY) {
                strcpy(dest_node,NODENAME);
@@ -872,7 +879,14 @@ void make_message(
           fprintf(fp,"A%s%c",fake_name,0);
        else
           fprintf(fp,"A%s%c",author->fullname,0);      /* author */
-       fprintf(fp,"O%s%c",CC->quickroom.QRname,0);     /* room */
+
+       if (CC->quickroom.QRflags & QR_MAILBOX) {       /* room */
+               fprintf(fp,"O%s%c", &CC->quickroom.QRname[11], 0);
+               }
+       else {
+               fprintf(fp,"O%s%c",CC->quickroom.QRname,0);
+               }
+
        fprintf(fp,"N%s%c",NODENAME,0);                 /* nodename */
        fprintf(fp,"H%s%c",HUMANNODE,0);                /* human nodename */