From 45ef93896566d29151c7dcb0a1646deb25fc30f9 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Mon, 2 Jan 2023 21:46:24 +0000 Subject: Get rid of the virtual Has*Permission methods. These are no longer needed now we store privs for the remote oper. --- src/users.cpp | 46 ---------------------------------------------- 1 file changed, 46 deletions(-) (limited to 'src') diff --git a/src/users.cpp b/src/users.cpp index 33c380c83..aa77845f9 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -160,52 +160,6 @@ const std::string& User::GetFullRealHost() return this->cached_fullrealhost; } -bool User::HasModePermission(const ModeHandler* mh) const -{ - return true; -} - -bool LocalUser::HasModePermission(const ModeHandler* mh) const -{ - return IsOper() && oper->CanUseMode(mh); -} -/* - * users on remote servers can completely bypass all permissions based checks. - * This prevents desyncs when one server has different type/class tags to another. - * That having been said, this does open things up to the possibility of source changes - * 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& command) const -{ - return true; -} - -bool LocalUser::HasCommandPermission(const std::string& command) const -{ - return IsOper() && oper->CanUseCommand(command); -} - -bool User::HasPrivPermission(const std::string& privstr) const -{ - return true; -} - -bool LocalUser::HasPrivPermission(const std::string& privstr) const -{ - return IsOper() && oper->HasPrivilege(privstr); -} - -bool User::HasSnomaskPermission(char chr) const -{ - return true; -} - -bool LocalUser::HasSnomaskPermission(char chr) const -{ - return IsOper() && oper->CanUseSnomask(chr); -} - void UserIOHandler::OnDataReady() { if (user->quitting) -- cgit v1.3.1-10-gc9f91