avoid calling GETR for the number of total/read messages
authorWilfried Goesgens <dothebart@citadel.org>
Sun, 21 Nov 2010 17:48:01 +0000 (18:48 +0100)
committerWilfried Goesgens <dothebart@citadel.org>
Sun, 21 Nov 2010 17:48:01 +0000 (18:48 +0100)
so far webcit used a call of GETR to retrieve the number of messages available in the current room for displaying the room banner.
However, GOTO already gave us this information, and GETR is only available for aides, so we got Important messages with that error when logged in as joe average.
This went under the radar for quiet a while, since the error message wasn't printed but silently ignored.

webcit/roomtokens.c

index 884cd63f9d11174f3cd7ef51da4807b843e9c87c..0e632365f761757bdbb3fa91ff04b0fd8b8d73a6 100644 (file)
@@ -384,8 +384,6 @@ void tmplput_ThisRoom_nNewMessages(StrBuf *Target, WCTemplputParams *TP)
 {
        wcsession *WCC = WC;
 
-       LoadRoomXA();
-
        StrBufAppendPrintf(Target, "%d", WCC->CurRoom.nNewMessages);
 }
 
@@ -393,8 +391,6 @@ void tmplput_ThisRoom_nTotalMessages(StrBuf *Target, WCTemplputParams *TP)
 {
        wcsession *WCC = WC;
 
-       LoadRoomXA();
-
        StrBufAppendPrintf(Target, "%d", WCC->CurRoom.nTotalMessages);
 }