]> code.citadel.org Git - citadel.git/commitdiff
* Fixed namespace problems resulting from the automatic namespece prefixing
authorArt Cancro <ajc@citadel.org>
Thu, 8 Feb 2001 04:46:00 +0000 (04:46 +0000)
committerArt Cancro <ajc@citadel.org>
Thu, 8 Feb 2001 04:46:00 +0000 (04:46 +0000)
  added to create_room().  Also added the ability to specify "create a mailbox
  but I've already supplied the namespace prefix" for situations where the
  namespace isn't that of the logged in user.
* Made the POP3 server response messages slightly less humorous

citadel/ChangeLog
citadel/msgbase.c
citadel/room_ops.c
citadel/serv_ical.c
citadel/serv_pop3.c
citadel/techdoc/citadelapi.txt
citadel/user_ops.c

index 1db0c9a99fb58d4508d2c8c4cb741c51bb80cf1a..fdf06a1a4181f5e5ab293ae2a32089097e80b9b0 100644 (file)
@@ -1,4 +1,11 @@
  $Log$
+ Revision 573.86  2001/02/08 04:45:58  ajc
+ * Fixed namespace problems resulting from the automatic namespece prefixing
+   added to create_room().  Also added the ability to specify "create a mailbox
+   but I've already supplied the namespace prefix" for situations where the
+   namespace isn't that of the logged in user.
+ * Made the POP3 server response messages slightly less humorous
+
  Revision 573.85  2001/02/06 04:44:12  ajc
  * Added a floor listing (complete with \NoSelect flag) to LIST and LSUB
 
@@ -2387,3 +2394,4 @@ 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 5addba6406e7255a222fae9a4ab4170455f367dc..b2e8ced832e3a02314ed02429665bba30e3d1db0 100644 (file)
@@ -2561,7 +2561,7 @@ void CtdlWriteObject(char *req_room,              /* Room to stuff it in */
        /* Create the requested room if we have to. */
        if (getroom(&qrbuf, roomname) != 0) {
                create_room(roomname, 
-                       ( (is_mailbox != NULL) ? 4 : 3 ),
+                       ( (is_mailbox != NULL) ? 5 : 3 ),
                        "", 0, 1);
        }
        /* If the caller specified this object as unique, delete all
index f3598b4e98b28bdff269cdb6bba6ad09e5e23bd0..d7ba6a6e54c162de36945686600ffa4cf193e863 100644 (file)
@@ -1223,7 +1223,8 @@ void cmd_kill(char *argbuf)
 /*
  * Internal code to create a new room (returns room flags)
  *
- * Room types:  0=public, 1=guessname, 2=passworded, 3=inv-only, 4=mailbox
+ * Room types:  0=public, 1=guessname, 2=passworded, 3=inv-only,
+ *              4=mailbox, 5=mailbox, but caller supplies namespace
  */
 unsigned create_room(char *new_room_name,
                     int new_room_type,
@@ -1252,7 +1253,7 @@ unsigned create_room(char *new_room_name,
                qrbuf.QRflags = (qrbuf.QRflags | QR_GUESSNAME);
        if (new_room_type == 2)
                qrbuf.QRflags = (qrbuf.QRflags | QR_PASSWORDED);
-       if (new_room_type == 4)
+       if ( (new_room_type == 4) || (new_room_type == 5) )
                qrbuf.QRflags = (qrbuf.QRflags | QR_MAILBOX);
 
        /* If the user is requesting a personal room, set up the room
index d854702ce36c8c0a8d15195dbd18762e114a1ea3..c500175e5582691d799ebf22ecc9f80af2c3828a 100644 (file)
@@ -49,8 +49,7 @@ void ical_create_room(void)
        struct quickroom qr;
 
        /* Create the room if it doesn't already exist */
-       MailboxName(roomname, &CC->usersupp, USERCALENDARROOM);
-       create_room(roomname, 4, "", 0, 1);
+       create_room(USERCALENDARROOM, 4, "", 0, 1);
        /* Set expiration policy to manual; otherwise objects will be lost! */
        if (lgetroom(&qr, roomname)) {
                lprintf(3, "Couldn't get the user calendar room!\n");
index b658e3edd75b1e1b669a89a9297feae376ea5ab0..a25211fd06502e82052b8f26e4b86fb5e2ce9740 100644 (file)
@@ -89,7 +89,7 @@ void pop3_greeting(void) {
        POP3->msgs = NULL;
        POP3->num_msgs = 0;
 
-       cprintf("+OK Welcome to the Citadel/UX POP3 server %s\r\n",
+       cprintf("+OK Citadel/UX POP3 server %s\r\n",
                CC->cs_nonce, config.c_fqdn);
 }
 
@@ -236,7 +236,7 @@ void pop3_apop(char *argbuf)
    }
    else
    {
-       cprintf("-ERR That is NOT the password!  Go away!\r\n");
+       cprintf("-ERR That is NOT the password.\r\n");
    }
 }
 
@@ -255,7 +255,7 @@ void pop3_pass(char *argbuf) {
                pop3_login();
        }
        else {
-               cprintf("-ERR That is NOT the password!  Go away!\r\n");
+               cprintf("-ERR That is NOT the password.\r\n");
        }
 }
 
@@ -344,7 +344,7 @@ void pop3_retr(char *argbuf) {
                return;
        }
 
-       cprintf("+OK Whoop, there it is:\r\n");
+       cprintf("+OK Message %d:\r\n", which_one);
        bytes_remaining = POP3->msgs[which_one -1].rfc822_length;
        rewind(POP3->msgs[which_one - 1].temp);
        while (bytes_remaining-- > 0) {
@@ -381,7 +381,7 @@ void pop3_top(char *argbuf) {
                return;
        }
 
-       cprintf("+OK Whoop, there it is:\r\n");
+       cprintf("+OK Message %d:\r\n", which_one);
        rewind(POP3->msgs[which_one - 1].temp);
        while (ptr = fgets(buf, sizeof buf, POP3->msgs[which_one - 1].temp),
              ( (ptr!=NULL) && (done == 0))) {
@@ -416,7 +416,7 @@ void pop3_dele(char *argbuf) {
 
        /* Flag the message as deleted.  Will expunge during QUIT command. */
        POP3->msgs[which_one - 1].deleted = 1;
-       cprintf("+OK Message %d disappears in a cloud of orange smoke.\r\n",
+       cprintf("+OK Message %d deleted.\r\n",
                which_one);
 }
 
@@ -460,7 +460,7 @@ void pop3_rset(char *argbuf) {
                        POP3->msgs[i].deleted = 0;
                }
        }
-       cprintf("+OK all that has come to pass, has now gone away.\r\n");
+       cprintf("+OK Reset completed.\r\n");
 }
 
 
@@ -538,7 +538,7 @@ void pop3_command_loop(void) {
        while (strlen(cmdbuf) < 5) strcat(cmdbuf, " ");
 
        if (!strncasecmp(cmdbuf, "NOOP", 4)) {
-               cprintf("+OK This command successfully did nothing.\r\n");
+               cprintf("+OK No operation.\r\n");
        }
 
        else if (!strncasecmp(cmdbuf, "QUIT", 4)) {
@@ -598,7 +598,7 @@ void pop3_command_loop(void) {
        }
 
        else {
-               cprintf("500 I'm afraid I can't do that, Dave.\r\n");
+               cprintf("500 I'm afraid I can't do that.\r\n");
        }
 
 }
index 2a810bff14046023aa7a39a297a561e0474ce553..b82d85e28583d3e69872957b75a8bcd5ec86f939 100644 (file)
@@ -180,19 +180,26 @@ unsigned create_room(char *new_room_name,
                      char *new_room_pass,
                      int new_room_floor,
                     int really_create)
-
  This function is used to create a new room.  new_room_name should be set to
-the desired name for the new room.  new_room_type should be set to 0 for a
-public room, 1 for a guessname room, 2 for a passworded room, 3 for an
-invitation-only room, or 4 for a personal room (a mailbox).  If the room is
-a type 2 (passworded) room, new_room_pass should be set to the desired
-password.  new_room_floor should be set to the number of the floor upon which
-the new room should reside.
+the desired name for the new room.
+  
+ new_room_type should be set to one of the following values:
+       0 = public room
+       1 = guess-name room
+       2 = passworded room
+       3 = invitation-only room
+       4 = personal (mailbox) room
+       5 = personal (mailbox) room, and new_room_name already contains
+           the namespace prefix (use with caution!)
+ new_room_pass should be set to the desired password for the room (obviously
+this is only valid for passworded rooms).
  
  If the room is really to be created, set really_create to 1.  Otherwise, the
 caller may merely check to see if it's possible to create the room without
 actually creating it by setting really_create to 0.
+  
  create_room() returns the flags associated with the new room (as in the
 data structure item quickroom.QRflags).  If the room cannot be created (for
 example, a room with the name already exists), it returns 0.
index 7d86b2c052420b34f0348d60ac4af0e20281adef..03991774465d6fc8ee178ea6750df446f2e875ca 100644 (file)
@@ -624,7 +624,6 @@ int create_user(char *newusername)
        int a;
        struct passwd *p = NULL;
        char username[64];
-       char mailboxname[ROOMNAMELEN];
 
        strcpy(username, newusername);
        strproc(username);
@@ -674,8 +673,7 @@ int create_user(char *newusername)
                return (ERROR + INTERNAL_ERROR);
        }
        /* give the user a private mailbox */
-       MailboxName(mailboxname, &CC->usersupp, MAILROOM);
-       create_room(mailboxname, 4, "", 0, 1);
+       create_room(MAILROOM, 4, "", 0, 1);
 
        rec_log(CL_NEWUSER, CC->curr_user);
        return (0);