Anope IRC Services  Version 2.0
info.cpp
Go to the documentation of this file.
1 /*
2  * (C) 2003-2014 Anope Team
3  * Contact us at team@anope.org
4  *
5  * Please read COPYING and README for further details.
6  */
7 
8 #include "../../webcpanel.h"
9 #include "utils.h"
10 
12 {
13 }
14 
16 {
17  const Anope::string &chname = message.get_data["channel"];
18 
19  if (!chname.empty())
20  replacements["ESCAPED_CHANNEL"] = HTTPUtils::URLEncode(chname);
21 
22  BuildChanList(na, replacements);
23 
24  TemplateFileServer page("chanserv/main.html");
25  page.Serve(server, page_name, client, message, reply, replacements);
26  return true;
27 }
28 
void Serve(HTTPProvider *, const Anope::string &, HTTPClient *, HTTPMessage &, HTTPReply &, Replacements &)
void BuildChanList(NickAlias *na, TemplateFileServer::Replacements &replacements)
Definition: utils.cpp:24
Anope::string URLEncode(const Anope::string &url)
Definition: httpd.h:187
bool OnRequest(HTTPProvider *, const Anope::string &, HTTPClient *, HTTPMessage &, HTTPReply &, NickAlias *, TemplateFileServer::Replacements &) anope_override
Definition: info.cpp:15
bool empty() const
Definition: anope.h:126
Info(const Anope::string &cat, const Anope::string &u)
Definition: info.cpp:11
std::map< Anope::string, Anope::string > get_data
Definition: httpd.h:80