summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/commands.c39
-rw-r--r--src/core/bs_set.c2
-rw-r--r--src/core/cs_drop.c2
3 files changed, 2 insertions, 41 deletions
diff --git a/src/commands.c b/src/commands.c
index 6c422a9d7..4add1c552 100644
--- a/src/commands.c
+++ b/src/commands.c
@@ -88,16 +88,6 @@ void mod_run_cmd(char *service, User * u, CommandHash * cmdTable[], const char *
// Check whether or not access string is empty
}
-/*
-XXX: priv checking
- if (c->has_priv != NULL && !c->has_priv(u))
- {
- notice_lang(service, u, ACCESS_DENIED);
- alog("Access denied for %s with service %s and command %s", u->nick, service, cmd);
- return;
- }
- */
-
std::vector<std::string> params;
std::string curparam;
char *s = NULL;
@@ -145,32 +135,6 @@ XXX: priv checking
/*************************************************************************/
/**
- * Output the 'Limited to' line for the given command
- * @param service Services Client
- * @param u User Struct
- * @param c Command Struct
- * @return void
- *
-void do_help_limited(char *service, User * u, Command * c)
-{
- if (c->has_priv == is_services_oper)
- notice_lang(service, u, HELP_LIMIT_SERV_OPER);
- else if (c->has_priv == is_services_admin)
- notice_lang(service, u, HELP_LIMIT_SERV_ADMIN);
- else if (c->has_priv == is_services_root)
- notice_lang(service, u, HELP_LIMIT_SERV_ROOT);
- else if (c->has_priv == is_oper)
- notice_lang(service, u, HELP_LIMIT_IRC_OPER);
- else if (c->has_priv == is_host_setter)
- notice_lang(service, u, HELP_LIMIT_HOST_SETTER);
- else if (c->has_priv == is_host_remover)
- notice_lang(service, u, HELP_LIMIT_HOST_REMOVER);
-}
-*/
-
-/*************************************************************************/
-
-/**
* Prints the help message for a given command.
* @param services Services Client
* @param u User Struct
@@ -196,9 +160,6 @@ void mod_help_cmd(char *service, User * u, CommandHash * cmdTable[],
has_had_help = current->OnHelp(u, subcommand);
if (!has_had_help)
notice_lang(service, u, NO_HELP_AVAILABLE, cmd);
- //else {
- // do_help_limited(service, u, c);
- //}
}
/*************************************************************************/
diff --git a/src/core/bs_set.c b/src/core/bs_set.c
index d8bf4c03b..0953e3f6e 100644
--- a/src/core/bs_set.c
+++ b/src/core/bs_set.c
@@ -153,7 +153,7 @@ class CommandBSSet : public Command
if (subcommand.empty())
{
notice_help(s_BotServ, u, BOT_HELP_SET);
- if (is_services_admin(u))
+ if (u->nc->IsServicesOper())
notice_help(s_BotServ, u, BOT_SERVADMIN_HELP_SET);
}
else if (subcommand == "DONTKICKOPS")
diff --git a/src/core/cs_drop.c b/src/core/cs_drop.c
index 9098f73e0..476917cc2 100644
--- a/src/core/cs_drop.c
+++ b/src/core/cs_drop.c
@@ -106,7 +106,7 @@ class CommandCSDrop : public Command
bool OnHelp(User *u, const std::string &subcommand)
{
- if (is_services_admin(u) || is_services_root(u))
+ if (u->nc && u->nc->IsServicesOper())
notice_help(s_ChanServ, u, CHAN_SERVADMIN_HELP_DROP);
else
notice_help(s_ChanServ, u, CHAN_HELP_DROP);