summaryrefslogtreecommitdiff
path: root/modules/webcpanel/pages/chanserv/info.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2014-01-02 11:02:14 -0500
committerAdam <Adam@anope.org>2014-01-02 11:03:33 -0500
commit004c4cbe5f4c37cf455cb6d0caa434fbbb3406ea (patch)
tree0e6675dfe28a829f5786b0b2f993566c61662de7 /modules/webcpanel/pages/chanserv/info.cpp
parent072202c181943901c727782e64881adadf13d7dd (diff)
Move modules out of extras that dont have external dependencies
Diffstat (limited to 'modules/webcpanel/pages/chanserv/info.cpp')
-rw-r--r--modules/webcpanel/pages/chanserv/info.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/modules/webcpanel/pages/chanserv/info.cpp b/modules/webcpanel/pages/chanserv/info.cpp
new file mode 100644
index 000000000..c16c3eaec
--- /dev/null
+++ b/modules/webcpanel/pages/chanserv/info.cpp
@@ -0,0 +1,28 @@
+/*
+ * (C) 2003-2014 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;
+}
+