summaryrefslogtreecommitdiff
path: root/modules/webcpanel
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2017-05-29 12:49:22 -0400
committerAdam <Adam@anope.org>2017-05-29 13:11:16 -0400
commit3f143633541a5361bf5b02b0d69b65447aea7b79 (patch)
tree3a33bd044bc8936150dcab38f355f3c3726b05e5 /modules/webcpanel
parente36d24a6c500b5ad921041fcb905f684c09d71e9 (diff)
Remove recognized status and secure
Also remove /ns status, which is now almost useless with no recognized status, and /ns access.
Diffstat (limited to 'modules/webcpanel')
-rw-r--r--modules/webcpanel/pages/chanserv/set.cpp8
-rw-r--r--modules/webcpanel/pages/nickserv/access.cpp53
-rw-r--r--modules/webcpanel/pages/nickserv/access.h37
-rw-r--r--modules/webcpanel/pages/nickserv/info.cpp7
-rw-r--r--modules/webcpanel/templates/default/chanserv/set.html4
-rw-r--r--modules/webcpanel/templates/default/nickserv/info.html4
-rw-r--r--modules/webcpanel/webcpanel.cpp8
-rw-r--r--modules/webcpanel/webcpanel.h1
8 files changed, 0 insertions, 122 deletions
diff --git a/modules/webcpanel/pages/chanserv/set.cpp b/modules/webcpanel/pages/chanserv/set.cpp
index 7369655ee..8e3ef0bf7 100644
--- a/modules/webcpanel/pages/chanserv/set.cpp
+++ b/modules/webcpanel/pages/chanserv/set.cpp
@@ -76,11 +76,6 @@ bool WebCPanel::ChanServ::Set::OnRequest(HTTPProvider *server, const Anope::stri
ci->SetRestricted(!ci->IsRestricted());
replacements["MESSAGES"] = "Restricted updated";
}
- if (ci->IsSecure() != message.post_data.count("secure"))
- {
- ci->SetSecure(!ci->IsSecure());
- replacements["MESSAGES"] = "Secure updated";
- }
if (ci->IsSecureOps() != message.post_data.count("secureops"))
{
ci->SetSecureOps(!ci->IsSecureOps());
@@ -123,9 +118,6 @@ bool WebCPanel::ChanServ::Set::OnRequest(HTTPProvider *server, const Anope::stri
if (ci->IsRestricted())
replacements["RESTRICTED"];
- if (ci->IsSecure())
- replacements["SECURE"];
-
if (ci->IsSecureOps())
replacements["SECUREOPS"];
diff --git a/modules/webcpanel/pages/nickserv/access.cpp b/modules/webcpanel/pages/nickserv/access.cpp
deleted file mode 100644
index c617ba05d..000000000
--- a/modules/webcpanel/pages/nickserv/access.cpp
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Anope IRC Services
- *
- * Copyright (C) 2012-2017 Anope Team <team@anope.org>
- *
- * This file is part of Anope. Anope is free software; you can
- * redistribute it and/or modify it under the terms of the GNU
- * General Public License as published by the Free Software
- * Foundation, version 2.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, see see <http://www.gnu.org/licenses/>.
- */
-
-#include "../../webcpanel.h"
-#include "modules/nickserv/access.h"
-
-WebCPanel::NickServ::Access::Access(const Anope::string &cat, const Anope::string &u) : WebPanelProtectedPage(cat, u)
-{
-}
-
-bool WebCPanel::NickServ::Access::OnRequest(HTTPProvider *server, const Anope::string &page_name, HTTPClient *client, HTTPMessage &message, HTTPReply &reply, ::NickServ::Nick *na, TemplateFileServer::Replacements &replacements)
-{
- if (message.post_data.count("access") > 0)
- {
- std::vector<Anope::string> params;
- params.push_back("ADD");
- params.push_back(message.post_data["access"]);
-
- WebPanel::RunCommand(na->GetAccount()->GetDisplay(), na->GetAccount(), "NickServ", "nickserv/access", params, replacements);
- }
- else if (message.get_data.count("del") > 0 && message.get_data.count("mask") > 0)
- {
- std::vector<Anope::string> params;
- params.push_back("DEL");
- params.push_back(message.get_data["mask"]);
-
- WebPanel::RunCommand(na->GetAccount()->GetDisplay(), na->GetAccount(), "NickServ", "nickserv/access", params, replacements);
- }
-
- for (NickAccess *a : na->GetAccount()->GetRefs<NickAccess *>())
- replacements["ACCESS"] = a->GetMask();
-
- TemplateFileServer page("nickserv/access.html");
- page.Serve(server, page_name, client, message, reply, replacements);
- return true;
-}
-
diff --git a/modules/webcpanel/pages/nickserv/access.h b/modules/webcpanel/pages/nickserv/access.h
deleted file mode 100644
index 122901abd..000000000
--- a/modules/webcpanel/pages/nickserv/access.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Anope IRC Services
- *
- * Copyright (C) 2012-2017 Anope Team <team@anope.org>
- *
- * This file is part of Anope. Anope is free software; you can
- * redistribute it and/or modify it under the terms of the GNU
- * General Public License as published by the Free Software
- * Foundation, version 2.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, see see <http://www.gnu.org/licenses/>.
- */
-
-namespace WebCPanel
-{
-
-namespace NickServ
-{
-
-class Access : public WebPanelProtectedPage
-{
- public:
- Access(const Anope::string &cat, const Anope::string &u);
-
- bool OnRequest(HTTPProvider *, const Anope::string &, HTTPClient *, HTTPMessage &, HTTPReply &, ::NickServ::Nick *, TemplateFileServer::Replacements &) override;
-};
-
-}
-
-}
-
diff --git a/modules/webcpanel/pages/nickserv/info.cpp b/modules/webcpanel/pages/nickserv/info.cpp
index f34bb0e5f..98e90ef4e 100644
--- a/modules/webcpanel/pages/nickserv/info.cpp
+++ b/modules/webcpanel/pages/nickserv/info.cpp
@@ -58,11 +58,6 @@ bool WebCPanel::NickServ::Info::OnRequest(HTTPProvider *server, const Anope::str
na->GetAccount()->SetPrivate(!na->GetAccount()->IsPrivate());
replacements["MESSAGES"] = "Private updated";
}
- if (na->GetAccount()->IsSecure() != message.post_data.count("secure"))
- {
- na->GetAccount()->SetSecure(!na->GetAccount()->IsSecure());
- replacements["MESSAGES"] = "Secure updated";
- }
if (message.post_data["kill"] == "on" && !na->GetAccount()->IsKillProtect())
{
na->GetAccount()->SetKillProtect(true);
@@ -101,8 +96,6 @@ bool WebCPanel::NickServ::Info::OnRequest(HTTPProvider *server, const Anope::str
replacements["AUTOOP"];
if (na->GetAccount()->IsPrivate())
replacements["PRIVATE"];
- if (na->GetAccount()->IsSecure())
- replacements["SECURE"];
if (na->GetAccount()->IsKillProtect())
replacements["KILL_ON"];
if (na->GetAccount()->IsKillQuick())
diff --git a/modules/webcpanel/templates/default/chanserv/set.html b/modules/webcpanel/templates/default/chanserv/set.html
index 050c37f69..f8465293f 100644
--- a/modules/webcpanel/templates/default/chanserv/set.html
+++ b/modules/webcpanel/templates/default/chanserv/set.html
@@ -65,10 +65,6 @@
<td><input type="checkbox" name="restricted" value="on" {IF EXISTS RESTRICTED}checked{END IF}></td>
</tr>
<tr>
- <td>Secure</td>
- <td><input type="checkbox" name="secure" value="on" {IF EXISTS SECURE}checked{END IF}></td>
- </tr>
- <tr>
<td>Secure Ops</td>
<td><input type="checkbox" name="secureops" value="on" {IF EXISTS SECUREOPS}checked{END IF}></td>
</tr>
diff --git a/modules/webcpanel/templates/default/nickserv/info.html b/modules/webcpanel/templates/default/nickserv/info.html
index 667c8b370..676e6cf76 100644
--- a/modules/webcpanel/templates/default/nickserv/info.html
+++ b/modules/webcpanel/templates/default/nickserv/info.html
@@ -49,10 +49,6 @@
<td><input type="checkbox" name="private" value="on" {IF EXISTS PRIVATE}checked{END IF}></td>
</tr>
<tr>
- <td>Secure:</td>
- <td><input type="checkbox" name="secure" value="on" {IF EXISTS SECURE}checked{END IF}></td>
- </tr>
- <tr>
<td>Kill:</td>
<td>
<select name="kill" class="form-control input-sm">
diff --git a/modules/webcpanel/webcpanel.cpp b/modules/webcpanel/webcpanel.cpp
index ba879a98f..d6bb9f8b7 100644
--- a/modules/webcpanel/webcpanel.cpp
+++ b/modules/webcpanel/webcpanel.cpp
@@ -37,7 +37,6 @@ class ModuleWebCPanel : public Module
WebCPanel::NickServ::Info nickserv_info;
WebCPanel::NickServ::Cert nickserv_cert;
- WebCPanel::NickServ::Access nickserv_access;
WebCPanel::NickServ::Alist nickserv_alist;
WebCPanel::ChanServ::Info chanserv_info;
@@ -69,7 +68,6 @@ class ModuleWebCPanel : public Module
, confirm("/confirm")
, nickserv_info("NickServ", "/nickserv/info")
, nickserv_cert("NickServ", "/nickserv/cert")
- , nickserv_access("NickServ", "/nickserv/access")
, nickserv_alist("NickServ", "/nickserv/alist")
, chanserv_info("ChanServ", "/chanserv/info")
, chanserv_set("ChanServ", "/chanserv/set")
@@ -124,11 +122,6 @@ class ModuleWebCPanel : public Module
provider->RegisterPage(&this->nickserv_cert);
}
- ss.name = "Access";
- ss.url = "/nickserv/access";
- s.subsections.push_back(ss);
- provider->RegisterPage(&this->nickserv_access);
-
ss.name = "AList";
ss.url = "/nickserv/alist";
s.subsections.push_back(ss);
@@ -239,7 +232,6 @@ class ModuleWebCPanel : public Module
provider->UnregisterPage(&this->nickserv_info);
provider->UnregisterPage(&this->nickserv_cert);
- provider->UnregisterPage(&this->nickserv_access);
provider->UnregisterPage(&this->nickserv_alist);
provider->UnregisterPage(&this->chanserv_info);
diff --git a/modules/webcpanel/webcpanel.h b/modules/webcpanel/webcpanel.h
index d82efaf3b..1dd206dec 100644
--- a/modules/webcpanel/webcpanel.h
+++ b/modules/webcpanel/webcpanel.h
@@ -177,7 +177,6 @@ namespace WebPanel
#include "pages/nickserv/info.h"
#include "pages/nickserv/cert.h"
-#include "pages/nickserv/access.h"
#include "pages/nickserv/alist.h"
#include "pages/chanserv/info.h"