diff options
author | Melanie | 2009-08-17 09:21:39 +0100 |
---|---|---|
committer | Melanie | 2009-08-17 09:21:39 +0100 |
commit | 3d7bb7567c7452d4a1216db5656d0b02957cf950 (patch) | |
tree | 5fe5b003a1ba140e1a5cb4cfda32d8569c3fee5e /OpenSim | |
parent | Limit the scrollback buffer output of the command line client to (diff) | |
download | opensim-SC-3d7bb7567c7452d4a1216db5656d0b02957cf950.zip opensim-SC-3d7bb7567c7452d4a1216db5656d0b02957cf950.tar.gz opensim-SC-3d7bb7567c7452d4a1216db5656d0b02957cf950.tar.bz2 opensim-SC-3d7bb7567c7452d4a1216db5656d0b02957cf950.tar.xz |
Add the ability to use -console=rest to the region server. User
and pass are specified the same way as for the ROBUST server
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/ConsoleClient/ConsoleClient.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Application/Application.cs | 3 | ||||
-rw-r--r-- | OpenSim/Region/Application/OpenSim.cs | 26 |
3 files changed, 27 insertions, 4 deletions
diff --git a/OpenSim/ConsoleClient/ConsoleClient.cs b/OpenSim/ConsoleClient/ConsoleClient.cs index 1e5f0b7..319584f 100644 --- a/OpenSim/ConsoleClient/ConsoleClient.cs +++ b/OpenSim/ConsoleClient/ConsoleClient.cs | |||
@@ -185,7 +185,7 @@ namespace OpenSim.ConsoleClient | |||
185 | if (parts.Length != 3) | 185 | if (parts.Length != 3) |
186 | continue; | 186 | continue; |
187 | 187 | ||
188 | MainConsole.Instance.Output(parts[2], parts[1]); | 188 | MainConsole.Instance.Output(parts[2].Trim(), parts[1]); |
189 | } | 189 | } |
190 | 190 | ||
191 | Requester.MakeRequest(requestUrl, requestData, ReadResponses); | 191 | Requester.MakeRequest(requestUrl, requestData, ReadResponses); |
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 | { |