aboutsummaryrefslogtreecommitdiff
path: root/src/users.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2022-10-07 21:34:37 +0100
committerGravatar Sadie Powell2022-10-07 21:34:37 +0100
commit552b2db3214e9630ee990c712336921a66a8b51e (patch)
tree26184afc01d334a006b105ad4773a004f8d70c80 /src/users.cpp
parentRemove a now unused overload of ConvToStr. (diff)
Mark User::Has{Command,Priv}Permission as const.
Diffstat (limited to 'src/users.cpp')
-rw-r--r--src/users.cpp8
1 files changed, 4 insertions, 4 deletions
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;