X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_httpd_config.cpp;h=78053d8d54b126265144b375789567667e31f171;hb=c775be0c827ccab77559f6ef79a54a73a3abde15;hp=aa84b83a48521f609a2203b73d650af080254d8f;hpb=fcacc8e0306382bc3f938073092c3729d77e2b41;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_httpd_config.cpp b/src/modules/m_httpd_config.cpp index aa84b83a4..78053d8d5 100644 --- a/src/modules/m_httpd_config.cpp +++ b/src/modules/m_httpd_config.cpp @@ -19,17 +19,18 @@ #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() CXX11_OVERRIDE + { 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) @@ -66,13 +67,13 @@ class ModuleHttpConfig : public Module return ret; } - void OnEvent(Event& event) + void OnEvent(Event& event) CXX11_OVERRIDE { std::stringstream data(""); 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() + Version GetVersion() CXX11_OVERRIDE { - 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); } };