aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs
diff options
context:
space:
mode:
authorSignpostMarv2012-08-31 12:56:30 +0100
committerMelanie2012-08-31 14:32:31 +0100
commitdff746df7be488d8ff35c91a974f406216222423 (patch)
treecc805dac5e9312a256f1ada4d8d9c2420712974f /OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs
parentadding documentation to script invokation methods (diff)
downloadopensim-SC-dff746df7be488d8ff35c91a974f406216222423.zip
opensim-SC-dff746df7be488d8ff35c91a974f406216222423.tar.gz
opensim-SC-dff746df7be488d8ff35c91a974f406216222423.tar.bz2
opensim-SC-dff746df7be488d8ff35c91a974f406216222423.tar.xz
moving code that will be common into private static method
Diffstat (limited to 'OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs')
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs9
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);