diff options
| author | 2019-04-19 00:39:57 +0100 | |
|---|---|---|
| committer | 2019-04-19 00:39:57 +0100 | |
| commit | 21f0718c4ae18f565895b5cc05c4af3942d0f8e5 (patch) | |
| tree | 3be0d7d346aa7f966dbf2321fc81656876735aea /src/users.cpp | |
| parent | Remove CXX11_OVERRIDE from some non-overrides. (diff) | |
| download | inspircd++-21f0718c4ae18f565895b5cc05c4af3942d0f8e5.tar.gz inspircd++-21f0718c4ae18f565895b5cc05c4af3942d0f8e5.tar.bz2 inspircd++-21f0718c4ae18f565895b5cc05c4af3942d0f8e5.zip | |
Remove the 'noisy' mode for HasPrivPermission.
This was only used in one place.
Diffstat (limited to 'src/users.cpp')
| -rw-r--r-- | src/users.cpp | 16 |
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() |
