aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs32
1 files changed, 26 insertions, 6 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs b/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs
index 72ec869..ecffc7a 100644
--- a/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs
@@ -25,9 +25,11 @@
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
28using System;
28using System.Collections.Generic; 29using System.Collections.Generic;
29using System.Reflection; 30using System.Reflection;
30using log4net; 31using log4net;
32using Mono.Addins;
31using Nini.Config; 33using Nini.Config;
32using OpenMetaverse; 34using OpenMetaverse;
33using OpenSim.Framework; 35using OpenSim.Framework;
@@ -37,28 +39,46 @@ using OpenSim.Region.Framework.Scenes;
37 39
38namespace OpenSim.Region.CoreModules.Avatar.Dialog 40namespace OpenSim.Region.CoreModules.Avatar.Dialog
39{ 41{
40 public class DialogModule : IRegionModule, IDialogModule 42 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
43 public class DialogModule : ISharedRegionModule, IDialogModule
41 { 44 {
42 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 45 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
43 46
44 protected Scene m_scene; 47 protected Scene m_scene;
45 48
46 public void Initialise(Scene scene, IConfigSource source) 49 public void Initialise(IConfigSource source)
50 {
51 }
52
53 public Type ReplaceableInterface
54 {
55 get { return null; }
56 }
57
58 public void AddRegion(Scene scene)
47 { 59 {
48 m_scene = scene; 60 m_scene = scene;
49 m_scene.RegisterModuleInterface<IDialogModule>(this); 61 m_scene.RegisterModuleInterface<IDialogModule>(this);
50 62
51 m_scene.AddCommand( 63 m_scene.AddCommand(
52 this, "alert", "alert <first> <last> <message>", "Send an alert to a user", HandleAlertConsoleCommand); 64 this, "alert", "alert <first> <last> <message>", "Send an alert to a user", HandleAlertConsoleCommand);
53 65
54 m_scene.AddCommand( 66 m_scene.AddCommand(
55 this, "alert general", "alert general <message>", "Send an alert to everyone", HandleAlertConsoleCommand); 67 this, "alert general", "alert general <message>", "Send an alert to everyone", HandleAlertConsoleCommand);
56 } 68 }
57 69
58 public void PostInitialise() {} 70 public void RegionLoaded(Scene scene)
71 {
72 }
73
74 public void RemoveRegion(Scene scene)
75 {
76 scene.UnregisterModuleInterface<IDialogModule>(this);
77 }
78
79 public void PostInitialise() { }
59 public void Close() {} 80 public void Close() {}
60 public string Name { get { return "Dialog Module"; } } 81 public string Name { get { return "Dialog Module"; } }
61 public bool IsSharedModule { get { return false; } }
62 82
63 public void SendAlertToUser(IClientAPI client, string message) 83 public void SendAlertToUser(IClientAPI client, string message)
64 { 84 {