From ceb8a3dd30f081c70331302115c329db409e4946 Mon Sep 17 00:00:00 2001 From: w00t Date: Mon, 27 Aug 2007 23:22:53 +0000 Subject: Similar refactor here. Thanks danielg. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7927 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/command_parse.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/command_parse.cpp') diff --git a/src/command_parse.cpp b/src/command_parse.cpp index 6ba4758bd..54a077b82 100644 --- a/src/command_parse.cpp +++ b/src/command_parse.cpp @@ -217,12 +217,15 @@ bool CommandParser::IsValidCommand(const std::string &commandname, int pcnt, use { if ((pcnt>=n->second->min_params) && (n->second->source != "")) { - if ((!n->second->flags_needed) || (user->IsModeSet(n->second->flags_needed))) + if (IS_LOCAL(user) && n->second->flags_needed) { - if (n->second->flags_needed) + if (user->IsModeSet(n->second->flags_needed)) { - return ((user->HasPermission(commandname)) || (ServerInstance->ULine(user->server))); + return (user->HasPermission(commandname)); } + } + else + { return true; } } -- cgit v1.2.3