1
0
mirror of https://github.com/anope/anope.git synced 2026-07-01 17:46:38 +02:00
Files
anope/modules/webcpanel/pages/chanserv/info.cpp
T
Robby f118960a25 Update copyright to 2016. This was done with:
find include/ src/ lang/ docs/ modules/ *.* Config -exec sed -i 's/-20.. Anope Team/-2014 Anope Team/i' {} \;

Added missing copyright headers to files that didn't have it yet.
Fixed some whitespace and blank lines along the way.
2016-01-28 20:24:49 +01:00

29 lines
835 B
C++

/*
* (C) 2003-2016 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*/
#include "../../webcpanel.h"
#include "utils.h"
WebCPanel::ChanServ::Info::Info(const Anope::string &cat, const Anope::string &u) : WebPanelProtectedPage(cat, u)
{
}
bool WebCPanel::ChanServ::Info::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"];
if (!chname.empty())
replacements["ESCAPED_CHANNEL"] = HTTPUtils::URLEncode(chname);
BuildChanList(na, replacements);
TemplateFileServer page("chanserv/main.html");
page.Serve(server, page_name, client, message, reply, replacements);
return true;
}