diff options
author | Teravus Ovares | 2008-04-26 07:43:11 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-04-26 07:43:11 +0000 |
commit | 8f6d508b435c0f9f15ce042a5550e5fab1db5d7a (patch) | |
tree | 9d09701f1feddc56a414d312d04d9ef3b5b48578 /OpenSim/Region/ScriptEngine | |
parent | * Error on System. references with 'CS20003: 'System' is null or not an object" (diff) | |
download | opensim-SC-8f6d508b435c0f9f15ce042a5550e5fab1db5d7a.zip opensim-SC-8f6d508b435c0f9f15ce042a5550e5fab1db5d7a.tar.gz opensim-SC-8f6d508b435c0f9f15ce042a5550e5fab1db5d7a.tar.bz2 opensim-SC-8f6d508b435c0f9f15ce042a5550e5fab1db5d7a.tar.xz |
* For info about this commit, see last commit.
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r-- | OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs index fa91544..f1e6ebf 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs | |||
@@ -86,9 +86,22 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
86 | bool last_was_escape = false; | 86 | bool last_was_escape = false; |
87 | int quote_replaced_count = 0; | 87 | int quote_replaced_count = 0; |
88 | 88 | ||
89 | Match SecurityM = Regex.Match(Script, "[;}][^\"']+System\\.[^\"']", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline | RegexOptions.IgnoreCase); | 89 | |
90 | if (SecurityM.Success) | 90 | |
91 | throw new Exception("BC20002: 'System' is null or not an object"); | 91 | string[] blocked = new string[] {"Axiom","Db4objects","libsecondlife","log4net","Microsoft", |
92 | "Modified","Mono","MonoXnaCompactMaths","mscorlib","MySql", | ||
93 | "NHibernate","Nini","nunit","Ode","OpenSim","PhysX_Wrapper_Dotnet", | ||
94 | "PumaCode","RAIL","XMLRPC","System"}; | ||
95 | |||
96 | |||
97 | for (int p = 0; p < blocked.Length;p++) | ||
98 | { | ||
99 | |||
100 | Match SecurityM = Regex.Match(Script, "[;}][^\"']+" + blocked[p].Replace(".", "\\.") + "\\.[^\"']", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline | RegexOptions.IgnoreCase); | ||
101 | if (SecurityM.Success) | ||
102 | throw new Exception("CS0103: 'The name '" + blocked[p] + "' does not exist in the current context'"); | ||
103 | |||
104 | } | ||
92 | 105 | ||
93 | for (int p = 0; p < Script.Length; p++) | 106 | for (int p = 0; p < Script.Length; p++) |
94 | { | 107 | { |