From b79c68d829bcc2874aa295d6fb6ca08729dcbb4e Mon Sep 17 00:00:00 2001 From: rburchell Date: Wed, 1 Apr 2009 23:32:06 +0000 Subject: Change some stuff to use NC::IsServicesOper instead of is_services_*. Remove some unused language strings also. git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2233 5417fbe8-f217-4b02-8779-1006273d7864 --- src/commands.c | 39 --------------------------------------- src/core/bs_set.c | 2 +- src/core/cs_drop.c | 2 +- 3 files changed, 2 insertions(+), 41 deletions(-) (limited to 'src') 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 params; std::string curparam; char *s = NULL; @@ -144,32 +134,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 @@ -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); -- cgit