Allow comments to appear in command scripts (e.g. shutdown_commands.txt).

These can start with ; # or //
This commit is contained in:
Justin Clark-Casey (justincc)
2012-03-16 02:07:26 +00:00
parent 34f6f87b6c
commit aa881e8065

View File

@@ -503,7 +503,11 @@ namespace OpenSim
string currentCommand;
while ((currentCommand = readFile.ReadLine()) != null)
{
if (currentCommand != String.Empty)
currentCommand = currentCommand.Trim();
if (!(currentCommand == ""
|| currentCommand.StartsWith(";")
|| currentCommand.StartsWith("//")
|| currentCommand.StartsWith("#")))
{
m_log.Info("[COMMANDFILE]: Running '" + currentCommand + "'");
m_console.RunCommand(currentCommand);