]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_httpd_config.cpp
m_spanningtree Remove unneeded #includes
[user/henk/code/inspircd.git] / src / modules / m_httpd_config.cpp
index aa84b83a48521f609a2203b73d650af080254d8f..cfdaa4290c3bd0e525290c097db4a243b07e20dd 100644 (file)
 
 
 #include "inspircd.h"
-#include "httpd.h"
+#include "modules/httpd.h"
 #include "protocol.h"
 
-/* $ModDesc: Provides statistics over HTTP via m_httpd.so */
+/* $ModDesc: Allows for the server configuration to be viewed over HTTP via m_httpd.so */
 
 class ModuleHttpConfig : public Module
 {
  public:
-       ModuleHttpConfig()      {
+       void init()
+       {
                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)
@@ -72,7 +73,7 @@ class ModuleHttpConfig : public Module
 
                if (event.id == "httpd_url")
                {
-                       ServerInstance->Logs->Log("m_http_stats", DEBUG,"Handling httpd event");
+                       ServerInstance->Logs->Log("m_http_stats", LOG_DEBUG,"Handling httpd event");
                        HTTPRequest* http = (HTTPRequest*)&event;
 
                        if ((http->GetURI() == "/config") || (http->GetURI() == "/config/"))
@@ -101,13 +102,9 @@ class ModuleHttpConfig : public Module
                }
        }
 
-       virtual ~ModuleHttpConfig()
-       {
-       }
-
        virtual Version GetVersion()
        {
-               return Version("Provides configuration over HTTP via m_httpd.so", VF_VENDOR);
+               return Version("Allows for the server configuration to be viewed over HTTP via m_httpd.so", VF_VENDOR);
        }
 };