From f2742fb6043c6b7332afd026d77a29b25369934c Mon Sep 17 00:00:00 2001 From: mingchen Date: Fri, 25 Jul 2008 02:30:07 +0000 Subject: *Added CommandIntentions that is used to describe a console commands hazard. HAZARDOUS if it modifies the simulator, NON_HAZARDOUS if it does a command that doesn't modify the simulator but does a background command such as a forced backup, and STATISTICAL if it returns debug or more information. *This is useful for implementing a protection system from unwanted script execution or for application modules needing to know what a command does. --- OpenSim/Region/Environment/Interfaces/ICommand.cs | 9 +++++++++ OpenSim/Region/Environment/Interfaces/ICommander.cs | 2 ++ 2 files changed, 11 insertions(+) (limited to 'OpenSim/Region/Environment/Interfaces') diff --git a/OpenSim/Region/Environment/Interfaces/ICommand.cs b/OpenSim/Region/Environment/Interfaces/ICommand.cs index 4eeb16c..c1da2c3 100644 --- a/OpenSim/Region/Environment/Interfaces/ICommand.cs +++ b/OpenSim/Region/Environment/Interfaces/ICommand.cs @@ -29,12 +29,21 @@ using System.Collections.Generic; namespace OpenSim.Region.Environment.Interfaces { + public enum CommandIntentions + { + COMMAND_STATISTICAL, + COMMAND_NON_HAZARDOUS, + COMMAND_HAZARDOUS + }; + public interface ICommand { void AddArgument(string name, string helptext, string type); Dictionary Arguments { get; } string Help { get; } string Name { get; } + CommandIntentions Intentions { get; } + void Run(object[] args); void ShowConsoleHelp(); } diff --git a/OpenSim/Region/Environment/Interfaces/ICommander.cs b/OpenSim/Region/Environment/Interfaces/ICommander.cs index c4102af..f2260c3 100644 --- a/OpenSim/Region/Environment/Interfaces/ICommander.cs +++ b/OpenSim/Region/Environment/Interfaces/ICommander.cs @@ -27,6 +27,8 @@ namespace OpenSim.Region.Environment.Interfaces { + + public interface ICommander { void ProcessConsoleCommand(string function, string[] args); -- cgit v1.1