1
0
mirror of https://github.com/anope/anope.git synced 2026-06-25 13:36:36 +02:00
Files
anope/modules/extra/webcpanel/pages/logout.cpp
T
Adam 5007b72b28 Update copyright to 2013. This was done with:
find include/ src/ lang/ docs/ modules/ *.* Config -exec sed -i 's/-2012 Anope Team/-2013 Anope Team/i' {} \;
2013-01-09 04:20:55 -05:00

24 lines
670 B
C++

/*
* (C) 2003-2013 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("webcpanel_id");
na->Shrink("webcpanel_ip");
reply.error = HTTP_FOUND;
reply.headers["Location"] = Anope::string("http") + (use_ssl ? "s" : "") + "://" + message.headers["Host"] + "/";
return true;
}