X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_httpd_acl.cpp;h=58bbbde2a868d59eda2cc455de7bdf8a6bd4d058;hb=90abe2cd475c8ca2e81626f565d173e9f56d1251;hp=1745dc3f69105abafd490ac58e4fbd01dd2c559b;hpb=abc57eddfb56462ac3e433601d010abf1942e611;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_httpd_acl.cpp b/src/modules/m_httpd_acl.cpp index 1745dc3f6..58bbbde2a 100644 --- a/src/modules/m_httpd_acl.cpp +++ b/src/modules/m_httpd_acl.cpp @@ -20,7 +20,6 @@ #include "inspircd.h" #include "modules/httpd.h" -#include "protocol.h" class HTTPACL { @@ -49,7 +48,7 @@ class ModuleHTTPAccessList : public Module { } - void OnRehash(User* user) + void ReadConfig(ConfigStatus& status) CXX11_OVERRIDE { acl_list.clear(); ConfigTagList acls = ServerInstance->Config->ConfTags("httpdacl"); @@ -93,20 +92,13 @@ class ModuleHTTPAccessList : public Module } } - void init() CXX11_OVERRIDE - { - OnRehash(NULL); - Implementation eventlist[] = { I_OnEvent, I_OnRehash }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); - } - void BlockAccess(HTTPRequest* http, int returnval, const std::string &extraheaderkey = "", const std::string &extraheaderval="") { ServerInstance->Logs->Log(MODNAME, LOG_DEBUG, "BlockAccess (%d)", returnval); std::stringstream data("Access to this resource is denied by an access control list. Please contact your IRC administrator."); HTTPDocumentResponse response(this, *http, &data, returnval); - response.headers.SetHeader("X-Powered-By", "m_httpd_acl.so"); + response.headers.SetHeader("X-Powered-By", MODNAME); if (!extraheaderkey.empty()) response.headers.SetHeader(extraheaderkey, extraheaderval); API->SendResponse(response);