From 97f4226666b5d3525999550e1362180be182cc87 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Mon, 13 Oct 2008 20:35:45 +0000 Subject: * Apply a modified version of the part of http://opensimulator.org/mantis/view.php?id=2361 that allows region registration to be enabled/disabled on the grid server * Region registration is enabled by default in the configuration unless the user chooses otherwise * On the console * show status - shows grid status * enable-reg - enables region registration to the grid * disable-reg - disables region registration * Enabling or disabling region registration will not affect any other grid functions or regions already on the grid --- OpenSim/Grid/GridServer/GridServerBase.cs | 33 ++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) (limited to 'OpenSim/Grid/GridServer/GridServerBase.cs') diff --git a/OpenSim/Grid/GridServer/GridServerBase.cs b/OpenSim/Grid/GridServer/GridServerBase.cs index 2ffeb57..36ea238 100644 --- a/OpenSim/Grid/GridServer/GridServerBase.cs +++ b/OpenSim/Grid/GridServer/GridServerBase.cs @@ -63,15 +63,42 @@ namespace OpenSim.Grid.GridServer MainConsole.Instance = m_console; } - public void managercallback(string cmd) + public override void RunCmd(string cmd, string[] cmdparams) { + base.RunCmd(cmd, cmdparams); + switch (cmd) { - case "shutdown": - RunCmd("shutdown", new string[0]); + case "disable-reg": + m_config.AllowRegionRegistration = false; + m_log.Info("Region registration disabled"); + break; + case "enable-reg": + m_config.AllowRegionRegistration = true; + m_log.Info("Region registration enabled"); + break; + } + } + + public override void Show(string[] showParams) + { + base.Show(showParams); + + switch (showParams[0]) + { + case "status": + if (m_config.AllowRegionRegistration) + { + m_log.Info("Region registration enabled."); + } + else + { + m_log.Info("Region registration disabled."); + } break; } } + protected override void StartupSpecific() { -- cgit v1.1