]> code.citadel.org Git - citadel.git/commitdiff
* room_ops.c: modified usergoto() to look at the new data structures
authorArt Cancro <ajc@citadel.org>
Wed, 30 Sep 1998 03:18:16 +0000 (03:18 +0000)
committerArt Cancro <ajc@citadel.org>
Wed, 30 Sep 1998 03:18:16 +0000 (03:18 +0000)
          for counting new messages and such.

citadel/ChangeLog
citadel/room_ops.c

index 606b1576832f5668d24230c5f52c8c1b4dd4b0ec..aab5ff93cca204c4479cf57db22cd5529997e60c 100644 (file)
@@ -1,3 +1,7 @@
+Tue Sep 29 23:17:34 EDT 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
+       * room_ops.c: modified usergoto() to look at the new data structures
+         for counting new messages and such.
+
 1998-09-29 Nathan Bryant <bryant@cs.usm.maine.edu>
        * user_ops.c: fix compiler warning and potential memory leak,
          include sysdep.h
index 908fc802aa3f390592ec138aca9d37e96f787f7d..ab2d69bb0b18ee67a0f6b9211389f207771c937f 100644 (file)
@@ -543,7 +543,9 @@ void cmd_lzrm(char *argbuf)
 
 void usergoto(int where, int display_result)
 {
-       int a,b,c;
+       int a;
+       int new_messages = 0;
+       int total_messages = 0;
        int info = 0;
        int rmailflag;
        int raideflag;
@@ -570,16 +572,16 @@ void usergoto(int where, int display_result)
        newmailcount = NewMailCount();
 
        /* set info to 1 if the user needs to read the room's info file */
-       if (CC->quickroom.QRinfo > CC->usersupp.lastseen[CC->curr_rm]) info = 1;
+       if (CC->quickroom.QRinfo > vbuf.v_lastseen) info = 1;
 
-       b=0; c=0;
        get_mm();
        get_msglist(CC->curr_rm);
        for (a=0; a<CC->num_msgs; ++a) {
                if (MessageFromList(a)>0L) {
-                       ++b;
-                       if (MessageFromList(a)
-                          > CC->usersupp.lastseen[CC->curr_rm]) ++c;
+                       ++total_messages;
+                       if (MessageFromList(a) > vbuf.v_lastseen) {
+                               ++new_messages;
+                               }
                        }
                }
 
@@ -593,9 +595,13 @@ void usergoto(int where, int display_result)
 
        if (display_result) cprintf("%d%c%s|%d|%d|%d|%d|%ld|%ld|%d|%d|%d|%d\n",
                OK,check_express(),
-               CC->quickroom.QRname,c,b,info,CC->quickroom.QRflags,
-               CC->quickroom.QRhighest,CC->usersupp.lastseen[CC->curr_rm],
+               CC->quickroom.QRname,
+               new_messages, total_messages,
+               info,CC->quickroom.QRflags,
+               CC->quickroom.QRhighest,
+               vbuf.v_lastseen,
                rmailflag,raideflag,newmailcount,CC->quickroom.QRfloor);
+
        if (CC->quickroom.QRflags & QR_PRIVATE) {
                set_wtmpsupp("<private room>");
                }