diff options
author | John Hurliman | 2010-01-12 10:27:21 -0800 |
---|---|---|
committer | John Hurliman | 2010-01-12 10:27:21 -0800 |
commit | a8b1a57cd11facdf2c5c583cfa766a44fe5f99c5 (patch) | |
tree | bf12b759e693d6b99494dfa19fb23e13488dd977 /OpenSim/Region/Application/OpenSim.cs | |
parent | Bug in llGetNumberOfPrims always returns to script when no clients are connec... (diff) | |
parent | Add the option to reject duplicate region names (diff) | |
download | opensim-SC_OLD-a8b1a57cd11facdf2c5c583cfa766a44fe5f99c5.zip opensim-SC_OLD-a8b1a57cd11facdf2c5c583cfa766a44fe5f99c5.tar.gz opensim-SC_OLD-a8b1a57cd11facdf2c5c583cfa766a44fe5f99c5.tar.bz2 opensim-SC_OLD-a8b1a57cd11facdf2c5c583cfa766a44fe5f99c5.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region/Application/OpenSim.cs')
-rw-r--r-- | OpenSim/Region/Application/OpenSim.cs | 63 |
1 files changed, 14 insertions, 49 deletions
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 82b2fd4..e09d730 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs | |||
@@ -53,6 +53,7 @@ namespace OpenSim | |||
53 | protected string m_shutdownCommandsFile; | 53 | protected string m_shutdownCommandsFile; |
54 | protected bool m_gui = false; | 54 | protected bool m_gui = false; |
55 | protected string m_consoleType = "local"; | 55 | protected string m_consoleType = "local"; |
56 | protected uint m_consolePort = 0; | ||
56 | 57 | ||
57 | private string m_timedScript = "disabled"; | 58 | private string m_timedScript = "disabled"; |
58 | private Timer m_scriptTimer; | 59 | private Timer m_scriptTimer; |
@@ -66,6 +67,7 @@ namespace OpenSim | |||
66 | base.ReadExtraConfigSettings(); | 67 | base.ReadExtraConfigSettings(); |
67 | 68 | ||
68 | IConfig startupConfig = m_config.Source.Configs["Startup"]; | 69 | IConfig startupConfig = m_config.Source.Configs["Startup"]; |
70 | IConfig networkConfig = m_config.Source.Configs["Network"]; | ||
69 | 71 | ||
70 | int stpMaxThreads = 15; | 72 | int stpMaxThreads = 15; |
71 | 73 | ||
@@ -79,6 +81,8 @@ namespace OpenSim | |||
79 | else | 81 | else |
80 | m_consoleType= startupConfig.GetString("console", String.Empty); | 82 | m_consoleType= startupConfig.GetString("console", String.Empty); |
81 | 83 | ||
84 | if (networkConfig != null) | ||
85 | m_consolePort = (uint)networkConfig.GetInt("console_port", 0); | ||
82 | m_timedScript = startupConfig.GetString("timer_Script", "disabled"); | 86 | m_timedScript = startupConfig.GetString("timer_Script", "disabled"); |
83 | if (m_logFileAppender != null) | 87 | if (m_logFileAppender != null) |
84 | { | 88 | { |
@@ -151,7 +155,16 @@ namespace OpenSim | |||
151 | base.StartupSpecific(); | 155 | base.StartupSpecific(); |
152 | 156 | ||
153 | if (m_console is RemoteConsole) | 157 | if (m_console is RemoteConsole) |
154 | ((RemoteConsole)m_console).SetServer(m_httpServer); | 158 | { |
159 | if (m_consolePort == 0) | ||
160 | { | ||
161 | ((RemoteConsole)m_console).SetServer(m_httpServer); | ||
162 | } | ||
163 | else | ||
164 | { | ||
165 | ((RemoteConsole)m_console).SetServer(MainServer.GetHttpServer(m_consolePort)); | ||
166 | } | ||
167 | } | ||
155 | 168 | ||
156 | //Run Startup Commands | 169 | //Run Startup Commands |
157 | if (String.IsNullOrEmpty(m_startupCommandsFile)) | 170 | if (String.IsNullOrEmpty(m_startupCommandsFile)) |
@@ -287,18 +300,6 @@ namespace OpenSim | |||
287 | "create region", | 300 | "create region", |
288 | "Create a new region", HandleCreateRegion); | 301 | "Create a new region", HandleCreateRegion); |
289 | 302 | ||
290 | m_console.Commands.AddCommand("region", false, "login enable", | ||
291 | "login enable", | ||
292 | "Enable logins to the simulator", HandleLoginEnable); | ||
293 | |||
294 | m_console.Commands.AddCommand("region", false, "login disable", | ||
295 | "login disable", | ||
296 | "Disable logins to the simulator", HandleLoginDisable); | ||
297 | |||
298 | m_console.Commands.AddCommand("region", false, "login status", | ||
299 | "login status", | ||
300 | "Display status of logins", HandleLoginStatus); | ||
301 | |||
302 | m_console.Commands.AddCommand("region", false, "restart", | 303 | m_console.Commands.AddCommand("region", false, "restart", |
303 | "restart", | 304 | "restart", |
304 | "Restart all sims in this instance", RunCommand); | 305 | "Restart all sims in this instance", RunCommand); |
@@ -559,42 +560,6 @@ namespace OpenSim | |||
559 | } | 560 | } |
560 | 561 | ||
561 | /// <summary> | 562 | /// <summary> |
562 | /// Enable logins | ||
563 | /// </summary> | ||
564 | /// <param name="module"></param> | ||
565 | /// <param name="cmd"></param> | ||
566 | private void HandleLoginEnable(string module, string[] cmd) | ||
567 | { | ||
568 | ProcessLogin(true); | ||
569 | } | ||
570 | |||
571 | |||
572 | /// <summary> | ||
573 | /// Disable logins | ||
574 | /// </summary> | ||
575 | /// <param name="module"></param> | ||
576 | /// <param name="cmd"></param> | ||
577 | private void HandleLoginDisable(string module, string[] cmd) | ||
578 | { | ||
579 | ProcessLogin(false); | ||
580 | } | ||
581 | |||
582 | /// <summary> | ||
583 | /// Log login status to the console | ||
584 | /// </summary> | ||
585 | /// <param name="module"></param> | ||
586 | /// <param name="cmd"></param> | ||
587 | private void HandleLoginStatus(string module, string[] cmd) | ||
588 | { | ||
589 | if (m_sceneManager.CurrentOrFirstScene.SceneGridService.RegionLoginsEnabled == false) | ||
590 | |||
591 | m_log.Info("[ Login ] Login are disabled "); | ||
592 | else | ||
593 | m_log.Info("[ Login ] Login are enabled"); | ||
594 | } | ||
595 | |||
596 | |||
597 | /// <summary> | ||
598 | /// Change and load configuration file data. | 563 | /// Change and load configuration file data. |
599 | /// </summary> | 564 | /// </summary> |
600 | /// <param name="module"></param> | 565 | /// <param name="module"></param> |