diff options
Diffstat (limited to 'OpenSim/Region/OptionalModules')
-rw-r--r-- | OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs b/OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs index 705a847..de0e864 100644 --- a/OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs +++ b/OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs | |||
@@ -130,10 +130,17 @@ namespace OpenSim.Region.OptionalModules.Scripting.ScriptModuleComms | |||
130 | m_scriptModule.PostScriptEvent(script, "link_message", args); | 130 | m_scriptModule.PostScriptEvent(script, "link_message", args); |
131 | } | 131 | } |
132 | 132 | ||
133 | public void RegisterScriptInvocation(object target, string meth) | 133 | private static MethodInfo GetMethodInfoFromType(object target, string meth) |
134 | { | 134 | { |
135 | MethodInfo mi = target.GetType().GetMethod(meth, | 135 | MethodInfo mi = target.GetType().GetMethod(meth, |
136 | BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance); | 136 | BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance); |
137 | |||
138 | return mi; | ||
139 | } | ||
140 | |||
141 | public void RegisterScriptInvocation(object target, string meth) | ||
142 | { | ||
143 | MethodInfo mi = GetMethodInfoFromType(target, meth); | ||
137 | if (mi == null) | 144 | if (mi == null) |
138 | { | 145 | { |
139 | m_log.WarnFormat("[MODULE COMMANDS] Failed to register method {0}",meth); | 146 | m_log.WarnFormat("[MODULE COMMANDS] Failed to register method {0}",meth); |