X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_httpd_stats.cpp;h=6db292eb37c7fe8ae3fd56f90eaf5781dd1a48e6;hb=8ec9a73a91ad1c7009fd3055fbad7c980b5e1732;hp=541e080f56a7ad999f4c7632fe85f88f5dfe5533;hpb=0b63ccd0b5cb26883d6becb196fb98e4f95d0397;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_httpd_stats.cpp b/src/modules/m_httpd_stats.cpp index 541e080f5..6db292eb3 100644 --- a/src/modules/m_httpd_stats.cpp +++ b/src/modules/m_httpd_stats.cpp @@ -97,22 +97,24 @@ class ModuleHttpStats : public Module, public HTTPRequestEventListener if ((http->GetURI() == "/stats") || (http->GetURI() == "/stats/")) { - data << "" << ServerInstance->Config->ServerName << "" - << Sanitize(ServerInstance->Config->ServerDesc) << "" + data << "" << ServerInstance->Config->ServerName << "" + << Sanitize(ServerInstance->Config->ServerDesc) << "" << Sanitize(ServerInstance->GetVersionString()) << ""; data << ""; data << "" << ServerInstance->Users->GetUsers().size() << ""; data << "" << ServerInstance->GetChans().size() << ""; data << "" << ServerInstance->Users->all_opers.size() << ""; - data << "" << (SocketEngine::GetUsedFds()) << "" << SocketEngine::GetMaxFds() << "" INSPIRCD_SOCKETENGINE_NAME ""; + data << "" << (SocketEngine::GetUsedFds()) << "" << SocketEngine::GetMaxFds() << ""; data << "" << ServerInstance->startup_time << ""; data << ""; - const std::vector& isupport = ServerInstance->ISupport.GetLines(); - for (std::vector::const_iterator it = isupport.begin(); it != isupport.end(); it++) + const std::vector& isupport = ServerInstance->ISupport.GetLines(); + for (std::vector::const_iterator i = isupport.begin(); i != isupport.end(); ++i) { - data << Sanitize(*it) << std::endl; + const Numeric::Numeric& num = *i; + for (std::vector::const_iterator j = num.GetParams().begin(); j != num.GetParams().end()-1; ++j) + data << "" << Sanitize(*j) << "" << std::endl; } data << ""; std::vector xltypes = ServerInstance->XLines->GetAllTypes(); @@ -181,13 +183,13 @@ class ModuleHttpStats : public Module, public HTTPRequestEventListener data << ""; data << "" << u->nick << "" << u->uuid << "" - << u->host << "" << u->dhost << "" - << Sanitize(u->fullname) << "" << u->server->GetName() << ""; + << u->GetRealHost() << "" << u->GetDisplayedHost() << "" + << Sanitize(u->GetRealName()) << "" << u->server->GetName() << ""; if (u->IsAway()) data << "" << Sanitize(u->awaymsg) << "" << u->awaytime << ""; if (u->IsOper()) data << "" << Sanitize(u->oper->name) << ""; - data << "" << u->FormatModes() << "" << Sanitize(u->ident) << ""; + data << "" << u->GetModeLetters().substr(1) << "" << Sanitize(u->ident) << ""; LocalUser* lu = IS_LOCAL(u); if (lu) data << "" << lu->GetServerPort() << "" @@ -209,7 +211,7 @@ class ModuleHttpStats : public Module, public HTTPRequestEventListener data << ""; data << "" << b->servername << ""; data << "" << b->parentname << ""; - data << "" << b->gecos << ""; + data << "" << Sanitize(b->description) << ""; data << "" << b->usercount << ""; // This is currently not implemented, so, commented out. // data << "" << b->opercount << ""; @@ -245,7 +247,7 @@ class ModuleHttpStats : public Module, public HTTPRequestEventListener Version GetVersion() CXX11_OVERRIDE { - return Version("Provides statistics over HTTP via m_httpd.so", VF_VENDOR); + return Version("Provides statistics over HTTP via m_httpd", VF_VENDOR); } };