]> code.citadel.org Git - citadel.git/blobdiff - citadel/modules/imap/serv_imap.c
More verbose logging for get_default_icaltimezone() when it
[citadel.git] / citadel / modules / imap / serv_imap.c
index 31b3e5c96fb9cad2f3c677e48a3892064c2c7902..d931ca144920ec7cbb1d248a3e26145e4a0d6bad 100644 (file)
@@ -1234,6 +1234,7 @@ void imap_rename(int num_parms, char *parms[])
        struct irl *irl = NULL; /* the list */
        struct irl *irlp = NULL;        /* scratch pointer */
        struct irlparms irlparms;
+       char buf[1024];
 
        if (strchr(parms[3], '\\') != NULL) {
                cprintf("%s NO Invalid character in folder name\r\n",
@@ -1253,20 +1254,20 @@ void imap_rename(int num_parms, char *parms[])
                return;
        }
        if (r == crr_already_exists) {
-               cprintf("%s '%s' already exists.\r\n", parms[0], parms[2]);
+               cprintf("%s NO '%s' already exists.\r\n", parms[0], parms[2]);
                return;
        }
        if (r == crr_noneditable) {
-               cprintf("%s This folder is not editable.\r\n", parms[0]);
+               cprintf("%s NO This folder is not editable.\r\n", parms[0]);
                return;
        }
        if (r == crr_invalid_floor) {
-               cprintf("%s Folder root does not exist.\r\n", parms[0]);
+               cprintf("%s NO Folder root does not exist.\r\n", parms[0]);
                return;
        }
        if (r == crr_access_denied) {
-               cprintf("%s You do not have permission to edit "
-                       "this folder.\r\n", parms[0]);
+               cprintf("%s NO You do not have permission to edit this folder.\r\n",
+                       parms[0]);
                return;
        }
        if (r != crr_ok) {
@@ -1275,7 +1276,6 @@ void imap_rename(int num_parms, char *parms[])
                return;
        }
 
-
        /* If this is the INBOX, then RFC2060 says we have to just move the
         * contents.  In a Citadel environment it's easier to rename the room
         * (already did that) and create a new inbox.
@@ -1306,6 +1306,13 @@ void imap_rename(int num_parms, char *parms[])
                }
        }
 
+       snprintf(buf, sizeof buf, "IMAP folder \"%s\" renamed to \"%s\" by %s\n",
+               parms[2],
+               parms[3],
+               CC->curr_user
+       );
+       aide_message(buf, "IMAP folder rename");
+
        cprintf("%s OK RENAME completed\r\n", parms[0]);
 }
 
@@ -1370,19 +1377,24 @@ void imap_command_loop(void)
                return;
        }
 
-       /* Ok, at this point we're in normal command mode.  The first thing
-        * we do is print any incoming pages (yeah! we really do!)
-        */
-       imap_print_instant_messages();
 
-       /*
-        * Before processing the command that was just entered... if we happen
-        * to have a folder selected, we'd like to rescan that folder for new
-        * messages, and for deletions/changes of existing messages.  This
-        * could probably be optimized somehow, but IMAP sucks...
+       /* Ok, at this point we're in normal command mode.
+        * If the command just submitted does not contain a literal, we
+        * might think about delivering some untagged stuff...
         */
-       if (IMAP->selected) {
-               imap_rescan_msgids();
+       if (cmdbuf[strlen(cmdbuf)-1] != '}') {
+
+               imap_print_instant_messages();
+       
+               /*
+                * Before processing the command that was just entered... if we happen
+                * to have a folder selected, we'd like to rescan that folder for new
+                * messages, and for deletions/changes of existing messages.  This
+                * could probably be optimized somehow, but IMAP sucks...
+                */
+               if (IMAP->selected) {
+                       imap_rescan_msgids();
+               }
        }
 
        /* Now for the command set. */