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 true
0.7.3-extended
Justin Clark-Casey (justincc) 2012-05-17 01:30:50 +01:00
parent c813ed44d8
commit bae48a9394
1 changed files with 6 additions and 8 deletions

View File

@ -449,19 +449,17 @@ namespace OpenSim.Region.CoreModules.World.Permissions
} }
/// <summary> /// <summary>
/// Is the given user an administrator (in other words, a god)? /// Is the user regarded as an administrator?
/// </summary> /// </summary>
/// <param name="user"></param> /// <param name="user"></param>
/// <returns></returns> /// <returns></returns>
protected bool IsAdministrator(UUID user) protected bool IsAdministrator(UUID user)
{ {
if (user == UUID.Zero) return false; if (user == UUID.Zero)
return false;
if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero)
{
if (m_scene.RegionInfo.EstateSettings.EstateOwner == user && m_RegionOwnerIsGod) if (m_scene.RegionInfo.EstateSettings.EstateOwner == user && m_RegionOwnerIsGod)
return true; return true;
}
if (IsEstateManager(user) && m_RegionManagerIsGod) if (IsEstateManager(user) && m_RegionManagerIsGod)
return true; return true;