aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs')
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs18
1 files changed, 14 insertions, 4 deletions
diff --git a/OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs b/OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs
index 0605590..cab30de 100644
--- a/OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs
@@ -130,9 +130,6 @@ 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 m_log.DebugFormat("[MODULE COMMANDS] Register method {0} from type {1}",meth,target.GetType().Name);
134
135
136 MethodInfo mi = target.GetType().GetMethod(meth, 133 MethodInfo mi = target.GetType().GetMethod(meth,
137 BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance); 134 BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance);
138 if (mi == null) 135 if (mi == null)
@@ -140,7 +137,20 @@ namespace OpenSim.Region.CoreModules.Scripting.ScriptModuleComms
140 m_log.WarnFormat("[MODULE COMMANDS] Failed to register method {0}",meth); 137 m_log.WarnFormat("[MODULE COMMANDS] Failed to register method {0}",meth);
141 return; 138 return;
142 } 139 }
143 140
141 RegisterScriptInvocation(target, mi);
142 }
143
144 public void RegisterScriptInvocation(object target, string[] meth)
145 {
146 foreach (string m in meth)
147 RegisterScriptInvocation(target, m);
148 }
149
150 public void RegisterScriptInvocation(object target, MethodInfo mi)
151 {
152 m_log.DebugFormat("[MODULE COMMANDS] Register method {0} from type {1}", mi.Name, target.GetType().Name);
153
144 Type delegateType; 154 Type delegateType;
145 var typeArgs = mi.GetParameters() 155 var typeArgs = mi.GetParameters()
146 .Select(p => p.ParameterType) 156 .Select(p => p.ParameterType)