From 9b60c14bb10301db9a3333ca815afd3296b981a8 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 23 Nov 2012 03:05:30 +0000 Subject: minor: Add some console feedback on region restart and log who requested a region restart if done from the viewer. --- OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs | 4 ++++ OpenSim/Region/CoreModules/World/Region/RestartModule.cs | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/CoreModules') diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs index 39cc93d..757e5d4 100644 --- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs @@ -271,6 +271,10 @@ namespace OpenSim.Region.CoreModules.World.Estate } restartModule.ScheduleRestart(UUID.Zero, "Region will restart in {0}", times.ToArray(), true); + + m_log.InfoFormat( + "User {0} requested restart of region {1} in {2} seconds", + remoteClient.Name, Scene.Name, times.Count != 0 ? times[0] : 0); } } diff --git a/OpenSim/Region/CoreModules/World/Region/RestartModule.cs b/OpenSim/Region/CoreModules/World/Region/RestartModule.cs index fea4de0..249a40d 100644 --- a/OpenSim/Region/CoreModules/World/Region/RestartModule.cs +++ b/OpenSim/Region/CoreModules/World/Region/RestartModule.cs @@ -26,6 +26,7 @@ */ using System; +using System.Linq; using System.Reflection; using System.Timers; using System.Threading; @@ -264,7 +265,10 @@ namespace OpenSim.Region.CoreModules.World.Region for (int i = 4 ; i < args.Length ; i++) times.Add(Convert.ToInt32(args[i])); + MainConsole.Instance.OutputFormat( + "Region {0} scheduled for restart in {1} seconds", m_Scene.Name, times.Sum()); + ScheduleRestart(UUID.Zero, args[3], times.ToArray(), notice); } } -} +} \ No newline at end of file -- cgit v1.1 From 36c6edac6903ecb704d382ed0959ff3cc44b73bb Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 23 Nov 2012 03:29:50 +0000 Subject: Remove the redundant BypassPermissions() checks in EstateManagmentModule. This is repeated in the PermissionsModule and checking it earlier does not allow a force override of the bypass value --- .../World/Estate/EstateManagementModule.cs | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'OpenSim/Region/CoreModules') diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs index 757e5d4..f974a63 100644 --- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs @@ -299,7 +299,7 @@ namespace OpenSim.Region.CoreModules.World.Estate if ((estateAccessType & 4) != 0) // User add { - if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || Scene.Permissions.BypassPermissions()) + if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true)) { if ((estateAccessType & 1) != 0) // All estates { @@ -331,7 +331,7 @@ namespace OpenSim.Region.CoreModules.World.Estate } if ((estateAccessType & 8) != 0) // User remove { - if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || Scene.Permissions.BypassPermissions()) + if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true)) { if ((estateAccessType & 1) != 0) // All estates { @@ -362,7 +362,7 @@ namespace OpenSim.Region.CoreModules.World.Estate } if ((estateAccessType & 16) != 0) // Group add { - if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || Scene.Permissions.BypassPermissions()) + if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true)) { if ((estateAccessType & 1) != 0) // All estates { @@ -391,9 +391,10 @@ namespace OpenSim.Region.CoreModules.World.Estate remote_client.SendAlertMessage("Method EstateAccessDelta Failed, you don't have permissions"); } } + if ((estateAccessType & 32) != 0) // Group remove { - if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || Scene.Permissions.BypassPermissions()) + if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true)) { if ((estateAccessType & 1) != 0) // All estates { @@ -422,9 +423,10 @@ namespace OpenSim.Region.CoreModules.World.Estate remote_client.SendAlertMessage("Method EstateAccessDelta Failed, you don't have permissions"); } } + if ((estateAccessType & 64) != 0) // Ban add { - if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, false) || Scene.Permissions.BypassPermissions()) + if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, false)) { EstateBan[] banlistcheck = Scene.RegionInfo.EstateSettings.EstateBans; @@ -499,9 +501,10 @@ namespace OpenSim.Region.CoreModules.World.Estate remote_client.SendAlertMessage("Method EstateAccessDelta Failed, you don't have permissions"); } } + if ((estateAccessType & 128) != 0) // Ban remove { - if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, false) || Scene.Permissions.BypassPermissions()) + if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, false)) { EstateBan[] banlistcheck = Scene.RegionInfo.EstateSettings.EstateBans; @@ -554,9 +557,10 @@ namespace OpenSim.Region.CoreModules.World.Estate remote_client.SendAlertMessage("Method EstateAccessDelta Failed, you don't have permissions"); } } + if ((estateAccessType & 256) != 0) // Manager add { - if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || Scene.Permissions.BypassPermissions()) + if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true)) { if ((estateAccessType & 1) != 0) // All estates { @@ -585,9 +589,10 @@ namespace OpenSim.Region.CoreModules.World.Estate remote_client.SendAlertMessage("Method EstateAccessDelta Failed, you don't have permissions"); } } + if ((estateAccessType & 512) != 0) // Manager remove { - if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || Scene.Permissions.BypassPermissions()) + if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true)) { if ((estateAccessType & 1) != 0) // All estates { -- cgit v1.1