diff options
| author | Adam <Adam@anope.org> | 2012-10-07 22:39:58 -0400 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2012-10-07 22:39:58 -0400 |
| commit | b8b63ff115f0daddf479b0da507a2f731255a06d (patch) | |
| tree | d6b82bf0dfc39fdfe6a6a23ba318bb0c2906d6c1 /modules/extra/webcpanel/pages/chanserv/access.cpp | |
| parent | 0a111c19764ed14ab5f724c78d9dd8c08a3c124f (diff) | |
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
Diffstat (limited to 'modules/extra/webcpanel/pages/chanserv/access.cpp')
| -rw-r--r-- | modules/extra/webcpanel/pages/chanserv/access.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/modules/extra/webcpanel/pages/chanserv/access.cpp b/modules/extra/webcpanel/pages/chanserv/access.cpp index d3ec2ad99..71fe1a7e9 100644 --- a/modules/extra/webcpanel/pages/chanserv/access.cpp +++ b/modules/extra/webcpanel/pages/chanserv/access.cpp @@ -11,7 +11,7 @@ WebCPanel::ChanServ::Access::Access(const Anope::string &cat, const Anope::strin { } -void WebCPanel::ChanServ::Access::OnRequest(HTTPProvider *server, const Anope::string &page_name, HTTPClient *client, HTTPMessage &message, HTTPReply &reply, NickAlias *na, TemplateFileServer::Replacements &replacements) +bool WebCPanel::ChanServ::Access::OnRequest(HTTPProvider *server, const Anope::string &page_name, HTTPClient *client, HTTPMessage &message, HTTPReply &reply, NickAlias *na, TemplateFileServer::Replacements &replacements) { const Anope::string &chname = message.get_data["channel"]; @@ -19,19 +19,19 @@ void WebCPanel::ChanServ::Access::OnRequest(HTTPProvider *server, const Anope::s { reply.error = HTTP_FOUND; reply.headers["Location"] = "http://" + message.headers["Host"] + "/chanserv/info"; - return; + return true; } ChannelInfo *ci = cs_findchan(chname); if (!ci) - return; + return true; AccessGroup u_access = ci->AccessFor(na->nc); bool has_priv = na->nc->IsServicesOper() && na->nc->o->ot->HasPriv("chanserv/access/modify"); if (!u_access.HasPriv("ACCESS_LIST") && !has_priv) - return; + return true; const ChanAccess *highest = u_access.Highest(); @@ -136,6 +136,7 @@ void WebCPanel::ChanServ::Access::OnRequest(HTTPProvider *server, const Anope::s TemplateFileServer page("chanserv/access.html"); page.Serve(server, page_name, client, message, reply, replacements); + return true; } std::set<Anope::string> WebCPanel::ChanServ::Access::GetData() anope_override |
