aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Interfaces
diff options
context:
space:
mode:
authormingchen2008-07-25 02:30:07 +0000
committermingchen2008-07-25 02:30:07 +0000
commitf2742fb6043c6b7332afd026d77a29b25369934c (patch)
tree895f906ba9db30b27117e6f0d7af40e063204e8e /OpenSim/Region/Environment/Interfaces
parentllApplyImpulse now accepts any non-zero integer as not FALSE (diff)
downloadopensim-SC_OLD-f2742fb6043c6b7332afd026d77a29b25369934c.zip
opensim-SC_OLD-f2742fb6043c6b7332afd026d77a29b25369934c.tar.gz
opensim-SC_OLD-f2742fb6043c6b7332afd026d77a29b25369934c.tar.bz2
opensim-SC_OLD-f2742fb6043c6b7332afd026d77a29b25369934c.tar.xz
*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.
Diffstat (limited to 'OpenSim/Region/Environment/Interfaces')
-rw-r--r--OpenSim/Region/Environment/Interfaces/ICommand.cs9
-rw-r--r--OpenSim/Region/Environment/Interfaces/ICommander.cs2
2 files changed, 11 insertions, 0 deletions
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;
29 29
30namespace OpenSim.Region.Environment.Interfaces 30namespace OpenSim.Region.Environment.Interfaces
31{ 31{
32 public enum CommandIntentions
33 {
34 COMMAND_STATISTICAL,
35 COMMAND_NON_HAZARDOUS,
36 COMMAND_HAZARDOUS
37 };
38
32 public interface ICommand 39 public interface ICommand
33 { 40 {
34 void AddArgument(string name, string helptext, string type); 41 void AddArgument(string name, string helptext, string type);
35 Dictionary<string, string> Arguments { get; } 42 Dictionary<string, string> Arguments { get; }
36 string Help { get; } 43 string Help { get; }
37 string Name { get; } 44 string Name { get; }
45 CommandIntentions Intentions { get; }
46
38 void Run(object[] args); 47 void Run(object[] args);
39 void ShowConsoleHelp(); 48 void ShowConsoleHelp();
40 } 49 }
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 @@
27 27
28namespace OpenSim.Region.Environment.Interfaces 28namespace OpenSim.Region.Environment.Interfaces
29{ 29{
30
31
30 public interface ICommander 32 public interface ICommander
31 { 33 {
32 void ProcessConsoleCommand(string function, string[] args); 34 void ProcessConsoleCommand(string function, string[] args);