diff options
| author | 2026-03-28 21:32:23 +0000 | |
|---|---|---|
| committer | 2026-03-29 00:42:15 +0000 | |
| commit | cbc5431d62e3fe9166f18395dce3ddf2af0906d3 (patch) | |
| tree | 48a87fc27dc4826ce0caf4071e2060a9ff9e24c5 /modules/httpd_acl.cpp | |
| parent | Move service code from base to its own header. (diff) | |
Switch modules from reference<> to shared_ptr<> and weak_ptr<>.
Diffstat (limited to 'modules/httpd_acl.cpp')
| -rw-r--r-- | modules/httpd_acl.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/httpd_acl.cpp b/modules/httpd_acl.cpp index b65b3d954..083fe0b4d 100644 --- a/modules/httpd_acl.cpp +++ b/modules/httpd_acl.cpp @@ -59,8 +59,8 @@ private: public: ModuleHTTPAccessList() : Module(VF_VENDOR, "Allows the server administrator to control who can access resources served over HTTP with the httpd module.") - , HTTPACLEventListener(this) - , API(this) + , HTTPACLEventListener(weak_from_this()) + , API(weak_from_this()) { } @@ -94,7 +94,7 @@ public: } else { - throw ModuleException(this, "Invalid HTTP ACL type '" + type + "'"); + throw ModuleException(weak_from_this(), "Invalid HTTP ACL type '" + type + "'"); } } @@ -117,7 +117,7 @@ public: << "<h2 style='font-size: 24pt'>Please contact your IRC administrator.</h2><hr>" << "<small>Powered by <a href='https://www.inspircd.org'>InspIRCd</a></small></body></html>"; - HTTPDocumentResponse response(this, *http, &data, returnval); + HTTPDocumentResponse response(weak_from_this(), *http, &data, returnval); response.headers.SetHeader("X-Powered-By", MODNAME); if (!extraheaderkey.empty()) response.headers.SetHeader(extraheaderkey, extraheaderval); |
