]> code.citadel.org Git - citadel.git/blobdiff - citadel/msgbase.c
* Eliminate EVT_OUTPUTMSG server extensions (don't need them anymore)
[citadel.git] / citadel / msgbase.c
index b2f6f422801594d64468e61a2de85e6a237b3e50..75146cfd0e66421c1e0f8f476f1025b36272bfb6 100644 (file)
@@ -1186,7 +1186,6 @@ int CtdlOutputPreLoadedMsg(struct CtdlMessage *TheMessage,
                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_ANONONLY) {
                                strcpy(display_name, "****");
                        }
@@ -1316,8 +1315,6 @@ int CtdlOutputPreLoadedMsg(struct CtdlMessage *TheMessage,
                }
                cprintf(">%s", nl);
 
-               PerformUserHooks(luser, (-1L), EVT_OUTPUTMSG);
-
                if (!is_room_aide() && (TheMessage->cm_anon_type == MES_ANONONLY)) {
                        cprintf("From: x@x.org (----)%s", nl);
                }
@@ -1922,20 +1919,6 @@ long CtdlSubmitMsg(struct CtdlMessage *msg,      /* message to save */
                msg->cm_fields['T'] = strdoop(aaa);
        }
 
-       /*
-        * If no Author, set it to ME ME ME
-        */
-       if (msg->cm_fields['A'] == NULL) {
-               msg->cm_fields['A'] = strdoop(CC->user.fullname);
-       }
-
-       /*
-        * If no Node, set it to the local node
-        */
-       if (msg->cm_fields['N'] == NULL) {
-               msg->cm_fields['N'] = strdoop(config.c_nodename);
-       }
-
        /* If this message has no path, we generate one.
         */
        if (msg->cm_fields['P'] == NULL) {
@@ -2944,6 +2927,7 @@ void cmd_move(char *args)
        struct ctdlroom qtemp;
        int err;
        int is_copy = 0;
+       int ra;
 
        num = extract_long(args, 0);
        extract(targ, args, 1);
@@ -2956,16 +2940,19 @@ void cmd_move(char *args)
        }
 
        getuser(&CC->user, CC->curr_user);
+       ra = CtdlRoomAccess(&qtemp, &CC->user);
        /* Aides can move/copy */
        if ((CC->user.axlevel < 6)
            /* Roomaides can move/copy */
            && (CC->user.usernum != CC->room.QRroomaide)
-           /* Permit move/copy to/from personal rooms */
+           /* Permit move/copy from personal rooms */
            && (!((CC->room.QRflags & QR_MAILBOX)
                            && (qtemp.QRflags & QR_MAILBOX)))
            /* Permit only copy from public to personal room */
-           && (!(is_copy && !(CC->room.QRflags & QR_MAILBOX)
-                           && (qtemp.QRflags & QR_MAILBOX)))) {
+           && (!(is_copy && (CC->room.QRflags & QR_MAILBOX)
+                           || (qtemp.QRflags & QR_MAILBOX)))
+           /* User must have access to target room */
+           && !((ra & UA_KNOWN))) {
                cprintf("%d Higher access required.\n",
                        ERROR + HIGHER_ACCESS_REQUIRED);
                return;