summaryrefslogtreecommitdiff
path: root/src/command_parse.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/command_parse.cpp')
-rw-r--r--src/command_parse.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/command_parse.cpp b/src/command_parse.cpp
index 52c58ef99..774936b8b 100644
--- a/src/command_parse.cpp
+++ b/src/command_parse.cpp
@@ -218,7 +218,7 @@ 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->modes[n->second->flags_needed-65]))
+ if ((!n->second->flags_needed) || (user->IsModeSet(n->second->flags_needed)))
{
if (n->second->flags_needed)
{
@@ -250,7 +250,7 @@ CmdResult CommandParser::CallHandler(const std::string &commandname,const char**
{
if (pcnt >= n->second->min_params)
{
- if ((!n->second->flags_needed) || (user->modes[n->second->flags_needed-65]))
+ if ((!n->second->flags_needed) || (user->IsModeSet(n->second->flags_needed)))
{
if (n->second->flags_needed)
{