mirror of
https://github.com/anope/anope.git
synced 2026-07-08 10:43:14 +02:00
Remove NSRestrictGetPass, and replace it with opertype usage.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2237 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
@@ -315,7 +315,6 @@ E bool NSSecureAdmins;
|
||||
E bool NSStrictPrivileges;
|
||||
E bool NSEmailReg;
|
||||
E bool NSModeOnID;
|
||||
E bool NSRestrictGetPass;
|
||||
E bool NSAddAccessOnReg;
|
||||
|
||||
E int CSDefFlags;
|
||||
|
||||
@@ -119,7 +119,6 @@ bool NSSecureAdmins;
|
||||
bool NSStrictPrivileges;
|
||||
bool NSEmailReg;
|
||||
bool NSModeOnID;
|
||||
bool NSRestrictGetPass;
|
||||
bool NSAddAccessOnReg;
|
||||
|
||||
static std::string CSDefaults;
|
||||
@@ -848,7 +847,6 @@ int ServerConfig::Read(bool bail)
|
||||
{"nickserv", "secureadmins", "no", new ValueContainerBool(&NSSecureAdmins), DT_BOOLEAN, NoValidation},
|
||||
{"nickserv", "strictprivileges", "no", new ValueContainerBool(&NSStrictPrivileges), DT_BOOLEAN, NoValidation},
|
||||
{"nickserv", "modeonid", "no", new ValueContainerBool(&NSModeOnID), DT_BOOLEAN, NoValidation},
|
||||
{"nickserv", "restrictgetpass", "no", new ValueContainerBool(&NSRestrictGetPass), DT_BOOLEAN, NoValidation},
|
||||
{"nickserv", "addaccessonreg", "no", new ValueContainerBool(&NSAddAccessOnReg), DT_BOOLEAN, NoValidation},
|
||||
{"mail", "usemail", "no", new ValueContainerBool(&UseMail), DT_BOOLEAN, ValidateEmailReg},
|
||||
{"mail", "sendmailpath", "", new ValueContainerChar(&SendMailPath), DT_CHARPTR, ValidateMail},
|
||||
|
||||
@@ -31,6 +31,12 @@ class CommandNSGetPass : public Command
|
||||
NickAlias *na;
|
||||
NickRequest *nr = NULL;
|
||||
|
||||
if (!u->nc->HasCommand("nickserv/getpass"))
|
||||
{
|
||||
notice_lang(s_NickServ, u, PERMISSION_DENIED);
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
if (!(na = findnick(nick)))
|
||||
{
|
||||
if ((nr = findrequestnick(nick)))
|
||||
@@ -47,8 +53,6 @@ class CommandNSGetPass : public Command
|
||||
notice_lang(s_NickServ, u, NICK_X_FORBIDDEN, na->nick);
|
||||
else if (NSSecureAdmins && na->nc->IsServicesOper())
|
||||
notice_lang(s_NickServ, u, PERMISSION_DENIED);
|
||||
else if (NSRestrictGetPass && !is_services_root(u))
|
||||
notice_lang(s_NickServ, u, PERMISSION_DENIED);
|
||||
else
|
||||
{
|
||||
if (enc_decrypt(na->nc->pass, tmp_pass, PASSMAX - 1) == 1)
|
||||
@@ -66,9 +70,6 @@ class CommandNSGetPass : public Command
|
||||
|
||||
bool OnHelp(User *u, const std::string &subcommand)
|
||||
{
|
||||
if (!is_services_admin(u))
|
||||
return false;
|
||||
|
||||
notice_help(s_NickServ, u, NICK_SERVADMIN_HELP_GETPASS);
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user