summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2019-04-19 10:42:17 +0100
committerPeter Powell <petpow@saberuk.com>2019-04-19 10:42:17 +0100
commitd5d1311145b5eb5dbf4efd12f73d48150b1f9689 (patch)
treeca200215756762bb2b30257e05a23ccd51d6be6b /src
parent2cd6efcc64458c7b5c33529eb58fe00b7bc5e4ef (diff)
HasModePermission: use IsModeChar.
Diffstat (limited to 'src')
-rw-r--r--src/users.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/users.cpp b/src/users.cpp
index 38c8ed7f3..0d5d2a7d7 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -167,7 +167,8 @@ bool LocalUser::HasModePermission(const ModeHandler* mh) const
return false;
const unsigned char mode = mh->GetModeChar();
- if (mode < 'A' || mode > ('A' + 64)) return false;
+ if (ModeParser::IsModeChar(mode))
+ return false;
return ((mh->GetModeType() == MODETYPE_USER ? oper->AllowedUserModes : oper->AllowedChanModes))[(mode - 'A')];