private void handleEstateAccessDeltaRequest(IClientAPI remote_client, UUID invoice, int estateAccessType,
                                                    UUID user)
        {
            // EstateAccessDelta handles Estate Managers, Sim Access, Sim Banlist, allowed Groups..  etc.

            if (user == m_scene.RegionInfo.EstateSettings.EstateOwner)
                return; // never process EO

            IEstateConnector connector = Framework.Utilities.DataManager.RequestPlugin<IEstateConnector>();
            List<EstateSettings> estates = new List<EstateSettings>();
            if ((estateAccessType & (int)AccessDeltaRequest.ApplyToAllEstates) != 0 && connector != null)
                estates = connector.GetEstates(m_scene.RegionInfo.EstateSettings.EstateOwner);
            else
                estates = new List<EstateSettings>() { m_scene.RegionInfo.EstateSettings };

            bool moreToCome = (estateAccessType & (int)AccessDeltaRequest.MoreToCome) != 0;
            List<Action<UUID>> actions = new List<Action<UUID>>();
            bool isOwner = m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) ||
                       m_scene.Permissions.BypassPermissions();
            bool isManager = m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, false);

            foreach (EstateSettings es in estates)
            {
                if (isOwner)
                {
                    if ((estateAccessType & (int)AccessDeltaRequest.AddEstateManager) != 0)
                        actions.Add(es.AddEstateManager);
                    else if ((estateAccessType & (int)AccessDeltaRequest.RemoveEstateManager) != 0)
                        actions.Add(es.RemoveEstateManager);
                }
                if (isManager)
                {
                    if ((estateAccessType & (int)AccessDeltaRequest.AddAllowedUser) != 0)
                        actions.Add(es.AddEstateUser);
                    else if ((estateAccessType & (int)AccessDeltaRequest.RemoveAllowedUser) != 0)
                        actions.Add(es.RemoveEstateUser);
                    else if ((estateAccessType & (int)AccessDeltaRequest.AddAllowedGroup) != 0)
                        actions.Add(es.AddEstateGroup);
                    else if ((estateAccessType & (int)AccessDeltaRequest.RemoveAllowedGroup) != 0)
                        actions.Add(es.RemoveEstateGroup);
                    else if ((estateAccessType & (int)AccessDeltaRequest.AddBannedUser) != 0)
                        actions.Add((userID) =>
                        {
                            IScenePresence SP = m_scene.GetScenePresence(user);
                            EstateBan item = new EstateBan
                            {
                                BannedUserID = userID,
                                EstateID = es.EstateID,
                                BannedHostAddress = "0.0.0.0",
                                BannedHostIPMask = (SP != null)
                                                        ? ((System.Net.IPEndPoint)SP.ControllingClient.GetClientEP())
                                                              .Address.ToString()
                                                        : "0.0.0.0"
                            };

                            es.AddBan(item);

                            IEntityTransferModule transferModule =
                                    m_scene.RequestModuleInterface<IEntityTransferModule>();
                            if (SP != null && transferModule != null)
                            {
                                if (!SP.IsChildAgent)
                                    transferModule.TeleportHome(user, SP.ControllingClient);
                                else
                                    transferModule.IncomingCloseAgent(SP.Scene, SP.UUID);
                            }
                        });
                    else if ((estateAccessType & (int)AccessDeltaRequest.RemoveBannedUser) != 0)
                        actions.Add(es.RemoveBan);
                }
            }

            foreach (Action<UUID> es in actions)
            {
                es(user);

                if (!moreToCome)
                    connector.SaveEstateSettings(m_scene.RegionInfo.EstateSettings);
            }
            if(actions.Count > 0)
                TriggerEstateInfoChange();

            if (!isManager && !isOwner)
                remote_client.SendAlertMessage("You don't have the correct permissions to accomplish this action.");

            if ((estateAccessType & (int) AccessDeltaRequest.MoreToCome) == 0) //1024 means more than one is being sent
            {
                remote_client.SendEstateList(invoice, (int) EstateTools.EstateAccessReplyDelta.AllowedUsers,
                                             m_scene.RegionInfo.EstateSettings.EstateAccess,
                                             m_scene.RegionInfo.EstateSettings.EstateID);
                remote_client.SendEstateList(invoice, (int) EstateTools.EstateAccessReplyDelta.AllowedGroups,
                                             m_scene.RegionInfo.EstateSettings.EstateGroups,
                                             m_scene.RegionInfo.EstateSettings.EstateID);
                remote_client.SendBannedUserList(invoice, m_scene.RegionInfo.EstateSettings.EstateBans,
                                                 m_scene.RegionInfo.EstateSettings.EstateID);
                remote_client.SendEstateList(invoice, (int) EstateTools.EstateAccessReplyDelta.EstateManagers,
                                             m_scene.RegionInfo.EstateSettings.EstateManagers,
                                             m_scene.RegionInfo.EstateSettings.EstateID);
            }
        }
        protected void SetRegionInfoOption(IScene scene, string[] cmdparams)
        {
            #region 3 Params needed

            if (cmdparams.Length < 4)
            {
                MainConsole.Instance.Warn("Not enough parameters!");
                return;
            }
            if (cmdparams[2] == "Maturity")
            {
                switch (cmdparams[3])
                {
                    case "PG":
                        m_scene.RegionInfo.AccessLevel = Util.ConvertMaturityToAccessLevel(0);
                        break;
                    case "Mature":
                        m_scene.RegionInfo.AccessLevel = Util.ConvertMaturityToAccessLevel(1);
                        break;
                    case "Adult":
                        m_scene.RegionInfo.AccessLevel = Util.ConvertMaturityToAccessLevel(2);
                        break;
                    default:
                        MainConsole.Instance.Warn(
                            "Your parameter did not match any existing parameters. Try PG, Mature, or Adult");
                        return;
                }
                //Tell the grid about the changes
                IGridRegisterModule gridRegModule = m_scene.RequestModuleInterface<IGridRegisterModule>();
                if (gridRegModule != null)
                    gridRegModule.UpdateGridRegion(m_scene);
            }

            #endregion

            #region 4 Params needed

            if (cmdparams.Length < 4)
            {
                MainConsole.Instance.Warn("Not enough parameters!");
                return;
            }
            if (cmdparams[2] == "AddEstateBan".ToLower())
            {
                EstateBan EB = new EstateBan
                                   {
                                       BannedUserID =
                                           m_scene.UserAccountService.GetUserAccount(null, cmdparams[3],
                                                                                         cmdparams[4]).PrincipalID
                                   };
                m_scene.RegionInfo.EstateSettings.AddBan(EB);
            }
            if (cmdparams[2] == "AddEstateManager".ToLower())
            {
                m_scene.RegionInfo.EstateSettings.AddEstateManager(
                    m_scene.UserAccountService.GetUserAccount(null, cmdparams[3], cmdparams[4]).PrincipalID);
            }
            if (cmdparams[2] == "AddEstateAccess".ToLower())
            {
                m_scene.RegionInfo.EstateSettings.AddEstateUser(
                    m_scene.UserAccountService.GetUserAccount(null, cmdparams[3], cmdparams[4]).PrincipalID);
            }
            if (cmdparams[2] == "RemoveEstateBan".ToLower())
            {
                m_scene.RegionInfo.EstateSettings.RemoveBan(
                    m_scene.UserAccountService.GetUserAccount(null, cmdparams[3], cmdparams[4]).PrincipalID);
            }
            if (cmdparams[2] == "RemoveEstateManager".ToLower())
            {
                m_scene.RegionInfo.EstateSettings.RemoveEstateManager(
                    m_scene.UserAccountService.GetUserAccount(null, cmdparams[3], cmdparams[4]).PrincipalID);
            }
            if (cmdparams[2] == "RemoveEstateAccess".ToLower())
            {
                m_scene.RegionInfo.EstateSettings.RemoveEstateUser(
                    m_scene.UserAccountService.GetUserAccount(null, cmdparams[3], cmdparams[4]).PrincipalID);
            }

            #endregion

            Aurora.Framework.Utilities.DataManager.RequestPlugin<IEstateConnector>().
                SaveEstateSettings(m_scene.RegionInfo.EstateSettings);
        }
Example #3
0
        public override void FromOSD(OSDMap v)
        {
            OSDMap values = (OSDMap) v;
            EstateID = (uint) values["EstateID"].AsInteger();
            EstateName = values["EstateName"].AsString();
            AbuseEmailToEstateOwner = values["AbuseEmailToEstateOwner"].AsBoolean();
            DenyAnonymous = values["DenyAnonymous"].AsBoolean();
            ResetHomeOnTeleport = values["ResetHomeOnTeleport"].AsBoolean();
            FixedSun = values["FixedSun"].AsBoolean();
            DenyTransacted = values["DenyTransacted"].AsBoolean();
            BlockDwell = values["BlockDwell"].AsBoolean();
            DenyIdentified = values["DenyIdentified"].AsBoolean();
            AllowVoice = values["AllowVoice"].AsBoolean();
            UseGlobalTime = values["UseGlobalTime"].AsBoolean();
            PricePerMeter = values["PricePerMeter"].AsInteger();
            TaxFree = values["TaxFree"].AsBoolean();
            AllowDirectTeleport = values["AllowDirectTeleport"].AsBoolean();
            ParentEstateID = (uint) values["ParentEstateID"].AsInteger();
            SunPosition = values["SunPosition"].AsReal();
            EstateSkipScripts = values["EstateSkipScripts"].AsBoolean();
            BillableFactor = (float) values["BillableFactor"].AsReal();
            PublicAccess = values["PublicAccess"].AsBoolean();
            AbuseEmail = values["AbuseEmail"].AsString();
            EstateOwner = values["EstateOwner"].AsUUID();
            AllowLandmark = values["AllowLandmark"].AsBoolean();
            AllowParcelChanges = values["AllowParcelChanges"].AsBoolean();
            AllowSetHome = values["AllowSetHome"].AsBoolean();
            DenyMinors = values["DenyMinors"].AsBoolean();

            OSDArray Managers = values["EstateManagers"] as OSDArray;
            if (Managers != null)
                EstateManagers = Managers.ConvertAll<UUID>((o) => o);

            OSDArray Ban = values["EstateBans"] as OSDArray;
            if (Ban != null)
                EstateBans = Ban.ConvertAll<EstateBan>((o) =>
                                                           {
                                                               EstateBan ban = new EstateBan();
                                                               ban.FromOSD(o);
                                                               return ban;
                                                           });

            OSDArray Access = values["EstateAccess"] as OSDArray;
            if (Access != null)
                EstateAccess = Access.ConvertAll<UUID>((o) => o);

            OSDArray Groups = values["EstateGroups"] as OSDArray;
            if (Groups != null)
                EstateGroups = Groups.ConvertAll<UUID>((o) => o);
        }
        private void handleEstateAccessDeltaRequest(IClientAPI remote_client, UUID invoice, int estateAccessType,
                                                    UUID user)
        {
            // EstateAccessDelta handles Estate Managers, Sim Access, Sim Banlist, allowed Groups..  etc.

            if (user == m_scene.RegionInfo.EstateSettings.EstateOwner)
                return; // never process EO

            if ((estateAccessType & (int) AccessDeltaRequest.AddAllowedUser) != 0) // User add
            {
                if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true))
                {
                    IEstateConnector connector = Framework.Utilities.DataManager.RequestPlugin<IEstateConnector>();
                    if ((estateAccessType & 1) != 0 && connector != null) // All estates
                    {
                        List<EstateSettings> estateIDs = connector.GetEstates(remote_client.AgentId);
                        foreach (EstateSettings estate in estateIDs)
                        {
                            if (estate.EstateID != m_scene.RegionInfo.EstateSettings.EstateID)
                            {
                                estate.AddEstateUser(user);
                                estate.Save();
                            }
                        }
                    }
                    m_scene.RegionInfo.EstateSettings.AddEstateUser(user);
                    if ((estateAccessType & (int) AccessDeltaRequest.MoreToCome) == 0)
                        //1024 means more than one is being sent
                    {
                        m_scene.RegionInfo.EstateSettings.Save();
                        TriggerEstateInfoChange();
                    }
                }
                else
                {
                    remote_client.SendAlertMessage("Method EstateAccessDelta Failed, you don't have permissions");
                }
            }
            if ((estateAccessType & (int) AccessDeltaRequest.RemoveAllowedUser) != 0) // User remove
            {
                IEstateConnector connector = Framework.Utilities.DataManager.RequestPlugin<IEstateConnector>();
                if ((estateAccessType & 1) != 0 && connector != null) // All estates
                {
                    List<EstateSettings> estateIDs = connector.GetEstates(remote_client.AgentId);
                    foreach (EstateSettings estate in estateIDs)
                    {
                        if (estate.EstateID != m_scene.RegionInfo.EstateSettings.EstateID)
                        {
                            estate.RemoveEstateUser(user);
                            estate.Save();
                        }
                    }
                }
                if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) ||
                    m_scene.Permissions.BypassPermissions())
                {
                    m_scene.RegionInfo.EstateSettings.RemoveEstateUser(user);
                    if ((estateAccessType & (int) AccessDeltaRequest.MoreToCome) == 0)
                        //1024 means more than one is being sent
                    {
                        m_scene.RegionInfo.EstateSettings.Save();
                        TriggerEstateInfoChange();
                    }
                }
                else
                {
                    remote_client.SendAlertMessage("Method EstateAccessDelta Failed, you don't have permissions");
                }
            }
            if ((estateAccessType & (int) AccessDeltaRequest.AddAllowedGroup) != 0) // Group add
            {
                if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) ||
                    m_scene.Permissions.BypassPermissions())
                {
                    IEstateConnector connector = Framework.Utilities.DataManager.RequestPlugin<IEstateConnector>();
                    if ((estateAccessType & 1) != 0 && connector != null) // All estates
                    {
                        List<EstateSettings> estateIDs = connector.GetEstates(remote_client.AgentId);
                        foreach (EstateSettings estate in estateIDs)
                        {
                            if (estate.EstateID != m_scene.RegionInfo.EstateSettings.EstateID)
                            {
                                estate.AddEstateGroup(user);
                                estate.Save();
                            }
                        }
                    }
                    m_scene.RegionInfo.EstateSettings.AddEstateGroup(user);
                    if ((estateAccessType & (int) AccessDeltaRequest.MoreToCome) == 0)
                        //1024 means more than one is being sent
                    {
                        m_scene.RegionInfo.EstateSettings.Save();
                        TriggerEstateInfoChange();
                    }
                }
                else
                {
                    remote_client.SendAlertMessage("Method EstateAccessDelta Failed, you don't have permissions");
                }
            }
            if ((estateAccessType & (int) AccessDeltaRequest.RemoveAllowedGroup) != 0) // Group remove
            {
                if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) ||
                    m_scene.Permissions.BypassPermissions())
                {
                    IEstateConnector connector = Framework.Utilities.DataManager.RequestPlugin<IEstateConnector>();
                    if ((estateAccessType & 1) != 0 && connector != null) // All estates
                    {
                        List<EstateSettings> estateIDs = connector.GetEstates(remote_client.AgentId);
                        foreach (EstateSettings estate in estateIDs)
                        {
                            if (estate.EstateID != m_scene.RegionInfo.EstateSettings.EstateID)
                            {
                                estate.RemoveEstateGroup(user);
                                estate.Save();
                            }
                        }
                    }
                    m_scene.RegionInfo.EstateSettings.RemoveEstateGroup(user);
                    if ((estateAccessType & (int) AccessDeltaRequest.MoreToCome) == 0)
                        //1024 means more than one is being sent
                    {
                        m_scene.RegionInfo.EstateSettings.Save();
                        TriggerEstateInfoChange();
                    }
                }
                else
                {
                    remote_client.SendAlertMessage("Method EstateAccessDelta Failed, you don't have permissions");
                }
            }
            if ((estateAccessType & (int) AccessDeltaRequest.AddBannedUser) != 0) // Ban add
            {
                if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, false) ||
                    m_scene.Permissions.BypassPermissions())
                {
                    IEstateConnector connector = Framework.Utilities.DataManager.RequestPlugin<IEstateConnector>();
                    if ((estateAccessType & 1) != 0 && connector != null) // All estates
                    {
                        List<EstateSettings> estateIDs = connector.GetEstates(remote_client.AgentId);
                        foreach (EstateSettings estate in estateIDs)
                        {
                            if (estate.EstateID != m_scene.RegionInfo.EstateSettings.EstateID)
                            {
                                List<EstateBan> innerbanlistcheck = estate.EstateBans;

                                bool inneralreadyInList = innerbanlistcheck.Any(t => user == t.BannedUserID);

                                if (!inneralreadyInList)
                                {
                                    EstateBan item = new EstateBan {BannedUserID = user, EstateID = estate.EstateID};

                                    IScenePresence SP = m_scene.GetScenePresence(user);
                                    item.BannedHostAddress = (SP != null)
                                                                 ? ((System.Net.IPEndPoint)
                                                                    SP.ControllingClient.GetClientEP()).Address.ToString
                                                                       ()
                                                                 : "0.0.0.0";
                                    item.BannedHostIPMask = (SP != null)
                                                                ? ((System.Net.IPEndPoint)
                                                                   SP.ControllingClient.GetClientEP()).Address.ToString()
                                                                : "0.0.0.0";
                                    item.BannedHostNameMask = (SP != null)
                                                                  ? ((System.Net.IPEndPoint)
                                                                     SP.ControllingClient.GetClientEP()).Address
                                                                                                        .ToString()
                                                                  : "0.0.0.0";
                                    estate.AddBan(item);
                                    estate.Save();
                                }
                            }
                        }
                    }
                    List<EstateBan> banlistcheck = m_scene.RegionInfo.EstateSettings.EstateBans;

                    bool alreadyInList = banlistcheck.Any(t => user == t.BannedUserID);

                    if (!alreadyInList)
                    {
                        EstateBan item = new EstateBan
                                             {
                                                 BannedUserID = user,
                                                 EstateID = m_scene.RegionInfo.EstateSettings.EstateID,
                                                 BannedHostAddress = "0.0.0.0"
                                             };

                        IScenePresence SP = m_scene.GetScenePresence(user);
                        item.BannedHostIPMask = (SP != null)
                                                    ? ((System.Net.IPEndPoint) SP.ControllingClient.GetClientEP())
                                                          .Address.ToString()
                                                    : "0.0.0.0";

                        m_scene.RegionInfo.EstateSettings.AddBan(item);

                        //Trigger the event
                        m_scene.AuroraEventManager.FireGenericEventHandler("BanUser", user);

                        if ((estateAccessType & (int) AccessDeltaRequest.MoreToCome) == 0)
                            //1024 means more than one is being sent
                        {
                            m_scene.RegionInfo.EstateSettings.Save();
                            TriggerEstateInfoChange();
                        }

                        if (SP != null)
                        {
                            if (!SP.IsChildAgent)
                            {
                                IEntityTransferModule transferModule =
                                    m_scene.RequestModuleInterface<IEntityTransferModule>();
                                if (transferModule != null)
                                    transferModule.TeleportHome(user, SP.ControllingClient);
                            }
                            else
                            {
                                //Close them in the sim
                                IEntityTransferModule transferModule =
                                    SP.Scene.RequestModuleInterface<IEntityTransferModule>();
                                if (transferModule != null)
                                    transferModule.IncomingCloseAgent(SP.Scene, SP.UUID);
                            }
                        }
                    }
                    else
                    {
                        remote_client.SendAlertMessage("User is already on the region ban list");
                    }
                }
                else
                {
                    remote_client.SendAlertMessage("Method EstateAccessDelta Failed, you don't have permissions");
                }
            }
            if ((estateAccessType & (int) AccessDeltaRequest.RemoveBannedUser) != 0) // Ban remove
            {
                if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, false) ||
                    m_scene.Permissions.BypassPermissions())
                {
                    IEstateConnector connector = Framework.Utilities.DataManager.RequestPlugin<IEstateConnector>();
                    if ((estateAccessType & 1) != 0 && connector != null) // All estates
                    {
                        List<EstateSettings> estateIDs = connector.GetEstates(remote_client.AgentId);
                        foreach (EstateSettings estate in estateIDs)
                        {
                            if (estate.EstateID != m_scene.RegionInfo.EstateSettings.EstateID)
                            {
                                List<EstateBan> innerbanlistcheck = m_scene.RegionInfo.EstateSettings.EstateBans;

                                bool inneralreadyInList = false;
                                EstateBan innerlistitem = null;

                                foreach (EstateBan t in innerbanlistcheck)
                                {
                                    if (user == t.BannedUserID)
                                    {
                                        inneralreadyInList = true;
                                        innerlistitem = t;
                                        break;
                                    }
                                }

                                if (inneralreadyInList)
                                {
                                    m_scene.RegionInfo.EstateSettings.RemoveBan(innerlistitem.BannedUserID);
                                }
                                estate.Save();
                            }
                        }
                    }
                    List<EstateBan> banlistcheck = m_scene.RegionInfo.EstateSettings.EstateBans;

                    bool alreadyInList = false;
                    EstateBan listitem = null;

                    foreach (EstateBan t in banlistcheck)
                    {
                        if (user == t.BannedUserID)
                        {
                            alreadyInList = true;
                            listitem = t;
                            break;
                        }
                    }

                    //Trigger the event
                    m_scene.AuroraEventManager.FireGenericEventHandler("UnBanUser", user);

                    if (alreadyInList)
                    {
                        m_scene.RegionInfo.EstateSettings.RemoveBan(listitem.BannedUserID);
                        if ((estateAccessType & (int) AccessDeltaRequest.MoreToCome) == 0)
                            //1024 means more than one is being sent
                        {
                            m_scene.RegionInfo.EstateSettings.Save();
                            TriggerEstateInfoChange();
                        }
                    }
                    else
                    {
                        remote_client.SendAlertMessage("User is not on the region ban list");
                    }
                }
                else
                {
                    remote_client.SendAlertMessage("Method EstateAccessDelta Failed, you don't have permissions");
                }
            }
            if ((estateAccessType & (int) AccessDeltaRequest.AddEstateManager) != 0) // Manager add
            {
                if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) ||
                    m_scene.Permissions.BypassPermissions())
                {
                    IEstateConnector connector = Framework.Utilities.DataManager.RequestPlugin<IEstateConnector>();
                    if ((estateAccessType & 1) != 0 && connector != null) // All estates
                    {
                        List<EstateSettings> estateIDs = connector.GetEstates(remote_client.AgentId);
                        foreach (EstateSettings estate in estateIDs)
                        {
                            if (estate.EstateID != m_scene.RegionInfo.EstateSettings.EstateID)
                            {
                                estate.AddEstateManager(user);
                                estate.Save();
                            }
                        }
                    }
                    m_scene.RegionInfo.EstateSettings.AddEstateManager(user);
                    if ((estateAccessType & (int) AccessDeltaRequest.MoreToCome) == 0)
                        //1024 means more than one is being sent
                    {
                        m_scene.RegionInfo.EstateSettings.Save();
                        TriggerEstateInfoChange();
                    }
                }
                else
                {
                    remote_client.SendAlertMessage("Method EstateAccessDelta Failed, you don't have permissions");
                }
            }
            if ((estateAccessType & (int) AccessDeltaRequest.RemoveEstateManager) != 0) // Manager remove
            {
                if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) ||
                    m_scene.Permissions.BypassPermissions())
                {
                    IEstateConnector connector = Framework.Utilities.DataManager.RequestPlugin<IEstateConnector>();
                    if ((estateAccessType & 1) != 0 && connector != null) // All estates
                    {
                        List<EstateSettings> estateIDs = connector.GetEstates(remote_client.AgentId);
                        foreach (EstateSettings estate in estateIDs)
                        {
                            if (estate.EstateID != m_scene.RegionInfo.EstateSettings.EstateID)
                            {
                                estate.RemoveEstateManager(user);
                                estate.Save();
                            }
                        }
                    }
                    m_scene.RegionInfo.EstateSettings.RemoveEstateManager(user);
                    if ((estateAccessType & (int) AccessDeltaRequest.MoreToCome) == 0)
                        //1024 means more than one is being sent
                    {
                        m_scene.RegionInfo.EstateSettings.Save();
                        TriggerEstateInfoChange();
                    }
                }
                else
                {
                    remote_client.SendAlertMessage("Method EstateAccessDelta Failed, you don't have permissions");
                }
            }
            if ((estateAccessType & (int) AccessDeltaRequest.MoreToCome) == 0) //1024 means more than one is being sent
            {
                remote_client.SendEstateList(invoice, (int) EstateTools.EstateAccessReplyDelta.AllowedUsers,
                                             m_scene.RegionInfo.EstateSettings.EstateAccess,
                                             m_scene.RegionInfo.EstateSettings.EstateID);
                remote_client.SendEstateList(invoice, (int) EstateTools.EstateAccessReplyDelta.AllowedGroups,
                                             m_scene.RegionInfo.EstateSettings.EstateGroups,
                                             m_scene.RegionInfo.EstateSettings.EstateID);
                remote_client.SendBannedUserList(invoice, m_scene.RegionInfo.EstateSettings.EstateBans,
                                                 m_scene.RegionInfo.EstateSettings.EstateID);
                remote_client.SendEstateList(invoice, (int) EstateTools.EstateAccessReplyDelta.EstateManagers,
                                             m_scene.RegionInfo.EstateSettings.EstateManagers,
                                             m_scene.RegionInfo.EstateSettings.EstateID);
            }
        }
Example #5
0
 public void AddBan(EstateBan ban)
 {
     if (ban == null)
         return;
     if (!IsBanned(ban.BannedUserID))
         l_EstateBans.Add(ban);
 }