]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_httpd_stats.cpp
Send module load/unload notifications so that services can learn of new features...
[user/henk/code/inspircd.git] / src / modules / m_httpd_stats.cpp
index 36deda11b5bb98e4e8a13ae7e3dbc18fb9d5b484..a682cd14c71b50a5019e76c6d173668283f02161 100644 (file)
@@ -2,7 +2,7 @@
  *       | 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
 class ModuleHttpStats : public Module
 {
        static std::map<char, char const*> const &entities;
-       std::string stylesheet;
-       bool changed;
 
  public:
 
-       void ReadConfig()
-       {
-               ConfigReader c;
-               this->stylesheet = c.ReadValue("httpstats", "stylesheet", 0);
-       }
-
        ModuleHttpStats()       {
-               ReadConfig();
-               this->changed = true;
                Implementation eventlist[] = { I_OnEvent };
                ServerInstance->Modules->Attach(eventlist, this, 1);
        }
@@ -75,9 +65,9 @@ class ModuleHttpStats : public Module
                        ExtensionItem* item = i->first;
                        std::string value = item->serialize(FORMAT_USER, ext, i->second);
                        if (!value.empty())
-                               data << "<meta name=\"" << item->key << "\">" << Sanitize(value) << "</meta>";
-                       else if (!item->key.empty())
-                               data << "<meta name=\"" << item->key << "\"/>";
+                               data << "<meta name=\"" << item->name << "\">" << Sanitize(value) << "</meta>";
+                       else if (!item->name.empty())
+                               data << "<meta name=\"" << item->name << "\"/>";
                }
                data << "</metadata>";
        }
@@ -135,7 +125,7 @@ class ModuleHttpStats : public Module
                                {
                                        Module* m = ServerInstance->Modules->Find(i->c_str());
                                        Version v = m->GetVersion();
-                                       data << "<module><name>" << *i << "</name><version>" << v.version << "</version><description>" << Sanitize(v.description) << "</description></module>";
+                                       data << "<module><name>" << *i << "</name><description>" << Sanitize(v.description) << "</description></module>";
                                }
                                data << "</modulelist><channellist>";