$Log$
+ Revision 591.6 2002/04/10 03:58:40 ajc
+ * Began work on IMAP RENAME
+
Revision 591.5 2002/04/09 14:26:43 ajc
* Allow INBOX to have subfolders. There's no longer any reason not to.
Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
* Initial CVS import
+
+
/*
- * Implements the RENAME command
+ * Implements the RENAME command (FIXME, finish implementing this)
*
*/
void imap_rename(int num_parms, char *parms[]) {
- cprintf("%s NO The RENAME command is not yet implemented (FIXME)\r\n",
- parms[0]);
+ char oldroom[ROOMNAMELEN];
+ char newroom[ROOMNAMELEN];
+ struct quickroom qrbuf;
+ int oldr, newr;
+
+ oldr = imap_roomname(oldroom, sizeof oldroom, parms[2]);
+ newr = imap_roomname(newroom, sizeof newroom, parms[3]);
+
+ if (getroom(&qrbuf, oldroom) != 0) {
+ cprintf("%s NO folder not found\r\n", parms[0]);
+ return;
+ }
+
+ if (getroom(&qrbuf, newroom) == 0) {
+ cprintf("%s NO name already in use\r\n", parms[0]);
+ return;
+ }
+
+ cprintf("%s NO RENAME FIXME\r\n", parms[0]);
+ /* cprintf("%s OK RENAME completed\r\n", parms[0]); */
}
+
/*
* Main command loop for IMAP sessions.
*/