]> jfr.im git - irc/quakenet/newserv.git/commitdiff
Minor stats fix
authorstrutsi <redacted>
Thu, 14 Jul 2005 08:16:00 +0000 (09:16 +0100)
committerstrutsi <redacted>
Thu, 14 Jul 2005 08:16:00 +0000 (09:16 +0100)
helpmod2/hstat.c

index 9c990412b3fea0c5436c6e7fd42397aa4b8393fd..0091f806b2565e8a482f9ce9af375195029cdd4b 100644 (file)
@@ -277,10 +277,9 @@ hstat_account_entry_sum hstat_account_last_month(hstat_account *hs_acc)
     hstat_account_entry_sum tmp = {0,0,0,0};
     int i;
 
-    //HSTAT_ACCOUNT_SUM(tmp, tmp, hstat_account_last_week(hs_acc));
     for (i=0;i<4;i++)
     {
-        HSTAT_ACCOUNT_SUM(tmp, tmp, hs_acc->longterm[(hstat_week() + i) % 10]);
+        HSTAT_ACCOUNT_SUM(tmp, tmp, hs_acc->longterm[(hstat_week() - i + 10) % 10]);
     }
     return tmp;
 }
@@ -304,7 +303,7 @@ hstat_channel_entry hstat_channel_last_month(hstat_channel *hs_chan)
     //HSTAT_CHANNEL_SUM(tmp, tmp, hstat_channel_last_week(hs_chan));
     for (i=0;i<4;i++)
     {
-        HSTAT_CHANNEL_SUM(tmp, tmp, hs_chan->longterm[(hstat_week() + i) % 10]);
+        HSTAT_CHANNEL_SUM(tmp, tmp, hs_chan->longterm[(hstat_week() - i + 10) % 10]);
     }
     return tmp;
 }