diff options
author | Johanna A <johanna-a@users.noreply.github.com> | 2016-02-19 23:30:56 +0100 |
---|---|---|
committer | Johanna A <johanna-a@users.noreply.github.com> | 2016-02-20 19:31:49 +0100 |
commit | 5d177cba9d5c258dc6fc333924eca58454699ed8 (patch) | |
tree | 3a94d6973d5abc9c514c4ef404100fba4f3c6004 /src/modules | |
parent | 860b5f5920107e933cf9467941d8b193e6d193a4 (diff) |
Adds <commandlist> tag with command usage to httpd_stats.
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_httpd_stats.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/modules/m_httpd_stats.cpp b/src/modules/m_httpd_stats.cpp index ad0b4bb72..541e080f5 100644 --- a/src/modules/m_httpd_stats.cpp +++ b/src/modules/m_httpd_stats.cpp @@ -217,7 +217,15 @@ class ModuleHttpStats : public Module, public HTTPRequestEventListener data << "</server>"; } - data << "</serverlist></inspircdstats>"; + data << "</serverlist><commandlist>"; + + const CommandParser::CommandMap& commands = ServerInstance->Parser.GetCommands(); + for (CommandParser::CommandMap::const_iterator i = commands.begin(); i != commands.end(); ++i) + { + data << "<command><name>" << i->second->name << "</name><usecount>" << i->second->use_count << "</usecount></command>"; + } + + data << "</commandlist></inspircdstats>"; /* Send the document back to m_httpd */ HTTPDocumentResponse response(this, *http, &data, 200); |