aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules
diff options
context:
space:
mode:
authorCharles Krinke2009-07-08 20:57:26 +0000
committerCharles Krinke2009-07-08 20:57:26 +0000
commit61008c9c13e88e1979fd339257497fb079170507 (patch)
tree3dba5930cf6378bb144b0c6db8b115f583aee97c /OpenSim/Region/OptionalModules
parentThank you kindly, RandomHuman for a patch that: (diff)
downloadopensim-SC_OLD-61008c9c13e88e1979fd339257497fb079170507.zip
opensim-SC_OLD-61008c9c13e88e1979fd339257497fb079170507.tar.gz
opensim-SC_OLD-61008c9c13e88e1979fd339257497fb079170507.tar.bz2
opensim-SC_OLD-61008c9c13e88e1979fd339257497fb079170507.tar.xz
Thank you kindly, SnowDrop, for a patch that:
This add a configuration option to the MRM module called "hidden". if MRM is marked as enabled, the module will additionally check for the "Hidden" flag, before registering for client side scriping events. When MRM is running hidden, it will not respond to client side scripting events, giving serverside scripting modules, like MRMLoader and MRMAddin the ability to leverage the MRM engine. This way, even a possible clientside exploit will not be possible, while still allowing the MRM engine to run.
Diffstat (limited to 'OpenSim/Region/OptionalModules')
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs12
1 files changed, 9 insertions, 3 deletions
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs
index c4648d2..2b84016 100644
--- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs
@@ -67,7 +67,14 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
67 { 67 {
68 m_log.Info("[MRM] Enabling MRM Module"); 68 m_log.Info("[MRM] Enabling MRM Module");
69 m_scene = scene; 69 m_scene = scene;
70 scene.EventManager.OnRezScript += EventManager_OnRezScript; 70
71 // when hidden, we don't listen for client initiated script events
72 // only making the MRM engine available for region modules
73 if(!source.Configs["MRM"].GetBoolean("Hidden", false))
74 {
75 scene.EventManager.OnRezScript += EventManager_OnRezScript;
76 }
77
71 scene.EventManager.OnFrame += EventManager_OnFrame; 78 scene.EventManager.OnFrame += EventManager_OnFrame;
72 79
73 scene.RegisterModuleInterface<IMRMModule>(this); 80 scene.RegisterModuleInterface<IMRMModule>(this);
@@ -158,7 +165,6 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
158 m_microthreads); 165 m_microthreads);
159 166
160 mmb.InitMiniModule(m_world, m_host, itemID); 167 mmb.InitMiniModule(m_world, m_host, itemID);
161
162 } 168 }
163 169
164 public void PostInitialise() 170 public void PostInitialise()
@@ -192,7 +198,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
192 /// <returns></returns> 198 /// <returns></returns>
193 internal string CompileFromDotNetText(string Script, string uuid) 199 internal string CompileFromDotNetText(string Script, string uuid)
194 { 200 {
195 m_log.Info("MRM 1"); 201 m_log.Info("MRM 1");
196 const string ext = ".cs"; 202 const string ext = ".cs";
197 const string FilePrefix = "MiniModule"; 203 const string FilePrefix = "MiniModule";
198 204