X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_httpd_config.cpp;h=8333d9f9cabf13e12693824eeeade8964c9e3007;hb=ad47ea662698e72ff8f79b03512b1e7fe81bdf53;hp=3396361d085b5b3c52f98662c9f768497a337dcc;hpb=183d7a8dc01924ac69a5d160bf1b56ccccd06a4e;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_httpd_config.cpp b/src/modules/m_httpd_config.cpp index 3396361d0..8333d9f9c 100644 --- a/src/modules/m_httpd_config.cpp +++ b/src/modules/m_httpd_config.cpp @@ -22,8 +22,6 @@ #include "modules/httpd.h" #include "protocol.h" -/* $ModDesc: Allows for the server configuration to be viewed over HTTP via m_httpd.so */ - class ModuleHttpConfig : public Module { HTTPdAPI API; @@ -34,12 +32,6 @@ class ModuleHttpConfig : public Module { } - void init() CXX11_OVERRIDE - { - Implementation eventlist[] = { I_OnEvent }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); - } - std::string Sanitize(const std::string &str) { std::string ret; @@ -80,7 +72,7 @@ class ModuleHttpConfig : public Module if (event.id == "httpd_url") { - ServerInstance->Logs->Log("m_http_stats", LOG_DEBUG, "Handling httpd event"); + ServerInstance->Logs->Log(MODNAME, LOG_DEBUG, "Handling httpd event"); HTTPRequest* http = (HTTPRequest*)&event; if ((http->GetURI() == "/config") || (http->GetURI() == "/config/")) @@ -102,7 +94,7 @@ class ModuleHttpConfig : public Module data << ""; /* Send the document back to m_httpd */ HTTPDocumentResponse response(this, *http, &data, 200); - response.headers.SetHeader("X-Powered-By", "m_httpd_config.so"); + response.headers.SetHeader("X-Powered-By", MODNAME); response.headers.SetHeader("Content-Type", "text/html"); API->SendResponse(response); }