summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
}
}