aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorSignpostMarv2012-11-10 08:59:27 +0000
committerDiva Canto2012-11-10 08:12:31 -0800
commit5cba04e2d6a7dd59a299e95d0e30faa7a5f9747e (patch)
tree01d4fc2eb34557bc6f1fc43c50bb319a7e184408 /OpenSim/Region
parent80 character-width terminal formatting of IDialogModule interface, removing s... (diff)
downloadopensim-SC-5cba04e2d6a7dd59a299e95d0e30faa7a5f9747e.zip
opensim-SC-5cba04e2d6a7dd59a299e95d0e30faa7a5f9747e.tar.gz
opensim-SC-5cba04e2d6a7dd59a299e95d0e30faa7a5f9747e.tar.bz2
opensim-SC-5cba04e2d6a7dd59a299e95d0e30faa7a5f9747e.tar.xz
Converting DialogModule to INonSharedRegionModule
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs28
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;
32using Nini.Config; 32using Nini.Config;
33using OpenMetaverse; 33using OpenMetaverse;
34using OpenSim.Framework; 34using OpenSim.Framework;
35using Mono.Addins;
35 36
36using OpenSim.Region.Framework.Interfaces; 37using OpenSim.Region.Framework.Interfaces;
37using OpenSim.Region.Framework.Scenes; 38using OpenSim.Region.Framework.Scenes;
@@ -39,16 +40,27 @@ using OpenSim.Services.Interfaces;
39 40
40namespace OpenSim.Region.CoreModules.Avatar.Dialog 41namespace 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 {