]> code.citadel.org Git - citadel.git/commitdiff
Don't use imap_strout() for ACL bits. Technically this
authorArt Cancro <ajc@citadel.org>
Wed, 24 Jan 2007 17:29:28 +0000 (17:29 +0000)
committerArt Cancro <ajc@citadel.org>
Wed, 24 Jan 2007 17:29:28 +0000 (17:29 +0000)
is legal IMAP syntax, but since no other servers ever display quotes, it's
probably going to blow up some clients out there.

citadel/imap_acl.c

index 10ef0baad65c1cb5fe826a938b804829e86d96c6..8b3e465c27cafa4c7196434027325f0037aa9b53 100644 (file)
@@ -234,21 +234,17 @@ void imap_myrights(int num_parms, char *parms[]) {
        }
        usergoto(roomname, 0, 0, &msgs, &new);
 
-       cprintf("* MYRIGHTS ");
-       imap_strout(parms[2]);
-       cprintf(" ");
-
        CtdlRoomAccess(&CC->room, &CC->user, &ra, NULL);
        imap_acl_flags(rights, ra);
-       imap_strout(rights);
 
-       cprintf("\r\n");
+       cprintf("* MYRIGHTS ");
+       imap_strout(parms[2]);
+       cprintf(" %s\r\n", rights);
 
        /*
-        * If another folder is selected, go back to that room so we can resume
-        * our happy day without violent explosions.
+        * If a different folder was previously selected, return there now.
         */
-       if (IMAP->selected) {
+       if ( (IMAP->selected) && (strcasecmp(roomname, savedroom)) ) {
                usergoto(savedroom, 0, 0, &msgs, &new);
        }