From b8b63ff115f0daddf479b0da507a2f731255a06d Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 7 Oct 2012 22:39:58 -0400 Subject: Remove the asynchronous identifing hack and replace it with something better. Fixes m_*_authentication only being able to properly work when people identify normally using nickserv/identify --- modules/extra/webcpanel/webcpanel.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'modules/extra/webcpanel/webcpanel.h') diff --git a/modules/extra/webcpanel/webcpanel.h b/modules/extra/webcpanel/webcpanel.h index 9573bbb6c..e33025b52 100644 --- a/modules/extra/webcpanel/webcpanel.h +++ b/modules/extra/webcpanel/webcpanel.h @@ -66,7 +66,7 @@ class WebPanelPage : public HTTPPage { } - virtual void OnRequest(HTTPProvider *, const Anope::string &, HTTPClient *, HTTPMessage &, HTTPReply &) = 0; + virtual bool OnRequest(HTTPProvider *, const Anope::string &, HTTPClient *, HTTPMessage &, HTTPReply &) = 0; }; class WebPanelProtectedPage : public WebPanelPage @@ -78,14 +78,14 @@ class WebPanelProtectedPage : public WebPanelPage { } - void OnRequest(HTTPProvider *provider, const Anope::string &page_name, HTTPClient *client, HTTPMessage &message, HTTPReply &reply) anope_override anope_final + bool OnRequest(HTTPProvider *provider, const Anope::string &page_name, HTTPClient *client, HTTPMessage &message, HTTPReply &reply) anope_override anope_final { service_reference panel("Panel", "webcpanel"); NickAlias *na; if (!panel || !(na = panel->GetNickFromSession(client, message))) { - return; // Access denied + return true; // Access denied } TemplateFileServer::Replacements replacements; @@ -123,10 +123,10 @@ class WebPanelProtectedPage : public WebPanelPage } } - this->OnRequest(provider, page_name, client, message, reply, na, replacements); + return this->OnRequest(provider, page_name, client, message, reply, na, replacements); } - virtual void OnRequest(HTTPProvider *, const Anope::string &, HTTPClient *, HTTPMessage &, HTTPReply &, NickAlias *, TemplateFileServer::Replacements &) = 0; + virtual bool OnRequest(HTTPProvider *, const Anope::string &, HTTPClient *, HTTPMessage &, HTTPReply &, NickAlias *, TemplateFileServer::Replacements &) = 0; /* What get data should be appended to links in the navbar */ virtual std::set GetData() { return std::set(); } -- cgit