aboutsummaryrefslogtreecommitdiff
path: root/modules/httpd_acl.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2026-03-28 21:32:23 +0000
committerGravatar Sadie Powell2026-03-29 00:42:15 +0000
commitcbc5431d62e3fe9166f18395dce3ddf2af0906d3 (patch)
tree48a87fc27dc4826ce0caf4071e2060a9ff9e24c5 /modules/httpd_acl.cpp
parentMove 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.cpp8
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);