aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules
diff options
context:
space:
mode:
authorGravatar Attila Molnar2016-02-22 12:32:51 +0100
committerGravatar Attila Molnar2016-02-22 12:32:51 +0100
commit7b6bd133ca4472f6cb8058d5e34e3c8b2af7e99a (patch)
tree357d7aab987c119759cac133444cc9557fe8ab59 /src/modules
parentMerge pull request #1142 from SaberUK/master+fixes (diff)
parentAdds <commandlist> tag with command usage to httpd_stats. (diff)
downloadinspircd++-7b6bd133ca4472f6cb8058d5e34e3c8b2af7e99a.tar.gz
inspircd++-7b6bd133ca4472f6cb8058d5e34e3c8b2af7e99a.tar.bz2
inspircd++-7b6bd133ca4472f6cb8058d5e34e3c8b2af7e99a.zip
Merge pull request #1139 from johanna-a/master
Adds <commandlist> tag with command usage to httpd_stats.
Diffstat (limited to 'src/modules')
-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);