1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-08 09:43:12 +02:00

+- Added correct uptime to web interface

This commit is contained in:
stskeeps
2001-07-17 21:37:47 +00:00
parent ae4eb55dac
commit fa37709af6
2 changed files with 10 additions and 2 deletions
+2 -1
View File
@@ -708,4 +708,5 @@ seen. gmtime warning still there
- Added a patch by Zogg to fix a socks scanner problem
- Fixed a /sapart bug found by SubZero
- Minor bugfix in scan_socks, + some comments
- Fixed some flaws in httpd, that made it break unmercifully
- Fixed some flaws in httpd, that made it break unmercifully
- Added correct uptime to web interface
+8 -1
View File
@@ -151,9 +151,16 @@ DLLFUNC int h_u_phtml(HTTPd_Request *r)
else
if (!strcmp(s, "DATA"))
{
time_t tmpnow;
if (section == SECTION_STATS)
{
sockprintf(r, "My name is %s<br>Been up for %lu", me.name, TStime()-me.since);
tmpnow = TStime() - me.since;
sockprintf(r, "My name is %s<br>", me.name);
sockprintf(r,
"Been up for %lu days, %lu hours, %lu minutes, %lu seconds",
tmpnow / 86400, (tmpnow / 3600) % 24, (tmpnow /60) %60,
tmpnow % 60);
}
}