diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Application/Application.cs | 3 | ||||
-rw-r--r-- | OpenSim/Region/Application/OpenSim.cs | 26 |
2 files changed, 26 insertions, 3 deletions
diff --git a/OpenSim/Region/Application/Application.cs b/OpenSim/Region/Application/Application.cs index df80290..2fd26bf 100644 --- a/OpenSim/Region/Application/Application.cs +++ b/OpenSim/Region/Application/Application.cs | |||
@@ -120,6 +120,7 @@ namespace OpenSim | |||
120 | configSource.AddSwitch("Startup", "gridmode"); | 120 | configSource.AddSwitch("Startup", "gridmode"); |
121 | configSource.AddSwitch("Startup", "physics"); | 121 | configSource.AddSwitch("Startup", "physics"); |
122 | configSource.AddSwitch("Startup", "gui"); | 122 | configSource.AddSwitch("Startup", "gui"); |
123 | configSource.AddSwitch("Startup", "console"); | ||
123 | 124 | ||
124 | configSource.AddConfig("StandAlone"); | 125 | configSource.AddConfig("StandAlone"); |
125 | configSource.AddConfig("Network"); | 126 | configSource.AddConfig("Network"); |
@@ -223,4 +224,4 @@ namespace OpenSim | |||
223 | _IsHandlingException = false; | 224 | _IsHandlingException = false; |
224 | } | 225 | } |
225 | } | 226 | } |
226 | } \ No newline at end of file | 227 | } |
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 | { |