]> code.citadel.org Git - citadel.git/commitdiff
Commented some of the code that will need to be changed.
authorArt Cancro <ajc@citadel.org>
Tue, 29 Sep 1998 14:24:24 +0000 (14:24 +0000)
committerArt Cancro <ajc@citadel.org>
Tue, 29 Sep 1998 14:24:24 +0000 (14:24 +0000)
citadel/msgbase.c
citadel/room_ops.c
citadel/user_ops.c

index 9df77031a346aa775dfab3d4c879b8466b8326f3..076eee5e25bf7509748c419cb8690ed83b0b7038 100644 (file)
@@ -649,7 +649,9 @@ long send_message(char *message_in_memory,  /* pointer to buffer */
 
 
 
-
+/* FIX ... rewrite this to simply check for the existence of the twitroom,
+ * and create it if necessary.  No slot-numbers will need to be loaded.
+ */
 void loadtroom(void) {
        struct quickroom qrbuf;
        int a;
@@ -1220,7 +1222,7 @@ void cmd_dele(char *delstr)
 
 
 /*
- * move a message to another room
+ * move a message to another room    FIX  Rework this to use name indices
  */
 void cmd_move(char *args)
 {
index 33a9ceff9baa95349499dcb5d3eaad143612e10e..908fc802aa3f390592ec138aca9d37e96f787f7d 100644 (file)
@@ -625,6 +625,11 @@ void cmd_goto(char *gargs)
 
        c=0;
        getuser(&CC->usersupp,CC->curr_user);
+
+       /* FIX  This is the primary bit of code that needs to be rewritten
+        * during the cutover.  Search for rooms by name rather than by
+        * position in the file.  A total rewrite may be necessary.
+        */
        for (a=0; a<MAXROOMS; ++a) {
                getroom(&QRscratch,a);
                if ((a==0)&&(!strcasecmp(towhere,"_BASEROOM_"))) {
@@ -1091,6 +1096,8 @@ void cmd_kill(char *argbuf)
  * Find a free slot to create a new room in, or return -1 for error.
  * search_dir is the direction to search in.  1 causes this function to
  * return the first available slot, -1 gets the last available slot.
+ *
+ * FIX   This function can be eliminated during the cutover.
  */
 int get_free_room_slot(int search_dir)
 {
@@ -1156,7 +1163,7 @@ unsigned create_room(int free_slot, char *new_room_name, int new_room_type, char
 
 
 /*
- * create a new room
+ * create a new room        FIX  Rework this to use name indexing
  */
 void cmd_cre8(char *args)
 {
index dacf9b465bdfe3a667b744ae0f44afe8b348d4ab..c2f228cd792a5813b640111a25cdce34d011916d 100644 (file)
@@ -312,13 +312,8 @@ void session_startup(void) {
                CC->usersupp.axlevel = 6;
                }
 
-/* A room's generation number changes each time it is recycled. Users are kept
- * out of private rooms or forget rooms by matching the generation numbers. To
- * avoid an accidental matchup, unmatched numbers are set to -1 here.
- *
- * FIX - This can get removed once the new relationships system is in place.
- *
- */
+ /******************************************************************************/
+ /* FIX  It is safe to remove this segment during the cutover                  */
        for (a=0; a<MAXROOMS; ++a) {
                getroom(&qr,a);
                if (CC->usersupp.generation[a] != qr.QRgen)
@@ -326,6 +321,7 @@ void session_startup(void) {
                if (CC->usersupp.forget[a] != qr.QRgen)
                                        CC->usersupp.forget[a]=(-1);
                }
+ /******************************************************************************/
 
        lputuser(&CC->usersupp,CC->curr_user);
 
@@ -497,14 +493,17 @@ int create_user(char *newusername)
 
        strcpy(CC->curr_user,username);
        strcpy(CC->usersupp.fullname,username);
+       strcpy(CC->usersupp.password,"");
        (CC->logged_in) = 1;
 
+       /********************************************************/
+       /* FIX this can safely be removed during the cutover... */
        for (a=0; a<MAXROOMS; ++a) {
                CC->usersupp.lastseen[a]=0L;
                CC->usersupp.generation[a]=(-1);
                CC->usersupp.forget[a]=(-1);
                }
-       strcpy(CC->usersupp.password,"");
+       /********************************************************/
 
        /* These are the default flags on new accounts */
        CC->usersupp.flags =