diff options
author | Justin Clark-Casey (justincc) | 2012-03-16 02:07:26 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-03-16 02:07:26 +0000 |
commit | aa881e80652aa9feebbb6a4c4783322be44b7574 (patch) | |
tree | 39e41c07eda2c75e7ad0f957d4ca6aedeff74efd /OpenSim/Region | |
parent | Remove unused bin/ScriptEngines/Default.lsl (diff) | |
download | opensim-SC_OLD-aa881e80652aa9feebbb6a4c4783322be44b7574.zip opensim-SC_OLD-aa881e80652aa9feebbb6a4c4783322be44b7574.tar.gz opensim-SC_OLD-aa881e80652aa9feebbb6a4c4783322be44b7574.tar.bz2 opensim-SC_OLD-aa881e80652aa9feebbb6a4c4783322be44b7574.tar.xz |
Allow comments to appear in command scripts (e.g. shutdown_commands.txt).
These can start with ; # or //
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/Application/OpenSim.cs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 6fba249..e955a58 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs | |||
@@ -503,7 +503,11 @@ namespace OpenSim | |||
503 | string currentCommand; | 503 | string currentCommand; |
504 | while ((currentCommand = readFile.ReadLine()) != null) | 504 | while ((currentCommand = readFile.ReadLine()) != null) |
505 | { | 505 | { |
506 | if (currentCommand != String.Empty) | 506 | currentCommand = currentCommand.Trim(); |
507 | if (!(currentCommand == "" | ||
508 | || currentCommand.StartsWith(";") | ||
509 | || currentCommand.StartsWith("//") | ||
510 | || currentCommand.StartsWith("#"))) | ||
507 | { | 511 | { |
508 | m_log.Info("[COMMANDFILE]: Running '" + currentCommand + "'"); | 512 | m_log.Info("[COMMANDFILE]: Running '" + currentCommand + "'"); |
509 | m_console.RunCommand(currentCommand); | 513 | m_console.RunCommand(currentCommand); |