* cmd_move() now fails with a server error message when attempting to move or copy...
authorArt Cancro <ajc@citadel.org>
Thu, 4 Jun 2009 19:07:08 +0000 (19:07 +0000)
committerArt Cancro <ajc@citadel.org>
Thu, 4 Jun 2009 19:07:08 +0000 (19:07 +0000)
citadel/msgbase.c

index 9e399fd99825d6c2d95d1a5946e1114b8d8e2a8e..31c5ae9b72068e8551885a8e8a0b33a8a68f18d9 100644 (file)
@@ -4209,8 +4209,12 @@ void cmd_move(char *args)
        is_copy = extract_int(args, 2);
 
        if (getroom(&qtemp, targ) != 0) {
-               cprintf("%d '%s' does not exist.\n",
-                       ERROR + ROOM_NOT_FOUND, targ);
+               cprintf("%d '%s' does not exist.\n", ERROR + ROOM_NOT_FOUND, targ);
+               return;
+       }
+
+       if (!strcasecmp(qtemp.QRname, CC->room.QRname)) {
+               cprintf("%d Source and target rooms are the same.\n", ERROR + ALREADY_EXISTS);
                return;
        }