diff options
author | Adam Frisby | 2009-08-18 00:23:27 +1000 |
---|---|---|
committer | Adam Frisby | 2009-08-18 00:23:27 +1000 |
commit | 58d9d6026eb36d530c7cec753279b7aeaa6b43eb (patch) | |
tree | 86a09687ef01b308ac2ae8e1023ec9ddb943c54f /OpenSim/Region/Application/OpenSim.cs | |
parent | * Implementing a bunch of Unimplemented MRM stubs. (diff) | |
parent | Add System.Xml reference to the console project (diff) | |
download | opensim-SC-58d9d6026eb36d530c7cec753279b7aeaa6b43eb.zip opensim-SC-58d9d6026eb36d530c7cec753279b7aeaa6b43eb.tar.gz opensim-SC-58d9d6026eb36d530c7cec753279b7aeaa6b43eb.tar.bz2 opensim-SC-58d9d6026eb36d530c7cec753279b7aeaa6b43eb.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 | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 390cfcd..38874f9 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs | |||
@@ -52,6 +52,7 @@ namespace OpenSim | |||
52 | protected string m_startupCommandsFile; | 52 | protected string m_startupCommandsFile; |
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 | 56 | ||
56 | private string m_timedScript = "disabled"; | 57 | private string m_timedScript = "disabled"; |
57 | private Timer m_scriptTimer; | 58 | private Timer m_scriptTimer; |
@@ -71,7 +72,10 @@ namespace OpenSim | |||
71 | m_startupCommandsFile = startupConfig.GetString("startup_console_commands_file", "startup_commands.txt"); | 72 | m_startupCommandsFile = startupConfig.GetString("startup_console_commands_file", "startup_commands.txt"); |
72 | m_shutdownCommandsFile = startupConfig.GetString("shutdown_console_commands_file", "shutdown_commands.txt"); | 73 | m_shutdownCommandsFile = startupConfig.GetString("shutdown_console_commands_file", "shutdown_commands.txt"); |
73 | 74 | ||
74 | m_gui = startupConfig.GetBoolean("gui", false); | 75 | if (startupConfig.GetString("console", String.Empty) == String.Empty) |
76 | m_gui = startupConfig.GetBoolean("gui", false); | ||
77 | else | ||
78 | m_consoleType= startupConfig.GetString("console", String.Empty); | ||
75 | 79 | ||
76 | m_timedScript = startupConfig.GetString("timer_Script", "disabled"); | 80 | m_timedScript = startupConfig.GetString("timer_Script", "disabled"); |
77 | if (m_logFileAppender != null) | 81 | if (m_logFileAppender != null) |
@@ -110,13 +114,31 @@ namespace OpenSim | |||
110 | if (m_gui) // Driven by external GUI | 114 | if (m_gui) // Driven by external GUI |
111 | m_console = new CommandConsole("Region"); | 115 | m_console = new CommandConsole("Region"); |
112 | else | 116 | else |
113 | m_console = new LocalConsole("Region"); | 117 | { |
118 | switch (m_consoleType) | ||
119 | { | ||
120 | case "basic": | ||
121 | m_console = new CommandConsole("Region"); | ||
122 | break; | ||
123 | case "rest": | ||
124 | m_console = new RemoteConsole("Region"); | ||
125 | ((RemoteConsole)m_console).ReadConfig(m_config.Source); | ||
126 | break; | ||
127 | default: | ||
128 | m_console = new LocalConsole("Region"); | ||
129 | break; | ||
130 | } | ||
131 | } | ||
132 | |||
114 | MainConsole.Instance = m_console; | 133 | MainConsole.Instance = m_console; |
115 | 134 | ||
116 | RegisterConsoleCommands(); | 135 | RegisterConsoleCommands(); |
117 | 136 | ||
118 | base.StartupSpecific(); | 137 | base.StartupSpecific(); |
119 | 138 | ||
139 | if (m_console is RemoteConsole) | ||
140 | ((RemoteConsole)m_console).SetServer(m_httpServer); | ||
141 | |||
120 | //Run Startup Commands | 142 | //Run Startup Commands |
121 | if (String.IsNullOrEmpty(m_startupCommandsFile)) | 143 | if (String.IsNullOrEmpty(m_startupCommandsFile)) |
122 | { | 144 | { |