From 5b62682223d7ba433df468ff39253b02cd580f34 Mon Sep 17 00:00:00 2001 From: Adam- Date: Thu, 29 Oct 2009 00:44:26 +0000 Subject: [PATCH] Changed the "nickserv/confirm" opertype command to a permission, and added "nickserv/drop" permission used to drop other users nicks git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2595 5417fbe8-f217-4b02-8779-1006273d7864 --- data/example.conf | 3 ++- src/core/ns_drop.c | 4 ++-- src/core/ns_register.c | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/data/example.conf b/data/example.conf index 8c2dca3d9..1efd1a1cf 100644 --- a/data/example.conf +++ b/data/example.conf @@ -518,6 +518,8 @@ options * hostserv/set - Can add/modify/delete any vhost * memoserv/info - Can see any information with /memoserv info * memoserv/set-limit - Can set the limit of max stored memos on any user and channel + * nickserv/confirm - Can confirm other users nicknames + * nickserv/drop - Can drop other users nicks * * Available commands: * botserv/bot/del botserv/bot/add botserv/bot/change botserv/assign/private @@ -531,7 +533,6 @@ options * memoserv/sendall memoserv/staff * * nickserv/getpass nickserv/sendpass nickserv/getemail nickserv/suspend - * nickserv/confirm * * operserv/global operserv/news operserv/stats operserv/kick * operserv/mode operserv/session operserv/modlist operserv/ignore diff --git a/src/core/ns_drop.c b/src/core/ns_drop.c index db652b397..af51a9bb7 100644 --- a/src/core/ns_drop.c +++ b/src/core/ns_drop.c @@ -60,7 +60,7 @@ class CommandNSDrop : public Command if (is_mine && !nick) my_nick = sstrdup(na->nick); - if (!is_mine && !u->nc->IsServicesOper()) + if (!is_mine && !u->nc->HasPriv("nickserv/drop")) notice_lang(s_NickServ, u, ACCESS_DENIED); else if (NSSecureAdmins && !is_mine && na->nc->IsServicesOper()) notice_lang(s_NickServ, u, ACCESS_DENIED); @@ -98,7 +98,7 @@ class CommandNSDrop : public Command bool OnHelp(User *u, const ci::string &subcommand) { - if (u->nc && u->nc->IsServicesOper()) + if (u->nc && u->nc->HasPriv("nickserv/drop")) notice_help(s_NickServ, u, NICK_SERVADMIN_HELP_DROP); else notice_help(s_NickServ, u, NICK_HELP_DROP); diff --git a/src/core/ns_register.c b/src/core/ns_register.c index 65ccfa614..2e580e61c 100644 --- a/src/core/ns_register.c +++ b/src/core/ns_register.c @@ -116,7 +116,7 @@ class CommandNSConfirm : public Command if (!nr) { - if (u->nc && u->nc->HasCommand("nickserv/confirm")) + if (u->nc && u->nc->HasPriv("nickserv/confirm")) { /* 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 */ @@ -162,7 +162,7 @@ class CommandNSConfirm : public Command bool OnHelp(User *u, const ci::string &subcommand) { notice_help(s_NickServ, u, NICK_HELP_CONFIRM); - if (u->nc && u->nc->HasCommand("nickserv/confirm")) + if (u->nc && u->nc->HasPriv("nickserv/confirm")) notice_help(s_NickServ, u, NICK_HELP_CONFIRM_OPER); return true; }