summaryrefslogtreecommitdiff
path: root/modules/extra/webcpanel/pages/hostserv/request.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2012-12-12 01:30:50 -0500
committerAdam <Adam@anope.org>2012-12-12 01:30:50 -0500
commit04f96a54b8387c1362e6695a13dd0dd71ce0a347 (patch)
tree34174d64dbb161654252807fead2f82751cc00a0 /modules/extra/webcpanel/pages/hostserv/request.cpp
parent5f72d1fda5e297990aee7e0be805df0a734ca87d (diff)
Some small improvements to last few commits, and fixed some problems with the template engine
Diffstat (limited to 'modules/extra/webcpanel/pages/hostserv/request.cpp')
-rw-r--r--modules/extra/webcpanel/pages/hostserv/request.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/extra/webcpanel/pages/hostserv/request.cpp b/modules/extra/webcpanel/pages/hostserv/request.cpp
index aad933c3a..20b4f5740 100644
--- a/modules/extra/webcpanel/pages/hostserv/request.cpp
+++ b/modules/extra/webcpanel/pages/hostserv/request.cpp
@@ -16,10 +16,8 @@ bool WebCPanel::HostServ::Request::OnRequest(HTTPProvider *server, const Anope::
if (message.post_data.count("req") > 0)
{
std::vector<Anope::string> params;
- std::stringstream cmdstr;
+ params.push_back(HTTPUtils::URLDecode(message.post_data["req"]));
- cmdstr << HTTPUtils::URLDecode(message.post_data["req"]);
- params.push_back(cmdstr.str());
WebPanel::RunCommand(na->nc->display, na->nc, Config->HostServ, "hostserv/request", params, replacements);
}
@@ -30,6 +28,8 @@ bool WebCPanel::HostServ::Request::OnRequest(HTTPProvider *server, const Anope::
else
replacements["VHOST"] = na->GetVhostHost();
}
+ if (ServiceReference<Command>("Command", "hostserv/request"))
+ replacements["CAN_REQUEST"] = "YES";
TemplateFileServer page("hostserv/request.html");
page.Serve(server, page_name, client, message, reply, replacements);
return true;