1
0
mirror of https://github.com/anope/anope.git synced 2026-06-23 20:46:38 +02:00
Files
anope/modules/webcpanel/pages/logout.cpp
T
Robby c8699c6726 Update copyright to 2020.
This was done with:
find docs/ include/ language/ modules/ src/ *.* Config -exec sed -i 's/-20.. Anope Team/-2020 Anope Team/i' {} \;
2020-01-04 15:51:20 +01:00

23 lines
707 B
C++

/*
* (C) 2003-2020 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*/
#include "../webcpanel.h"
WebCPanel::Logout::Logout(const Anope::string &u) : WebPanelProtectedPage("", u)
{
}
bool WebCPanel::Logout::OnRequest(HTTPProvider *server, const Anope::string &page_name, HTTPClient *client, HTTPMessage &message, HTTPReply &reply, NickAlias *na, TemplateFileServer::Replacements &replacements)
{
na->Shrink<Anope::string>("webcpanel_id");
na->Shrink<Anope::string>("webcpanel_ip");
reply.error = HTTP_FOUND;
reply.headers["Location"] = Anope::string("http") + (server->IsSSL() ? "s" : "") + "://" + message.headers["Host"] + "/";
return true;
}