From aeb6f60a430b864f1aa7032cb2ce4411b82a9296 Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 30 Jul 2007 19:29:18 +0000 Subject: Add uptime git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7631 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_httpd_stats.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/modules') diff --git a/src/modules/m_httpd_stats.cpp b/src/modules/m_httpd_stats.cpp index d685d5c63..4139d7a20 100644 --- a/src/modules/m_httpd_stats.cpp +++ b/src/modules/m_httpd_stats.cpp @@ -6,7 +6,7 @@ * See: http://www.inspircd.org/wiki/index.php/Credits * * This program is free but copyrighted software; see - * the file COPYING for details. + * the file COPYING for details. * * --------------------------------------------------- */ @@ -110,6 +110,15 @@ class ModuleHttpStats : public Module data << "" << ServerInstance->all_opers.size() << ""; data << "" << (ServerInstance->SE->GetMaxFds() - ServerInstance->SE->GetRemainingFds()) << "" << ServerInstance->SE->GetMaxFds() << "" << ServerInstance->SE->GetName() << ""; + + time_t current_time = 0; + current_time = ServerInstance->Time(); + time_t server_uptime = current_time - ServerInstance->startup_time; + struct tm* stime; + stime = gmtime(&server_uptime); + data << "" << stime->tm_yday << "" << stime->tm_hour << "" << stime->tm_min << "" << stime->tm_sec << ""; + + data << ""; data << ""; for (int i = 0; i <= ServerInstance->GetModuleCount(); i++) -- cgit v1.2.3