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