summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/ns_logout.c6
-rw-r--r--src/core/ns_register.c2
-rw-r--r--src/core/ns_saset.c6
-rw-r--r--src/core/ns_sendpass.c2
-rw-r--r--src/core/ns_suspend.c13
5 files changed, 8 insertions, 21 deletions
diff --git a/src/core/ns_logout.c b/src/core/ns_logout.c
index b9be711cc..a726b1f15 100644
--- a/src/core/ns_logout.c
+++ b/src/core/ns_logout.c
@@ -34,7 +34,7 @@ class CommandNSLogout : public Command
User *u2;
NickAlias *na;
- if (!is_services_admin(u) && nick)
+ if (!u->nc->IsServicesOper() && nick)
this->OnSyntaxError(u);
else if (!(u2 = (nick ? finduser(nick) : u)))
notice_lang(s_NickServ, u, NICK_X_NOT_IN_USE, nick);
@@ -47,7 +47,7 @@ class CommandNSLogout : public Command
}
else if (!nick && !nick_identified(u))
notice_lang(s_NickServ, u, NICK_IDENTIFY_REQUIRED, s_NickServ);
- else if (nick && is_services_admin(u2))
+ else if (nick && !u2->nc->IsServicesOper())
notice_lang(s_NickServ, u, NICK_LOGOUT_SERVICESADMIN, nick);
else
{
@@ -88,7 +88,7 @@ class CommandNSLogout : public Command
bool OnHelp(User *u, const std::string &subcommand)
{
- if (is_services_admin(u))
+ if (u->nc && u->nc->IsServicesOper())
notice_help(s_NickServ, u, NICK_SERVADMIN_HELP_LOGOUT);
else
notice_help(s_NickServ, u, NICK_HELP_LOGOUT);
diff --git a/src/core/ns_register.c b/src/core/ns_register.c
index 203808ba9..8f011fc3f 100644
--- a/src/core/ns_register.c
+++ b/src/core/ns_register.c
@@ -132,7 +132,7 @@ class CommandNSConfirm : public Command
if (!nr)
{
- if (is_services_admin(u))
+ if (u->nc->IsServicesOper())
{
/* If an admin, their nick is obviously already regged, so look at the passcode to get the nick
of the user they are trying to validate, and push that user through regardless of passcode */
diff --git a/src/core/ns_saset.c b/src/core/ns_saset.c
index 3f642d0e5..4b2322743 100644
--- a/src/core/ns_saset.c
+++ b/src/core/ns_saset.c
@@ -536,9 +536,6 @@ public:
bool OnHelp(User *u, const std::string &subcommand)
{
- if (!is_services_oper(u))
- return false;
-
if (subcommand.empty())
notice_help(s_NickServ, u, NICK_HELP_SASET);
else if (subcommand == "DISPLAY")
@@ -602,8 +599,7 @@ public:
**/
void myNickServHelp(User *u)
{
- if (is_services_oper(u))
- notice_lang(s_NickServ, u, NICK_HELP_CMD_SASET);
+ notice_lang(s_NickServ, u, NICK_HELP_CMD_SASET);
}
MODULE_INIT("ns_saset", NSSASet)
diff --git a/src/core/ns_sendpass.c b/src/core/ns_sendpass.c
index f6f37c02f..6ebd3385c 100644
--- a/src/core/ns_sendpass.c
+++ b/src/core/ns_sendpass.c
@@ -29,7 +29,7 @@ class CommandNSSendPass : public Command
const char *nick = params[0].c_str();
NickAlias *na;
- if (RestrictMail && !is_services_oper(u))
+ if (RestrictMail && !u->nc->HasCommand("nickserv/sendpass"))
notice_lang(s_NickServ, u, PERMISSION_DENIED);
else if (!(na = findnick(nick)))
notice_lang(s_NickServ, u, NICK_X_NOT_REGISTERED, nick);
diff --git a/src/core/ns_suspend.c b/src/core/ns_suspend.c
index be34889df..9c32e8d90 100644
--- a/src/core/ns_suspend.c
+++ b/src/core/ns_suspend.c
@@ -94,9 +94,6 @@ class CommandNSSuspend : public Command
bool OnHelp(User *u, const std::string &subcommand)
{
- if (!is_services_oper(u))
- return false;
-
notice_help(s_NickServ, u, NICK_SERVADMIN_HELP_SUSPEND);
return true;
}
@@ -164,9 +161,6 @@ class CommandNSUnSuspend : public Command
bool OnHelp(User *u, const std::string &subcommand)
{
- if (!is_services_oper(u))
- return false;
-
notice_help(s_NickServ, u, NICK_SERVADMIN_HELP_UNSUSPEND);
return true;
}
@@ -199,11 +193,8 @@ class NSSuspend : public Module
**/
void myNickServHelp(User *u)
{
- if (is_services_oper(u))
- {
- notice_lang(s_NickServ, u, NICK_HELP_CMD_SUSPEND);
- notice_lang(s_NickServ, u, NICK_HELP_CMD_UNSUSPEND);
- }
+ notice_lang(s_NickServ, u, NICK_HELP_CMD_SUSPEND);
+ notice_lang(s_NickServ, u, NICK_HELP_CMD_UNSUSPEND);
}
MODULE_INIT("ns_suspend", NSSuspend)