summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/modules/m_httpd_stats.cpp10
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);