aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application/OpenSim.cs
diff options
context:
space:
mode:
authorMelanie2010-01-16 00:05:08 +0000
committerMelanie2010-01-16 00:05:08 +0000
commit10f8c2ea9b67158c32b361f9652d503ea48de292 (patch)
treebe0d88bc4b6df3825a0d27f62a08170d7c7ad262 /OpenSim/Region/Application/OpenSim.cs
parentMerge branch 'presence-refactor' of ssh://diva@opensimulator.org/var/git/open... (diff)
parentAdd "create user" instructions to README.txt (diff)
downloadopensim-SC_OLD-10f8c2ea9b67158c32b361f9652d503ea48de292.zip
opensim-SC_OLD-10f8c2ea9b67158c32b361f9652d503ea48de292.tar.gz
opensim-SC_OLD-10f8c2ea9b67158c32b361f9652d503ea48de292.tar.bz2
opensim-SC_OLD-10f8c2ea9b67158c32b361f9652d503ea48de292.tar.xz
Merge branch 'master' into presence-refactor
This merge was very conflicted. I think I got them all, but I can't be sure. I had to merge to master or risk divergence to the point of unmergeability.
Diffstat (limited to 'OpenSim/Region/Application/OpenSim.cs')
-rw-r--r--OpenSim/Region/Application/OpenSim.cs63
1 files changed, 14 insertions, 49 deletions
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index 546a1d1..299f519 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 {
@@ -156,7 +160,16 @@ namespace OpenSim
156 MainServer.Instance.AddStreamHandler(new OpenSim.UXSimStatusHandler(this)); 160 MainServer.Instance.AddStreamHandler(new OpenSim.UXSimStatusHandler(this));
157 161
158 if (m_console is RemoteConsole) 162 if (m_console is RemoteConsole)
159 ((RemoteConsole)m_console).SetServer(m_httpServer); 163 {
164 if (m_consolePort == 0)
165 {
166 ((RemoteConsole)m_console).SetServer(m_httpServer);
167 }
168 else
169 {
170 ((RemoteConsole)m_console).SetServer(MainServer.GetHttpServer(m_consolePort));
171 }
172 }
160 173
161 //Run Startup Commands 174 //Run Startup Commands
162 if (String.IsNullOrEmpty(m_startupCommandsFile)) 175 if (String.IsNullOrEmpty(m_startupCommandsFile))
@@ -292,18 +305,6 @@ namespace OpenSim
292 "create region", 305 "create region",
293 "Create a new region", HandleCreateRegion); 306 "Create a new region", HandleCreateRegion);
294 307
295 m_console.Commands.AddCommand("region", false, "login enable",
296 "login enable",
297 "Enable logins to the simulator", HandleLoginEnable);
298
299 m_console.Commands.AddCommand("region", false, "login disable",
300 "login disable",
301 "Disable logins to the simulator", HandleLoginDisable);
302
303 m_console.Commands.AddCommand("region", false, "login status",
304 "login status",
305 "Display status of logins", HandleLoginStatus);
306
307 m_console.Commands.AddCommand("region", false, "restart", 308 m_console.Commands.AddCommand("region", false, "restart",
308 "restart", 309 "restart",
309 "Restart all sims in this instance", RunCommand); 310 "Restart all sims in this instance", RunCommand);
@@ -554,42 +555,6 @@ namespace OpenSim
554 } 555 }
555 556
556 /// <summary> 557 /// <summary>
557 /// Enable logins
558 /// </summary>
559 /// <param name="module"></param>
560 /// <param name="cmd"></param>
561 private void HandleLoginEnable(string module, string[] cmd)
562 {
563 ProcessLogin(true);
564 }
565
566
567 /// <summary>
568 /// Disable logins
569 /// </summary>
570 /// <param name="module"></param>
571 /// <param name="cmd"></param>
572 private void HandleLoginDisable(string module, string[] cmd)
573 {
574 ProcessLogin(false);
575 }
576
577 /// <summary>
578 /// Log login status to the console
579 /// </summary>
580 /// <param name="module"></param>
581 /// <param name="cmd"></param>
582 private void HandleLoginStatus(string module, string[] cmd)
583 {
584 if (m_sceneManager.CurrentOrFirstScene.SceneGridService.RegionLoginsEnabled == false)
585
586 m_log.Info("[ Login ] Login are disabled ");
587 else
588 m_log.Info("[ Login ] Login are enabled");
589 }
590
591
592 /// <summary>
593 /// Change and load configuration file data. 558 /// Change and load configuration file data.
594 /// </summary> 559 /// </summary>
595 /// <param name="module"></param> 560 /// <param name="module"></param>