aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/Base/ServicesServerBase.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Server/Base/ServicesServerBase.cs')
-rw-r--r--OpenSim/Server/Base/ServicesServerBase.cs39
1 files changed, 0 insertions, 39 deletions
diff --git a/OpenSim/Server/Base/ServicesServerBase.cs b/OpenSim/Server/Base/ServicesServerBase.cs
index 2c2b8ed..5b23149 100644
--- a/OpenSim/Server/Base/ServicesServerBase.cs
+++ b/OpenSim/Server/Base/ServicesServerBase.cs
@@ -196,11 +196,6 @@ namespace OpenSim.Server.Base
196 MainConsole.Instance.Commands.AddCommand("General", false, "shutdown", 196 MainConsole.Instance.Commands.AddCommand("General", false, "shutdown",
197 "shutdown", 197 "shutdown",
198 "Quit the application", HandleQuit); 198 "Quit the application", HandleQuit);
199
200 // Register a command to read other commands from a file
201 MainConsole.Instance.Commands.AddCommand("General", false, "command-script",
202 "command-script <script>",
203 "Run a command script from file", HandleScript);
204 199
205 // Allow derived classes to perform initialization that 200 // Allow derived classes to perform initialization that
206 // needs to be done after the console has opened 201 // needs to be done after the console has opened
@@ -239,40 +234,6 @@ namespace OpenSim.Server.Base
239 234
240 } 235 }
241 236
242 protected virtual void HandleScript(string module, string[] parms)
243 {
244 if (parms.Length != 2)
245 {
246 return;
247 }
248 RunCommandScript(parms[1]);
249 }
250
251 /// <summary>
252 /// Run an optional startup list of commands
253 /// </summary>
254 /// <param name="fileName"></param>
255 private void RunCommandScript(string fileName)
256 {
257 if (File.Exists(fileName))
258 {
259 m_log.Info("[COMMANDFILE]: Running " + fileName);
260
261 using (StreamReader readFile = File.OpenText(fileName))
262 {
263 string currentCommand;
264 while ((currentCommand = readFile.ReadLine()) != null)
265 {
266 if (currentCommand != String.Empty)
267 {
268 m_log.Info("[COMMANDFILE]: Running '" + currentCommand + "'");
269 MainConsole.Instance.RunCommand(currentCommand);
270 }
271 }
272 }
273 }
274 }
275
276 protected virtual void ReadConfig() 237 protected virtual void ReadConfig()
277 { 238 {
278 } 239 }