From 552b2db3214e9630ee990c712336921a66a8b51e Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Fri, 7 Oct 2022 21:34:37 +0100 Subject: Mark User::Has{Command,Priv}Permission as const. --- src/users.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/users.cpp') diff --git a/src/users.cpp b/src/users.cpp index 9a9a39eda..f4a090f58 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -186,12 +186,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::HasCommandPermission(const std::string&) +bool User::HasCommandPermission(const std::string& command) const { return true; } -bool LocalUser::HasCommandPermission(const std::string& command) +bool LocalUser::HasCommandPermission(const std::string& command) const { // are they even an oper at all? if (!this->IsOper()) @@ -202,12 +202,12 @@ bool LocalUser::HasCommandPermission(const std::string& command) return oper->AllowedOperCommands.Contains(command); } -bool User::HasPrivPermission(const std::string& privstr) +bool User::HasPrivPermission(const std::string& privstr) const { return true; } -bool LocalUser::HasPrivPermission(const std::string& privstr) +bool LocalUser::HasPrivPermission(const std::string& privstr) const { if (!this->IsOper()) return false; -- cgit v1.3.1-10-gc9f91