diff options
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs | 37 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/Properties/AssemblyInfo.cs | 2 |
2 files changed, 38 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs index 7bc5e51..db62b31 100644 --- a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs | |||
@@ -32,6 +32,7 @@ using log4net; | |||
32 | using Nini.Config; | 32 | using Nini.Config; |
33 | using Mono.Addins; | 33 | using Mono.Addins; |
34 | using OpenMetaverse; | 34 | using OpenMetaverse; |
35 | using OpenMetaverse.StructuredData; | ||
35 | using OpenSim.Framework; | 36 | using OpenSim.Framework; |
36 | using OpenSim.Region.Framework.Interfaces; | 37 | using OpenSim.Region.Framework.Interfaces; |
37 | using OpenSim.Region.Framework.Scenes; | 38 | using OpenSim.Region.Framework.Scenes; |
@@ -94,6 +95,14 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat | |||
94 | 95 | ||
95 | public virtual void RegionLoaded(Scene scene) | 96 | public virtual void RegionLoaded(Scene scene) |
96 | { | 97 | { |
98 | if (!m_enabled) | ||
99 | return; | ||
100 | |||
101 | ISimulatorFeaturesModule featuresModule = scene.RequestModuleInterface<ISimulatorFeaturesModule>(); | ||
102 | |||
103 | if (featuresModule != null) | ||
104 | featuresModule.OnSimulatorFeaturesRequest += OnSimulatorFeaturesRequest; | ||
105 | |||
97 | } | 106 | } |
98 | 107 | ||
99 | public virtual void RemoveRegion(Scene scene) | 108 | public virtual void RemoveRegion(Scene scene) |
@@ -351,5 +360,33 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat | |||
351 | 360 | ||
352 | return true; | 361 | return true; |
353 | } | 362 | } |
363 | |||
364 | #region SimulatorFeaturesRequest | ||
365 | |||
366 | static OSDInteger m_SayRange, m_WhisperRange, m_ShoutRange; | ||
367 | |||
368 | private void OnSimulatorFeaturesRequest(UUID agentID, ref OSDMap features) | ||
369 | { | ||
370 | OSD extras = new OSDMap(); | ||
371 | if (features.ContainsKey("OpenSimExtras")) | ||
372 | extras = features["OpenSimExtras"]; | ||
373 | else | ||
374 | features["OpenSimExtras"] = extras; | ||
375 | |||
376 | if (m_SayRange == null) | ||
377 | { | ||
378 | // Do this only once | ||
379 | m_SayRange = new OSDInteger(m_saydistance); | ||
380 | m_WhisperRange = new OSDInteger(m_whisperdistance); | ||
381 | m_ShoutRange = new OSDInteger(m_shoutdistance); | ||
382 | } | ||
383 | |||
384 | ((OSDMap)extras)["say-range"] = m_SayRange; | ||
385 | ((OSDMap)extras)["whisper-range"] = m_WhisperRange; | ||
386 | ((OSDMap)extras)["shout-range"] = m_ShoutRange; | ||
387 | |||
388 | } | ||
389 | |||
390 | #endregion | ||
354 | } | 391 | } |
355 | } \ No newline at end of file | 392 | } \ No newline at end of file |
diff --git a/OpenSim/Region/CoreModules/Properties/AssemblyInfo.cs b/OpenSim/Region/CoreModules/Properties/AssemblyInfo.cs index bfe0383..9809c86 100644 --- a/OpenSim/Region/CoreModules/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/CoreModules/Properties/AssemblyInfo.cs | |||
@@ -30,7 +30,7 @@ using Mono.Addins; | |||
30 | // Build Number | 30 | // Build Number |
31 | // Revision | 31 | // Revision |
32 | // | 32 | // |
33 | [assembly: AssemblyVersion("0.7.6.*")] | 33 | [assembly: AssemblyVersion("0.8.0.*")] |
34 | 34 | ||
35 | 35 | ||
36 | [assembly: Addin("OpenSim.Region.CoreModules", "0.1")] | 36 | [assembly: Addin("OpenSim.Region.CoreModules", "0.1")] |