mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
Allow comments to appear in command scripts (e.g. shutdown_commands.txt).
These can start with ; # or //
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user