From 3ce00e97cc6a7801738e72af8b8033fd81d09d12 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Thu, 22 Nov 2012 05:57:20 +0000
Subject: Factor out command script code.
This also allows comments in command scripts (lines starting with ;, # or //) to be used across all servers
---
OpenSim/Region/Application/OpenSim.cs | 36 -----------------------------------
1 file changed, 36 deletions(-)
(limited to 'OpenSim/Region/Application')
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index e654cf7..17b2167 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -467,35 +467,6 @@ namespace OpenSim
}
///
- /// Run an optional startup list of commands
- ///
- ///
- private void RunCommandScript(string fileName)
- {
- if (File.Exists(fileName))
- {
- m_log.Info("[COMMANDFILE]: Running " + fileName);
-
- using (StreamReader readFile = File.OpenText(fileName))
- {
- string currentCommand;
- while ((currentCommand = readFile.ReadLine()) != null)
- {
- currentCommand = currentCommand.Trim();
- if (!(currentCommand == ""
- || currentCommand.StartsWith(";")
- || currentCommand.StartsWith("//")
- || currentCommand.StartsWith("#")))
- {
- m_log.Info("[COMMANDFILE]: Running '" + currentCommand + "'");
- m_console.RunCommand(currentCommand);
- }
- }
- }
- }
- }
-
- ///
/// Opens a file and uses it as input to the console command parser.
///
/// name of file to use as input to the console
@@ -650,13 +621,6 @@ namespace OpenSim
switch (command)
{
- case "command-script":
- if (cmdparams.Length > 0)
- {
- RunCommandScript(cmdparams[0]);
- }
- break;
-
case "backup":
MainConsole.Instance.Output("Triggering save of pending object updates to persistent store");
SceneManager.BackupCurrentScene();
--
cgit v1.1