* | Inspire Internet Relay Chat Daemon |
* +------------------------------------+
*
- * InspIRCd: (C) 2002-2009 InspIRCd Development Team
+ * InspIRCd: (C) 2002-2010 InspIRCd Development Team
* See: http://wiki.inspircd.org/Credits
*
* This program is free but copyrighted software; see
#include "protocol.h"
/* $ModDesc: Provides statistics over HTTP via m_httpd.so */
-/* $ModDep: httpd.h */
-class ModuleHttpStats : public Module
+class ModuleHttpConfig : public Module
{
-
- std::string stylesheet;
- bool changed;
-
public:
-
- void ReadConfig()
- {
- ConfigReader c;
- this->stylesheet = c.ReadValue("httpstats", "stylesheet", 0);
- }
-
- ModuleHttpStats() {
- ReadConfig();
- this->changed = true;
+ ModuleHttpConfig() {
Implementation eventlist[] = { I_OnEvent };
ServerInstance->Modules->Attach(eventlist, this, 1);
}
{
data << "<" << x->first << " ";
ConfigTag* tag = x->second;
- for (std::vector<KeyVal>::iterator j = tag->items.begin(); j != tag->items.end(); j++)
+ for (std::vector<KeyVal>::const_iterator j = tag->getItems().begin(); j != tag->getItems().end(); j++)
{
data << Sanitize(j->first) << "="" << Sanitize(j->second) << "" ";
}
}
}
- virtual ~ModuleHttpStats()
+ virtual ~ModuleHttpConfig()
{
}
virtual Version GetVersion()
{
- return Version("Provides statistics over HTTP via m_httpd.so", VF_VENDOR, API_VERSION);
+ return Version("Provides configuration over HTTP via m_httpd.so", VF_VENDOR);
}
};
-MODULE_INIT(ModuleHttpStats)
+MODULE_INIT(ModuleHttpConfig)