X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_httpd_stats.cpp;h=62ae0c204bda86de042d7bdfc95298a6f1c22644;hb=6de3017e2cda445bfd9e6b460a35eae7fc199148;hp=ad0b4bb72caac277ebda2d9ed21226c54515e8df;hpb=8f5efbc7aa33b792e02d01e3288f553e6e98ccaa;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_httpd_stats.cpp b/src/modules/m_httpd_stats.cpp index ad0b4bb72..62ae0c204 100644 --- a/src/modules/m_httpd_stats.cpp +++ b/src/modules/m_httpd_stats.cpp @@ -109,10 +109,12 @@ class ModuleHttpStats : public Module, public HTTPRequestEventListener 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(); @@ -187,7 +189,7 @@ class ModuleHttpStats : public Module, public HTTPRequestEventListener 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->gecos) << ""; data << "" << b->usercount << ""; // This is currently not implemented, so, commented out. // data << "" << b->opercount << ""; @@ -217,7 +219,15 @@ class ModuleHttpStats : public Module, public HTTPRequestEventListener data << ""; } - data << ""; + data << ""; + + const CommandParser::CommandMap& commands = ServerInstance->Parser.GetCommands(); + for (CommandParser::CommandMap::const_iterator i = commands.begin(); i != commands.end(); ++i) + { + data << "" << i->second->name << "" << i->second->use_count << ""; + } + + data << ""; /* Send the document back to m_httpd */ HTTPDocumentResponse response(this, *http, &data, 200);