]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_httpd_stats.cpp
m_ldapoper Fix typo spotted by @lordsith49
[user/henk/code/inspircd.git] / src / modules / m_httpd_stats.cpp
index e34c4b43f178701c89d9bdf76a401490a1399c8b..077bc4f2d88839996e5c26cbff7b29a043558084 100644 (file)
@@ -1,16 +1,26 @@
-/*       +------------------------------------+
- *       | Inspire Internet Relay Chat Daemon |
- *       +------------------------------------+
+/*
+ * InspIRCd -- Internet Relay Chat Daemon
  *
- *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://wiki.inspircd.org/Credits
+ *   Copyright (C) 2009 Daniel De Graaf <danieldg@inspircd.org>
+ *   Copyright (C) 2007-2008 Robin Burchell <robin+git@viroteck.net>
+ *   Copyright (C) 2008 Pippijn van Steenhoven <pip88nl@gmail.com>
+ *   Copyright (C) 2006-2008 Craig Edwards <craigedwards@brainbox.cc>
+ *   Copyright (C) 2007 Dennis Friis <peavey@inspircd.org>
  *
- * This program is free but copyrighted software; see
- *          the file COPYING for details.
+ * This file is part of InspIRCd.  InspIRCd is free software: you can
+ * redistribute it and/or modify it under the terms of the GNU General Public
+ * License as published by the Free Software Foundation, version 2.
  *
- * ---------------------------------------------------
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+
 #include "inspircd.h"
 #include "httpd.h"
 #include "xline.h"
 class ModuleHttpStats : public Module
 {
        static std::map<char, char const*> const &entities;
-       std::string stylesheet;
-       bool changed;
 
  public:
 
-       void ReadConfig()
+       void init()
        {
-               ConfigReader c;
-               this->stylesheet = c.ReadValue("httpstats", "stylesheet", 0);
-       }
-
-       ModuleHttpStats()       {
-               ReadConfig();
-               this->changed = true;
                Implementation eventlist[] = { I_OnEvent };
-               ServerInstance->Modules->Attach(eventlist, this, 1);
+               ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
        }
 
        std::string Sanitize(const std::string &str)
@@ -135,7 +136,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>";