diff options
author | Attila Molnar <attilamolnar@hush.com> | 2016-02-22 12:32:51 +0100 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2016-02-22 12:32:51 +0100 |
commit | 7b6bd133ca4472f6cb8058d5e34e3c8b2af7e99a (patch) | |
tree | 357d7aab987c119759cac133444cc9557fe8ab59 | |
parent | 0cfe4a848b06d8b8b277a7afc90ceabcaa50d9fa (diff) | |
parent | 5d177cba9d5c258dc6fc333924eca58454699ed8 (diff) |
Merge pull request #1139 from johanna-a/master
Adds <commandlist> tag with command usage to httpd_stats.
-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); |