minor: Remove redundant EstateOwner != UUID.Zero check in IsAdministrator because checking EstateOwner == user
Due to an earlier check we already know that user != UUID.Zero so if EstateOwner == UUID.Zero, EstateOwner == user can never be true0.7.4.1
parent
bdcf2d1348
commit
6b6a00a3d5
|
@ -450,19 +450,17 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Is the given user an administrator (in other words, a god)?
|
||||
/// Is the user regarded as an administrator?
|
||||
/// </summary>
|
||||
/// <param name="user"></param>
|
||||
/// <returns></returns>
|
||||
protected bool IsAdministrator(UUID user)
|
||||
{
|
||||
if (user == UUID.Zero) return false;
|
||||
|
||||
if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero)
|
||||
{
|
||||
if (m_scene.RegionInfo.EstateSettings.EstateOwner == user && m_RegionOwnerIsGod)
|
||||
return true;
|
||||
}
|
||||
if (user == UUID.Zero)
|
||||
return false;
|
||||
|
||||
if (m_scene.RegionInfo.EstateSettings.EstateOwner == user && m_RegionOwnerIsGod)
|
||||
return true;
|
||||
|
||||
if (IsEstateManager(user) && m_RegionManagerIsGod)
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue