X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_httpd_stats.cpp;h=50d13398bd102ebec540127dbd500913013330de;hb=ccd95e668a3bcbd26c4cd2984cdd8809347f9815;hp=e26ab5e960536d289f681b49b99f411c0791f564;hpb=53afaa7cadcdf222dcf761441727305f79b4c557;p=user%2Fhenk%2Fcode%2Finspircd.git
diff --git a/src/modules/m_httpd_stats.cpp b/src/modules/m_httpd_stats.cpp
index e26ab5e96..50d13398b 100644
--- a/src/modules/m_httpd_stats.cpp
+++ b/src/modules/m_httpd_stats.cpp
@@ -2,7 +2,7 @@
* | Inspire Internet Relay Chat Daemon |
* +------------------------------------+
*
- * InspIRCd: (C) 2002-2007 InspIRCd Development Team
+ * InspIRCd: (C) 2002-2008 InspIRCd Development Team
* See: http://www.inspircd.org/wiki/index.php/Credits
*
* This program is free but copyrighted software; see
@@ -73,7 +73,7 @@ class ModuleHttpStats : public Module
so->clear();
for (StatsIter a = sh->begin(); a != sh->end(); a++)
InsertOrder(a->first, a->second);
- for (user_hash::iterator u = ServerInstance->clientlist->begin(); u != ServerInstance->clientlist->end(); u++)
+ for (user_hash::iterator u = ServerInstance->Users->clientlist->begin(); u != ServerInstance->Users->clientlist->end(); u++)
{
StatsHash::iterator n = Servers->find(u->second->server);
if (n != Servers->end())
@@ -103,9 +103,9 @@ class ModuleHttpStats : public Module
data << "" << ServerInstance->Config->ServerName << "" << ServerInstance->Config->ServerDesc << "";
data << "";
- data << "" << ServerInstance->clientlist->size() << "";
+ data << "" << ServerInstance->Users->clientlist->size() << "";
data << "" << ServerInstance->chanlist->size() << "";
- data << "" << ServerInstance->all_opers.size() << "";
+ data << "" << ServerInstance->Users->all_opers.size() << "";
data << "" << (ServerInstance->SE->GetMaxFds() - ServerInstance->SE->GetRemainingFds()) << "" << ServerInstance->SE->GetMaxFds() <<
"" << ServerInstance->SE->GetName() << "";
@@ -119,17 +119,13 @@ class ModuleHttpStats : public Module
data << "";
data << "";
- /* XXX FIXME
- * for (int i = 0; i <= ServerInstance->Modules->GetCount(); i++)
+ std::vector module_names = ServerInstance->Modules->GetAllModuleNames(0);
+ for (std::vector::iterator i = module_names.begin(); i != module_names.end(); ++i)
{
- if (!ServerInstance->Config->module_names[i].empty())
- {
- Version v = ServerInstance->Modules->modules[i]->GetVersion();
- data << "" << ServerInstance->Config->module_names[i] << "" <<
- v.Major << "." << v.Minor << "." << v.Revision << "." << v.Build << "";
- }
+ Module* m = ServerInstance->Modules->Find(i->c_str());
+ Version v = m->GetVersion();
+ data << "" << *i << "" << v.Major << "." << v.Minor << "." << v.Revision << "." << v.Build << "";
}
- */
data << "";
data << "";
@@ -190,7 +186,7 @@ class ModuleHttpStats : public Module
this->changed = true;
}
- void OnUserJoin(User* user, Channel* channel, bool &silent)
+ void OnUserJoin(User* user, Channel* channel, bool sync, bool &silent)
{
StatsIter a = sh->find(channel->name);
if (a != sh->end())
@@ -229,7 +225,7 @@ class ModuleHttpStats : public Module
this->changed = true;
}
- char* OnRequest(Request* request)
+ const char* OnRequest(Request* request)
{
return NULL;
}