]> code.citadel.org Git - citadel.git/commitdiff
* Allow users to move/copy messages between personal rooms
authorMichael Hampton <io_error@uncensored.citadel.org>
Fri, 11 Jan 2002 15:46:57 +0000 (15:46 +0000)
committerMichael Hampton <io_error@uncensored.citadel.org>
Fri, 11 Jan 2002 15:46:57 +0000 (15:46 +0000)
citadel/ChangeLog
citadel/messages.c
citadel/msgbase.c

index d684d783ddb9cec3d540c15972e8536d34a2ea15..2674d168bb1f9df7fd4d8be1add84a9417bec53e 100644 (file)
@@ -1,4 +1,7 @@
  $Log$
+ Revision 590.57  2002/01/11 15:46:57  error
+ * Allow users to move/copy messages between personal rooms
+
  Revision 590.56  2002/01/11 04:59:00  ajc
  * Finished most of the work for the Global Address Book.
 
@@ -3136,3 +3139,4 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
        * Initial CVS import 
+
index 5d1b0bf03c875aa9f0e8c8eedf74c5802af84e2b..0aae4e715ad323484f81dc93c1dab70b5e6e9335 100644 (file)
@@ -1222,8 +1222,7 @@ RMSGREAD: fflush(stdout);
                                    if ((!is_room_aide)
                                        && ((room_flags & QR_MAILBOX) ==
                                            0)) {
-                                       if ((e == 'd') || (e == 'm')
-                                           || (e == 'c'))
+                                       if ((e == 'd') || (e == 'm'))
                                                e = 0;
                                }
 /* print only if available */
@@ -1309,9 +1308,8 @@ RMSGREAD: fflush(stdout);
                                printf(" D  Delete this message\n");
                                printf
                                    (" M  Move message to another room\n");
-                               printf
-                                   (" C  Copy message to another room\n");
                        }
+                       printf(" C  Copy message to another room\n");
                        if (strlen(printcmd) > 0)
                                printf(" P  Print this message\n");
                        printf
index 3996618a83a171dab058ce764d0152fa9730f81d..47b3a6fa854a09423fbcdb15887017d98dc9c0ba 100644 (file)
@@ -2574,19 +2574,27 @@ void cmd_move(char *args)
        targ[ROOMNAMELEN - 1] = 0;
        is_copy = extract_int(args, 2);
 
+       if (getroom(&qtemp, targ) != 0) {
+               cprintf("%d '%s' does not exist.\n", ERROR, targ);
+               return;
+       }
+
        getuser(&CC->usersupp, CC->curr_user);
+       /* Aides can move/copy */
        if ((CC->usersupp.axlevel < 6)
-           && (CC->usersupp.usernum != CC->quickroom.QRroomaide)) {
+           /* Roomaides can move/copy */
+           && (CC->usersupp.usernum != CC->quickroom.QRroomaide)
+           /* Permit move/copy to/from personal rooms */
+           && (!((CC->quickroom.QRflags & QR_MAILBOX)
+                           && (qtemp.QRflags & QR_MAILBOX)))
+           /* Permit only copy from public to personal room */
+           && (!(is_copy && !(CC->quickroom.QRflags & QR_MAILBOX)
+                           && (qtemp.QRflags & QR_MAILBOX)))) {
                cprintf("%d Higher access required.\n",
                        ERROR + HIGHER_ACCESS_REQUIRED);
                return;
        }
 
-       if (getroom(&qtemp, targ) != 0) {
-               cprintf("%d '%s' does not exist.\n", ERROR, targ);
-               return;
-       }
-
        err = CtdlCopyMsgToRoom(num, targ);
        if (err != 0) {
                cprintf("%d Cannot store message in %s: error %d\n",