aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/Scripting
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/OptionalModules/Scripting')
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs15
1 files changed, 8 insertions, 7 deletions
diff --git a/OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs b/OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs
index 7fc8759..1e755ba 100644
--- a/OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs
@@ -130,7 +130,7 @@ namespace OpenSim.Region.CoreModules.Scripting.ScriptModuleComms
130 130
131 public void RegisterScriptInvocation(object target, string meth) 131 public void RegisterScriptInvocation(object target, string meth)
132 { 132 {
133 MethodInfo mi = target.GetType()..GetMethod(meth, 133 MethodInfo mi = target.GetType().GetMethod(meth,
134 BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance); 134 BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance);
135 Type delegateType; 135 Type delegateType;
136 136
@@ -153,13 +153,13 @@ namespace OpenSim.Region.CoreModules.Scripting.ScriptModuleComms
153 lock (m_scriptInvocation) 153 lock (m_scriptInvocation)
154 { 154 {
155 ParameterInfo[] parameters = fcall.Method.GetParameters (); 155 ParameterInfo[] parameters = fcall.Method.GetParameters ();
156 if (parameters.Length == 0) // Must have one UUID param 156 if (parameters.Length < 2) // Must have two UUID params
157 return; 157 return;
158 158
159 // Hide the first parameter 159 // Hide the first two parameters
160 Type[] parmTypes = new Type[parameters.Length - 1]; 160 Type[] parmTypes = new Type[parameters.Length - 2];
161 for (int i = 1 ; i < parameters.Length ; i++) 161 for (int i = 2 ; i < parameters.Length ; i++)
162 parmTypes[i - 1] = parameters[i].ParameterType; 162 parmTypes[i - 2] = parameters[i].ParameterType;
163 m_scriptInvocation[fcall.Method.Name] = new ScriptInvocationData(fcall.Method.Name, fcall, parmTypes, fcall.Method.ReturnType); 163 m_scriptInvocation[fcall.Method.Name] = new ScriptInvocationData(fcall.Method.Name, fcall, parmTypes, fcall.Method.ReturnType);
164 } 164 }
165 } 165 }
@@ -239,9 +239,10 @@ namespace OpenSim.Region.CoreModules.Scripting.ScriptModuleComms
239 return null; 239 return null;
240 } 240 }
241 241
242 public object InvokeOperation(UUID scriptid, string fname, params object[] parms) 242 public object InvokeOperation(UUID hostid, UUID scriptid, string fname, params object[] parms)
243 { 243 {
244 List<object> olist = new List<object>(); 244 List<object> olist = new List<object>();
245 olist.Add(hostid);
245 olist.Add(scriptid); 246 olist.Add(scriptid);
246 foreach (object o in parms) 247 foreach (object o in parms)
247 olist.Add(o); 248 olist.Add(o);