diff options
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Gestures/GesturesModule.cs | 33 |
1 files changed, 27 insertions, 6 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Gestures/GesturesModule.cs b/OpenSim/Region/CoreModules/Avatar/Gestures/GesturesModule.cs index 7df2beb..de70dba 100644 --- a/OpenSim/Region/CoreModules/Avatar/Gestures/GesturesModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Gestures/GesturesModule.cs | |||
@@ -25,6 +25,7 @@ | |||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System; | ||
28 | using System.Reflection; | 29 | using System.Reflection; |
29 | using log4net; | 30 | using log4net; |
30 | using Nini.Config; | 31 | using Nini.Config; |
@@ -35,26 +36,46 @@ using OpenSim.Region.Framework.Interfaces; | |||
35 | using OpenSim.Region.Framework.Scenes; | 36 | using OpenSim.Region.Framework.Scenes; |
36 | using OpenSim.Services.Interfaces; | 37 | using OpenSim.Services.Interfaces; |
37 | 38 | ||
39 | using Mono.Addins; | ||
40 | |||
38 | namespace OpenSim.Region.CoreModules.Avatar.Gestures | 41 | namespace OpenSim.Region.CoreModules.Avatar.Gestures |
39 | { | 42 | { |
40 | public class GesturesModule : IRegionModule | 43 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] |
44 | public class GesturesModule : INonSharedRegionModule | ||
41 | { | 45 | { |
42 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 46 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
43 | 47 | ||
44 | protected Scene m_scene; | 48 | protected Scene m_scene; |
45 | 49 | ||
46 | public void Initialise(Scene scene, IConfigSource source) | 50 | public void Initialise(IConfigSource source) |
51 | { | ||
52 | } | ||
53 | |||
54 | public void AddRegion(Scene scene) | ||
47 | { | 55 | { |
48 | m_scene = scene; | 56 | m_scene = scene; |
49 | 57 | ||
50 | m_scene.EventManager.OnNewClient += OnNewClient; | 58 | m_scene.EventManager.OnNewClient += OnNewClient; |
51 | } | 59 | } |
60 | |||
61 | public void RegionLoaded(Scene scene) | ||
62 | { | ||
63 | } | ||
64 | |||
65 | public void RemoveRegion(Scene scene) | ||
66 | { | ||
67 | m_scene.EventManager.OnNewClient -= OnNewClient; | ||
68 | m_scene = null; | ||
69 | } | ||
52 | 70 | ||
53 | public void PostInitialise() {} | ||
54 | public void Close() {} | 71 | public void Close() {} |
55 | public string Name { get { return "Gestures Module"; } } | 72 | public string Name { get { return "Gestures Module"; } } |
56 | public bool IsSharedModule { get { return false; } } | 73 | |
57 | 74 | public Type ReplaceableInterface | |
75 | { | ||
76 | get { return null; } | ||
77 | } | ||
78 | |||
58 | private void OnNewClient(IClientAPI client) | 79 | private void OnNewClient(IClientAPI client) |
59 | { | 80 | { |
60 | client.OnActivateGesture += ActivateGesture; | 81 | client.OnActivateGesture += ActivateGesture; |