From dc102049b0e91c5aa730f067c26e33f3e138386d Mon Sep 17 00:00:00 2001 From: cyberbotx Date: Tue, 5 May 2009 22:26:41 +0000 Subject: Adds check for opertype permissions to mod_run_cmd() in commands.c, and adds optional parameter to Command class constructor that takes the opertype permissions for the command. git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2292 5417fbe8-f217-4b02-8779-1006273d7864 --- src/core/os_restart.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'src/core/os_restart.c') diff --git a/src/core/os_restart.c b/src/core/os_restart.c index 56b2daa3c..c5a59ea73 100644 --- a/src/core/os_restart.c +++ b/src/core/os_restart.c @@ -18,16 +18,12 @@ class CommandOSRestart : public Command { public: - CommandOSRestart() : Command("RESTART", 0, 0) + CommandOSRestart() : Command("RESTART", 0, 0, "operserv/restart") { } CommandReturn Execute(User *u, std::vector ¶ms) { - if (!u->nc->HasCommand("operserv/restart")) { - notice_lang(s_OperServ, u, ACCESS_DENIED); - return MOD_STOP; - } #ifdef SERVICES_BIN quitmsg = new char[31 + strlen(u->nick)]; @@ -48,9 +44,6 @@ class CommandOSRestart : public Command bool OnHelp(User *u, const std::string &subcommand) { - if (!u->nc->HasCommand("operserv/restart")) - return false; - notice_help(s_OperServ, u, OPER_HELP_RESTART); return true; } -- cgit