summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2016-05-23 12:00:41 +0100
committerPeter Powell <petpow@saberuk.com>2016-09-13 22:33:40 +0100
commit164ad71fc36f79efc823b7523de79603f6e0ac27 (patch)
tree927ba907a35c05b3ae82bf53b1107688512abe1f
parent35486d5521f6445ff998c3e91ca0c559587b8052 (diff)
Remove nickserv/getpass as that module is now obsolete.
-rw-r--r--data/anope.example.conf5
-rw-r--r--data/nickserv.example.conf16
-rw-r--r--modules/nickserv/getpass.cpp82
3 files changed, 4 insertions, 99 deletions
diff --git a/data/anope.example.conf b/data/anope.example.conf
index 7724c8125..b2dee0ca7 100644
--- a/data/anope.example.conf
+++ b/data/anope.example.conf
@@ -731,7 +731,7 @@ log
log
{
target = "globops"
- admin = "global/* operserv/mode operserv/kick operserv/akill operserv/s*line operserv/noop operserv/jupe operserv/oline operserv/set operserv/svsnick operserv/svsjoin operserv/svspart nickserv/getpass */drop"
+ admin = "global/* operserv/mode operserv/kick operserv/akill operserv/s*line operserv/noop operserv/jupe operserv/oline operserv/set operserv/svsnick operserv/svsjoin operserv/svspart */drop"
servers = "squit"
users = "oper"
other = "expire/* bados akill/*"
@@ -787,8 +787,7 @@ log
*
* memoserv/sendall memoserv/staff
*
- * nickserv/getpass nickserv/getemail nickserv/suspend nickserv/ajoin
- * nickserv/list
+ * nickserv/getemail nickserv/suspend nickserv/ajoin nickserv/list
*
* nickserv/saset/autoop nickserv/saset/email nickserv/saset/greet nickserv/saset/password
* nickserv/saset/display nickserv/saset/kill nickserv/saset/language nickserv/saset/message
diff --git a/data/nickserv.example.conf b/data/nickserv.example.conf
index bc5dac89e..fcd37db71 100644
--- a/data/nickserv.example.conf
+++ b/data/nickserv.example.conf
@@ -118,8 +118,8 @@ module
expire = 21d
/*
- * Prevents the use of the ACCESS and CERT (excluding their LIST subcommand), DROP, FORBID, SUSPEND,
- * GETPASS and SET PASSWORD commands by services operators on other services operators.
+ * Prevents the use of the ACCESS and CERT (excluding their LIST subcommand), DROP, FORBID, SUSPEND
+ * and SET PASSWORD commands by services operators on other services operators.
*
* This directive is optional, but recommended.
*/
@@ -323,18 +323,6 @@ module { name = "nickserv/getemail" }
command { service = "NickServ"; name = "GETEMAIL"; command = "nickserv/getemail"; permission = "nickserv/getemail"; group = "nickserv/admin"; }
/*
- * nickserv/getpass
- *
- * Provides the command nickserv/getpass.
- *
- * Used for getting users passwords.
- *
- * Requires no encryption is being used.
- */
-#module { name = "nickserv/getpass" }
-#command { service = "NickServ"; name = "GETPASS"; command = "nickserv/getpass"; permission = "nickserv/getpass"; }
-
-/*
* nickserv/group
*
* Provides the commands nickserv/group, nickserv/glist, and nickserv/ungroup.
diff --git a/modules/nickserv/getpass.cpp b/modules/nickserv/getpass.cpp
deleted file mode 100644
index b8f746ccc..000000000
--- a/modules/nickserv/getpass.cpp
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Anope IRC Services
- *
- * Copyright (C) 2003-2016 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 "module.h"
-
-class CommandNSGetPass : public Command
-{
- public:
- CommandNSGetPass(Module *creator) : Command(creator, "nickserv/getpass", 1, 1)
- {
- this->SetDesc(_("Retrieve the password for a nickname"));
- this->SetSyntax(_("\037account\037"));
- }
-
- void Execute(CommandSource &source, const std::vector<Anope::string> &params) override
- {
- const Anope::string &nick = params[0];
- Anope::string tmp_pass;
- NickServ::Nick *na = NickServ::FindNick(nick);
-
- if (!na)
- {
- source.Reply(_("\002{0}\002 isn't registered."), nick);
- return;
- }
-
- if (Config->GetModule("nickserv")->Get<bool>("secureadmins", "yes") && na->GetAccount()->IsServicesOper())
- {
- source.Reply(_("You may not get the password of other Services Operators."));
- return;
- }
-
- if (!Anope::Decrypt(na->GetAccount()->GetPassword(), tmp_pass))
- {
- source.Reply(_("The \002{0}\002 command is unavailable because encryption is in use."), source.command);
- return;
- }
-
- Log(LOG_ADMIN, source, this) << "for " << na->GetNick();
- source.Reply(_("Password of \002{0}\02 is \002%s\002."), na->GetNick(), tmp_pass);
- }
-
- bool OnHelp(CommandSource &source, const Anope::string &subcommand) override
- {
- source.Reply(_("Returns the password for the given account. This command may not be available if password encryption is in use."));
- return true;
- }
-};
-
-class NSGetPass : public Module
-{
- CommandNSGetPass commandnsgetpass;
-
- public:
- NSGetPass(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR)
- , commandnsgetpass(this)
- {
-
- Anope::string tmp_pass = "plain:tmp";
- if (!Anope::Decrypt(tmp_pass, tmp_pass))
- throw ModuleException("Incompatible with the encryption module being used");
-
- }
-};
-
-MODULE_INIT(NSGetPass)