]> code.citadel.org Git - citadel.git/commitdiff
* Added a floor listing (complete with \NoSelect flag) to LIST and LSUB
authorArt Cancro <ajc@citadel.org>
Tue, 6 Feb 2001 04:44:12 +0000 (04:44 +0000)
committerArt Cancro <ajc@citadel.org>
Tue, 6 Feb 2001 04:44:12 +0000 (04:44 +0000)
citadel/ChangeLog
citadel/serv_imap.c

index 1469ac3523bd7bb98fafa10d2648bcc91e63f677..1db0c9a99fb58d4508d2c8c4cb741c51bb80cf1a 100644 (file)
@@ -1,4 +1,7 @@
  $Log$
+ Revision 573.85  2001/02/06 04:44:12  ajc
+ * Added a floor listing (complete with \NoSelect flag) to LIST and LSUB
+
  Revision 573.84  2001/02/06 02:09:38  ajc
  * citadel.rc: changed the default for local_screen_dimensions to 1, since
    Internet users now outnumber dialup users 100 to 0.
@@ -2384,4 +2387,3 @@ 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 ff344aa969b450ceda361b6d1ed3284986e04223..daffc1fd551eaeef5836fb6bfe247e792215e2ee 100644 (file)
@@ -322,6 +322,24 @@ void imap_close(int num_parms, char *parms[]) {
 
 
 
+/*
+ * Used by LIST and LSUB to show the floors in the listing
+ */
+void imap_list_floors(char *cmd) {
+       int i;
+       struct floor *fl;
+
+       for (i=0; i<MAXFLOORS; ++i) {
+               fl = cgetfloor(i);
+               if (fl->f_flags & F_INUSE) {
+                       cprintf("* %s (\\NoSelect) \"|\" ", cmd);
+                       imap_strout(fl->f_name);
+                       cprintf("\r\n");
+               }
+       }
+}
+
+
 
 /*
  * Back end for imap_lsub()
@@ -350,6 +368,7 @@ void imap_lsub_listroom(struct quickroom *qrbuf, void *data) {
  * FIXME: Handle wildcards, please.
  */
 void imap_lsub(int num_parms, char *parms[]) {
+       imap_list_floors("LSUB");
        ForEachRoom(imap_lsub_listroom, NULL);
        cprintf("%s OK LSUB completed\r\n", parms[0]);
 }
@@ -381,6 +400,7 @@ void imap_list_listroom(struct quickroom *qrbuf, void *data) {
  * FIXME: Handle wildcards, please.
  */
 void imap_list(int num_parms, char *parms[]) {
+       imap_list_floors("LIST");
        ForEachRoom(imap_list_listroom, NULL);
        cprintf("%s OK LIST completed\r\n", parms[0]);
 }