From 5485d994d0fdf809bf20eee617e39a89ffbf9edd Mon Sep 17 00:00:00 2001 From: Michiel Broek Date: Wed, 10 Aug 2005 19:48:48 +0000 Subject: [PATCH] Added limit for mailerhistory lines in web stats --- ChangeLog | 4 ++++ TODO | 5 ----- html/setup/global.html | 3 ++- mbfido/makestat.c | 12 +++++++----- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0f612a86..f61dfbf9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,7 @@ v0.71.3 13-Jun-2005 upgrade: Check mbsetup 7.n.3.14 and 7.n.3.15 settings. + You may limit the mailhistory.html by setting 1.15.8 mbselib.a: Added a function to clean subject lines from garbage, trailing @@ -28,10 +29,13 @@ v0.71.3 13-Jun-2005 Added subject line clean in several places. When message areas are autocreated, golded.inc and msg.txt are recreated for the external editors. + The web stats can now limit the size of mailhistory.html mbsetup: Added setup switches per node to disable PLZ or GZ and BZ2 compression protocols with binkp. + Added setup entry 1.15.8 to set a limit on the size of the + mailer history html page. v0.71.2 16-Jan-2005 - 13-Jun-2005 diff --git a/TODO b/TODO index dadf55d9..d484982a 100644 --- a/TODO +++ b/TODO @@ -118,11 +118,6 @@ mbfido: N: Someday make retoss from bad possible (volonteers?). - N: When creating mailhistory.html if a bbs name contains < and > the - characters are not converted to html entinities. - - N: Make mailhistory.html a lot shorter, maybe day or week versions. - mbcico: L: Implement binkp option ND. diff --git a/html/setup/global.html b/html/setup/global.html index 0f2eef97..62fdd134 100644 --- a/html/setup/global.html +++ b/html/setup/global.html @@ -14,7 +14,7 @@
-
Last update 20-Apr-2005
+
Last update 10-Aug-2005

MBSE BBS Setup - Global Setup

In this setup you can edit all global settings for MBSE BBS. All sections will @@ -419,6 +419,7 @@ there is no user authentication yet available. Author name The author name you want in the HTTP headers. Convert command The graphics convert command. (ImageMagick needed). Files/page The number of files to display per web page. +Hist. limit Limit the number of mailhistory.html lines, 0 is unlimited.

diff --git a/mbfido/makestat.c b/mbfido/makestat.c index 1b0f293b..5ca71958 100644 --- a/mbfido/makestat.c +++ b/mbfido/makestat.c @@ -198,9 +198,9 @@ void MakeStat(void) MacroVars("b", "d", Area); html_massage(msgs.Name, name); MacroVars("c", "s", name); - html_massage(fgroup.Tag, name); + html_massage(msgs.Tag, name); MacroVars("d", "s", name); - html_massage(fgroup.Group, name); + html_massage(msgs.Group, name); MacroVars("e", "s", name); MacroVars("f", "s", adate(msgs.LastRcvd)); MacroVars("g", "d", msgs.Received.lweek); @@ -377,11 +377,11 @@ void MakeStat(void) hist.aka.domain[0] = '\0'; MacroVars("c", "s", hist.aka.zone ? aka2str(hist.aka):" "); html_massage(hist.system_name, name); - MacroVars("d", "s", name); + MacroVars("d", "s", strlen(name) ? name:" "); html_massage(hist.sysop, name); - MacroVars("e", "s", name); + MacroVars("e", "s", strlen(name) ? name:" "); html_massage(hist.location, name); - MacroVars("f", "s", name); + MacroVars("f", "s", strlen(name) ? name:" "); MacroVars("g", "s", strlen(hist.tty) ? hist.tty:" "); MacroVars("h", "s", adate(hist.online)); MacroVars("i", "s", t_elapsed(hist.online, hist.offline)); @@ -390,6 +390,8 @@ void MakeStat(void) MacroVars("l", "d", hist.cost); MacroVars("m", "s", hist.inbound ? "In":"Out"); MacroRead(fi, fw); + if (CFG.www_mailerlines && ((Total - i + 1) >= CFG.www_mailerlines)) + break; } closepage(fw, (char *)"mailhistory", fi); } else {