X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fusers.cpp;h=0d5d2a7d70c509f883cc15c0f5ee504f0cec7924;hb=b6935108cac7395565034db58d21b7a861133083;hp=827d818c3486cd39f727f02a68350fedfacbfd97;hpb=21f0718c4ae18f565895b5cc05c4af3942d0f8e5;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/users.cpp b/src/users.cpp index 827d818c3..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')]; @@ -179,12 +180,12 @@ bool LocalUser::HasModePermission(const ModeHandler* mh) const * allowing remote kills, etc - but if they have access to the src, they most likely have * access to the conf - so it's an end to a means either way. */ -bool User::HasPermission(const std::string&) +bool User::HasCommandPermission(const std::string&) { return true; } -bool LocalUser::HasPermission(const std::string &command) +bool LocalUser::HasCommandPermission(const std::string& command) { // are they even an oper at all? if (!this->IsOper())