Minor update for statistics
This commit is contained in:
parent
0c666077fa
commit
bed48c9d4e
@ -146,9 +146,14 @@ void MakeStat(void)
|
|||||||
while ((fread(&mgroup, mgrouphdr.recsize, 1, fg)) == 1) {
|
while ((fread(&mgroup, mgrouphdr.recsize, 1, fg)) == 1) {
|
||||||
if (mgroup.Active) {
|
if (mgroup.Active) {
|
||||||
fseek(fi, fileptr, SEEK_SET);
|
fseek(fi, fileptr, SEEK_SET);
|
||||||
MacroVars("bcdefghi", "ssssdddd", mgroup.Name, mgroup.Comment, aka2str(mgroup.UseAka),
|
MacroVars("b", "s", mgroup.Name);
|
||||||
adate(mgroup.LastDate), mgroup.MsgsRcvd.lweek, mgroup.MsgsRcvd.month[Lm],
|
MacroVars("c", "s", mgroup.Comment);
|
||||||
mgroup.MsgsSent.lweek, mgroup.MsgsSent.month[Lm]);
|
MacroVars("d", "s", aka2str(mgroup.UseAka));
|
||||||
|
MacroVars("e", "s", adate(mgroup.LastDate));
|
||||||
|
MacroVars("f", "d", mgroup.MsgsRcvd.lweek);
|
||||||
|
MacroVars("g", "d", mgroup.MsgsRcvd.month[Lm]);
|
||||||
|
MacroVars("h", "d", mgroup.MsgsSent.lweek);
|
||||||
|
MacroVars("i", "d", mgroup.MsgsSent.month[Lm]);
|
||||||
MacroRead(fi, fw);
|
MacroRead(fi, fw);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -184,8 +189,15 @@ void MakeStat(void)
|
|||||||
MacroVars("k", "d", 0);
|
MacroVars("k", "d", 0);
|
||||||
}
|
}
|
||||||
fseek(fi, fileptr, SEEK_SET);
|
fseek(fi, fileptr, SEEK_SET);
|
||||||
MacroVars("bcdefghij", "dssssdddd", Area, msgs.Name, msgs.Tag, msgs.Group, adate(msgs.LastRcvd),
|
MacroVars("b", "d", Area);
|
||||||
msgs.Received.lweek, msgs.Received.month[Lm], msgs.Posted.lweek, msgs.Posted.month[Lm]);
|
MacroVars("c", "s", msgs.Name);
|
||||||
|
MacroVars("d", "s", msgs.Tag);
|
||||||
|
MacroVars("e", "s", msgs.Group);
|
||||||
|
MacroVars("f", "s", adate(msgs.LastRcvd));
|
||||||
|
MacroVars("g", "d", msgs.Received.lweek);
|
||||||
|
MacroVars("h", "d", msgs.Received.month[Lm]);
|
||||||
|
MacroVars("i", "d", msgs.Posted.lweek);
|
||||||
|
MacroVars("j", "d", msgs.Posted.month[Lm]);
|
||||||
MacroRead(fi, fw);
|
MacroRead(fi, fw);
|
||||||
}
|
}
|
||||||
fseek(fg, msgshdr.syssize, SEEK_CUR);
|
fseek(fg, msgshdr.syssize, SEEK_CUR);
|
||||||
@ -213,9 +225,14 @@ void MakeStat(void)
|
|||||||
while ((fread(&fgroup, fgrouphdr.recsize, 1, fg)) == 1) {
|
while ((fread(&fgroup, fgrouphdr.recsize, 1, fg)) == 1) {
|
||||||
if (fgroup.Active) {
|
if (fgroup.Active) {
|
||||||
fseek(fi, fileptr, SEEK_SET);
|
fseek(fi, fileptr, SEEK_SET);
|
||||||
MacroVars("bcdefghi", "ssssdddd", fgroup.Name, fgroup.Comment, aka2str(fgroup.UseAka),
|
MacroVars("b", "s", fgroup.Name);
|
||||||
adate(fgroup.LastDate), fgroup.Files.lweek, fgroup.KBytes.lweek,
|
MacroVars("c", "s", fgroup.Comment);
|
||||||
fgroup.Files.month[Lm], fgroup.KBytes.month[Lm]);
|
MacroVars("d", "s", aka2str(fgroup.UseAka));
|
||||||
|
MacroVars("e", "s", adate(fgroup.LastDate));
|
||||||
|
MacroVars("f", "d", fgroup.Files.lweek);
|
||||||
|
MacroVars("g", "d", fgroup.KBytes.lweek);
|
||||||
|
MacroVars("h", "d", fgroup.Files.month[Lm]);
|
||||||
|
MacroVars("i", "d", fgroup.KBytes.month[Lm]);
|
||||||
MacroRead(fi, fw);
|
MacroRead(fi, fw);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -242,8 +259,14 @@ void MakeStat(void)
|
|||||||
while ((fread(&tic, tichdr.recsize, 1, fg)) == 1) {
|
while ((fread(&tic, tichdr.recsize, 1, fg)) == 1) {
|
||||||
if (tic.Active) {
|
if (tic.Active) {
|
||||||
fseek(fi, fileptr, SEEK_SET);
|
fseek(fi, fileptr, SEEK_SET);
|
||||||
MacroVars("bcdefghi", "ssssdddd", tic.Comment, tic.Name, tic.Group, adate(tic.LastAction),
|
MacroVars("b", "s", tic.Comment);
|
||||||
tic.Files.lweek, tic.KBytes.lweek, tic.Files.month[Lm], tic.KBytes.month[Lm]);
|
MacroVars("c", "s", tic.Name);
|
||||||
|
MacroVars("d", "s", tic.Group);
|
||||||
|
MacroVars("e", "s", adate(tic.LastAction));
|
||||||
|
MacroVars("f", "d", tic.Files.lweek);
|
||||||
|
MacroVars("g", "d", tic.KBytes.lweek);
|
||||||
|
MacroVars("h", "d", tic.Files.month[Lm]);
|
||||||
|
MacroVars("i", "d", tic.KBytes.month[Lm]);
|
||||||
MacroRead(fi, fw);
|
MacroRead(fi, fw);
|
||||||
}
|
}
|
||||||
fseek(fg, tichdr.syssize, SEEK_CUR);
|
fseek(fg, tichdr.syssize, SEEK_CUR);
|
||||||
@ -278,8 +301,14 @@ void MakeStat(void)
|
|||||||
q = xstrcpy((char *)"Hold");
|
q = xstrcpy((char *)"Hold");
|
||||||
else
|
else
|
||||||
q = xstrcpy((char *)"Normal");
|
q = xstrcpy((char *)"Normal");
|
||||||
MacroVars("bcdefghi", "sssssddd", aka2str(nodes.Aka[0]), nodes.Sysop, q, p,
|
MacroVars("b", "s", aka2str(nodes.Aka[0]));
|
||||||
adate(nodes.LastDate), nodes.Billing, nodes.Credit, nodes.Debet);
|
MacroVars("c", "s", nodes.Sysop);
|
||||||
|
MacroVars("d", "s", q);
|
||||||
|
MacroVars("e", "s", p);
|
||||||
|
MacroVars("f", "s", adate(nodes.LastDate));
|
||||||
|
MacroVars("g", "d", nodes.Billing);
|
||||||
|
MacroVars("h", "d", nodes.Credit);
|
||||||
|
MacroVars("i", "d", nodes.Debet);
|
||||||
MacroRead(fi, fw);
|
MacroRead(fi, fw);
|
||||||
free(p);
|
free(p);
|
||||||
free(q);
|
free(q);
|
||||||
@ -314,10 +343,17 @@ void MakeStat(void)
|
|||||||
fseek(fi, fileptr, SEEK_SET);
|
fseek(fi, fileptr, SEEK_SET);
|
||||||
if (!strcmp(hist.aka.domain, "(null)"))
|
if (!strcmp(hist.aka.domain, "(null)"))
|
||||||
hist.aka.domain[0] = '\0';
|
hist.aka.domain[0] = '\0';
|
||||||
MacroVars("cdefghijklm", "sssssssddds", hist.aka.zone?aka2str(hist.aka):"N/A", hist.system_name,
|
MacroVars("c", "s", hist.aka.zone ? aka2str(hist.aka):"N/A");
|
||||||
hist.sysop, hist.location, hist.tty, adate(hist.online),
|
MacroVars("d", "s", hist.system_name);
|
||||||
t_elapsed(hist.online, hist.offline), hist.sent_bytes,
|
MacroVars("e", "s", hist.sysop);
|
||||||
hist.rcvd_bytes, hist.cost, hist.inbound ? "In":"Out");
|
MacroVars("f", "s", hist.location);
|
||||||
|
MacroVars("g", "s", strlen(hist.tty) ? hist.tty:" ");
|
||||||
|
MacroVars("h", "s", adate(hist.online));
|
||||||
|
MacroVars("i", "s", t_elapsed(hist.online, hist.offline));
|
||||||
|
MacroVars("j", "d", hist.sent_bytes);
|
||||||
|
MacroVars("k", "d", hist.rcvd_bytes);
|
||||||
|
MacroVars("l", "d", hist.cost);
|
||||||
|
MacroVars("m", "s", hist.inbound ? "In":"Out");
|
||||||
MacroRead(fi, fw);
|
MacroRead(fi, fw);
|
||||||
}
|
}
|
||||||
closepage(fw, (char *)"mailhistory", fi);
|
closepage(fw, (char *)"mailhistory", fi);
|
||||||
@ -336,8 +372,13 @@ void MakeStat(void)
|
|||||||
Syslog('+', "Can't open macro file, skipping html pages creation");
|
Syslog('+', "Can't open macro file, skipping html pages creation");
|
||||||
} else {
|
} else {
|
||||||
fread(&SYSINFO, sizeof(SYSINFO), 1, fg);
|
fread(&SYSINFO, sizeof(SYSINFO), 1, fg);
|
||||||
MacroVars("bcdefgh", "dddddss", SYSINFO.SystemCalls, SYSINFO.Pots, SYSINFO.ISDN, SYSINFO.Network,
|
MacroVars("b", "d", SYSINFO.SystemCalls);
|
||||||
SYSINFO.Local, adate(SYSINFO.StartDate), SYSINFO.LastCaller);
|
MacroVars("c", "d", SYSINFO.Pots);
|
||||||
|
MacroVars("d", "d", SYSINFO.ISDN);
|
||||||
|
MacroVars("e", "d", SYSINFO.Network);
|
||||||
|
MacroVars("f", "d", SYSINFO.Local);
|
||||||
|
MacroVars("g", "s", adate(SYSINFO.StartDate));
|
||||||
|
MacroVars("h", "s", SYSINFO.LastCaller);
|
||||||
MacroVars("i", "s", adate(SYSINFO.LastTime));
|
MacroVars("i", "s", adate(SYSINFO.LastTime));
|
||||||
if ((fw = newpage((char *)"sysinfo", fi)) != NULL) {
|
if ((fw = newpage((char *)"sysinfo", fi)) != NULL) {
|
||||||
closepage(fw, (char *)"sysinfo", fi);
|
closepage(fw, (char *)"sysinfo", fi);
|
||||||
|
Reference in New Issue
Block a user