diff options
author | Peter Powell <petpow@saberuk.com> | 2019-04-19 10:42:17 +0100 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2019-04-19 10:42:17 +0100 |
commit | d5d1311145b5eb5dbf4efd12f73d48150b1f9689 (patch) | |
tree | ca200215756762bb2b30257e05a23ccd51d6be6b | |
parent | 2cd6efcc64458c7b5c33529eb58fe00b7bc5e4ef (diff) |
HasModePermission: use IsModeChar.
-rw-r--r-- | src/users.cpp | 3 |
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')]; |