summaryrefslogtreecommitdiff
path: root/modules/webcpanel/pages/index.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/webcpanel/pages/index.cpp')
-rw-r--r--modules/webcpanel/pages/index.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/modules/webcpanel/pages/index.cpp b/modules/webcpanel/pages/index.cpp
index 606616834..bb83aba61 100644
--- a/modules/webcpanel/pages/index.cpp
+++ b/modules/webcpanel/pages/index.cpp
@@ -1,5 +1,5 @@
/*
- * (C) 2003-2023 Anope Team
+ * (C) 2003-2024 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -16,10 +16,10 @@ class WebpanelRequest : public IdentifyRequest
Reference<HTTPClient> client;
TemplateFileServer::Replacements replacements;
- public:
+public:
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
+ void OnSuccess() override
{
if (!client || !server)
return;
@@ -60,15 +60,15 @@ class WebpanelRequest : public IdentifyRequest
{
HTTPReply::cookie c;
- c.push_back(std::make_pair("account", na->nick));
- c.push_back(std::make_pair("Path", "/"));
+ c.emplace_back("account", na->nick);
+ c.emplace_back("Path", "/");
reply.cookies.push_back(c);
}
{
HTTPReply::cookie c;
- c.push_back(std::make_pair("id", id));
- c.push_back(std::make_pair("Path", "/"));
+ c.emplace_back("id", id);
+ c.emplace_back("Path", "/");
reply.cookies.push_back(c);
}
@@ -78,7 +78,7 @@ class WebpanelRequest : public IdentifyRequest
client->SendReply(&reply);
}
- void OnFail() anope_override
+ void OnFail() override
{
if (!client || !server)
return;
@@ -125,7 +125,7 @@ bool WebCPanel::Index::OnRequest(HTTPProvider *server, const Anope::string &page
last_login_attempt[ip] = Anope::CurTime;
- WebpanelRequest *req = new WebpanelRequest(me, reply, message, server, page_name, client, replacements, user, pass);
+ auto *req = new WebpanelRequest(me, reply, message, server, page_name, client, replacements, user, pass);
FOREACH_MOD(OnCheckAuthentication, (NULL, req));
req->Dispatch();
return false;