diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs b/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs index 325067c..2fe708f 100644 --- a/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs | |||
@@ -32,6 +32,7 @@ using log4net; | |||
32 | using Nini.Config; | 32 | using Nini.Config; |
33 | using OpenMetaverse; | 33 | using OpenMetaverse; |
34 | using OpenSim.Framework; | 34 | using OpenSim.Framework; |
35 | using Mono.Addins; | ||
35 | 36 | ||
36 | using OpenSim.Region.Framework.Interfaces; | 37 | using OpenSim.Region.Framework.Interfaces; |
37 | using OpenSim.Region.Framework.Scenes; | 38 | using OpenSim.Region.Framework.Scenes; |
@@ -39,16 +40,27 @@ using OpenSim.Services.Interfaces; | |||
39 | 40 | ||
40 | namespace OpenSim.Region.CoreModules.Avatar.Dialog | 41 | namespace OpenSim.Region.CoreModules.Avatar.Dialog |
41 | { | 42 | { |
42 | public class DialogModule : IRegionModule, IDialogModule | 43 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] |
44 | public class DialogModule : IDialogModule, INonSharedRegionModule | ||
43 | { | 45 | { |
44 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 46 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
45 | 47 | ||
46 | protected Scene m_scene; | 48 | protected Scene m_scene; |
47 | 49 | ||
48 | public void Initialise(Scene scene, IConfigSource source) | 50 | public void Initialise(IConfigSource source) { } |
51 | |||
52 | public Type ReplaceableInterface { get { return null; } } | ||
53 | |||
54 | public void AddRegion(Scene scene) | ||
49 | { | 55 | { |
50 | m_scene = scene; | 56 | m_scene = scene; |
51 | m_scene.RegisterModuleInterface<IDialogModule>(this); | 57 | m_scene.RegisterModuleInterface<IDialogModule>(this); |
58 | } | ||
59 | |||
60 | public void RegionLoaded(Scene scene) | ||
61 | { | ||
62 | if(scene != m_scene) | ||
63 | return; | ||
52 | 64 | ||
53 | m_scene.AddCommand( | 65 | m_scene.AddCommand( |
54 | "Users", this, "alert", "alert <message>", | 66 | "Users", this, "alert", "alert <message>", |
@@ -60,11 +72,17 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog | |||
60 | "Send an alert to a user", | 72 | "Send an alert to a user", |
61 | HandleAlertConsoleCommand); | 73 | HandleAlertConsoleCommand); |
62 | } | 74 | } |
75 | |||
76 | public void RemoveRegion(Scene scene) | ||
77 | { | ||
78 | if(scene != m_scene) | ||
79 | return; | ||
80 | |||
81 | m_scene.UnregisterModuleInterface<IDialogModule>(this); | ||
82 | } | ||
63 | 83 | ||
64 | public void PostInitialise() {} | ||
65 | public void Close() {} | 84 | public void Close() {} |
66 | public string Name { get { return "Dialog Module"; } } | 85 | public string Name { get { return "Dialog Module"; } } |
67 | public bool IsSharedModule { get { return false; } } | ||
68 | 86 | ||
69 | public void SendAlertToUser(IClientAPI client, string message) | 87 | public void SendAlertToUser(IClientAPI client, string message) |
70 | { | 88 | { |