summaryrefslogtreecommitdiff
path: root/modules/extra/webcpanel
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2012-10-09 05:22:02 -0400
committerAdam <Adam@anope.org>2012-10-09 05:22:02 -0400
commit8f5d786f0eaec17dd2cb60f3dfb434caabf48e92 (patch)
tree5bc42eaee77104af3169d321eae8730c5e13ee03 /modules/extra/webcpanel
parent1dacc648a0ddc20679b6242bc94edb9ae657a247 (diff)
Cleanup ok if modules with pending identify requests are unloaded
Diffstat (limited to 'modules/extra/webcpanel')
-rw-r--r--modules/extra/webcpanel/pages/index.cpp4
-rw-r--r--modules/extra/webcpanel/webcpanel.cpp3
-rw-r--r--modules/extra/webcpanel/webcpanel.h2
3 files changed, 7 insertions, 2 deletions
diff --git a/modules/extra/webcpanel/pages/index.cpp b/modules/extra/webcpanel/pages/index.cpp
index 73f7224f4..357d3ec3b 100644
--- a/modules/extra/webcpanel/pages/index.cpp
+++ b/modules/extra/webcpanel/pages/index.cpp
@@ -17,7 +17,7 @@ class WebpanelRequest : public IdentifyRequest
TemplateFileServer::Replacements replacements;
public:
- WebpanelRequest(HTTPReply &r, HTTPMessage &m, HTTPProvider *s, const Anope::string &p_n, HTTPClient *c, TemplateFileServer::Replacements &re, const Anope::string &user, const Anope::string &pass) : IdentifyRequest(user, pass), reply(r), message(m), server(s), page_name(p_n), client(c), replacements(re) { }
+ WebpanelRequest(Module *o, HTTPReply &r, HTTPMessage &m, HTTPProvider *s, const Anope::string &p_n, HTTPClient *c, TemplateFileServer::Replacements &re, const Anope::string &user, const Anope::string &pass) : IdentifyRequest(o, user, pass), reply(r), message(m), server(s), page_name(p_n), client(c), replacements(re) { }
void OnSuccess() anope_override
{
@@ -86,7 +86,7 @@ bool WebCPanel::Index::OnRequest(HTTPProvider *server, const Anope::string &page
{
// Rate limit check.
- WebpanelRequest *req = new WebpanelRequest(reply, message, server, page_name, client, replacements, user, pass);
+ WebpanelRequest *req = new WebpanelRequest(me, reply, message, server, page_name, client, replacements, user, pass);
FOREACH_MOD(I_OnCheckAuthentication, OnCheckAuthentication(NULL, req));
req->Dispatch();
return false;
diff --git a/modules/extra/webcpanel/webcpanel.cpp b/modules/extra/webcpanel/webcpanel.cpp
index b6b2d5776..c23b6efbf 100644
--- a/modules/extra/webcpanel/webcpanel.cpp
+++ b/modules/extra/webcpanel/webcpanel.cpp
@@ -7,6 +7,7 @@
#include "webcpanel.h"
+Module *me;
Anope::string provider_name, template_name, template_base, page_title;
class ModuleWebCPanel : public Module
@@ -45,6 +46,8 @@ class ModuleWebCPanel : public Module
{
this->SetAuthor("Anope");
+ me = this;
+
ConfigReader reader;
provider_name = reader.ReadValue("webcpanel", "server", "httpd/main", 0);
template_name = reader.ReadValue("webcpanel", "template", "template", 0);
diff --git a/modules/extra/webcpanel/webcpanel.h b/modules/extra/webcpanel/webcpanel.h
index e33025b52..926feaf53 100644
--- a/modules/extra/webcpanel/webcpanel.h
+++ b/modules/extra/webcpanel/webcpanel.h
@@ -11,6 +11,8 @@
#include "static_fileserver.h"
#include "template_fileserver.h"
+extern Module *me;
+
extern Anope::string provider_name, template_name, template_base, page_title;
struct SubSection