summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2007-08-27 23:22:53 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2007-08-27 23:22:53 +0000
commitceb8a3dd30f081c70331302115c329db409e4946 (patch)
treeed2f7af13ccce9ed5505e666f2f77838bb5b44d1 /src
parent12fc9198eeaea7666ad65cf64fd204d038a54e4e (diff)
Similar refactor here. Thanks danielg.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7927 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/command_parse.cpp9
1 files changed, 6 insertions, 3 deletions
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 != "<core>"))
{
- 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;
}
}