summaryrefslogtreecommitdiff
path: root/src/users.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/users.cpp')
-rw-r--r--src/users.cpp16
1 files changed, 3 insertions, 13 deletions
diff --git a/src/users.cpp b/src/users.cpp
index 3a6ddbc0f..827d818c3 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -195,27 +195,17 @@ bool LocalUser::HasPermission(const std::string &command)
return oper->AllowedOperCommands.Contains(command);
}
-bool User::HasPrivPermission(const std::string &privstr, bool noisy)
+bool User::HasPrivPermission(const std::string& privstr)
{
return true;
}
-bool LocalUser::HasPrivPermission(const std::string &privstr, bool noisy)
+bool LocalUser::HasPrivPermission(const std::string& privstr)
{
if (!this->IsOper())
- {
- if (noisy)
- this->WriteNotice("You are not an oper");
return false;
- }
-
- if (oper->AllowedPrivs.Contains(privstr))
- return true;
-
- if (noisy)
- this->WriteNotice("Oper type " + oper->name + " does not have access to priv " + privstr);
- return false;
+ return oper->AllowedPrivs.Contains(privstr);
}
void UserIOHandler::OnDataReady()