diff options
author | Diva Canto | 2009-08-17 05:55:38 -0700 |
---|---|---|
committer | Diva Canto | 2009-08-17 05:55:38 -0700 |
commit | fa8a94577a2f38145da0c8a1f6d1c72c4f339ed9 (patch) | |
tree | 7bee741b06e6732fae848bef3c6b7f808ab3349a /OpenSim/Region/CoreModules/Avatar | |
parent | Bumped up grid services interface number. (diff) | |
parent | Add System.Xml reference to the console project (diff) | |
download | opensim-SC-fa8a94577a2f38145da0c8a1f6d1c72c4f339ed9.zip opensim-SC-fa8a94577a2f38145da0c8a1f6d1c72c4f339ed9.tar.gz opensim-SC-fa8a94577a2f38145da0c8a1f6d1c72c4f339ed9.tar.bz2 opensim-SC-fa8a94577a2f38145da0c8a1f6d1c72c4f339ed9.tar.xz |
Merge branch 'master' of ssh://diva@opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs index fcc2673..2426393 100644 --- a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs | |||
@@ -48,6 +48,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat | |||
48 | private int m_saydistance = 30; | 48 | private int m_saydistance = 30; |
49 | private int m_shoutdistance = 100; | 49 | private int m_shoutdistance = 100; |
50 | private int m_whisperdistance = 10; | 50 | private int m_whisperdistance = 10; |
51 | private string m_adminprefix = String.Empty; | ||
51 | private List<Scene> m_scenes = new List<Scene>(); | 52 | private List<Scene> m_scenes = new List<Scene>(); |
52 | 53 | ||
53 | internal object m_syncy = new object(); | 54 | internal object m_syncy = new object(); |
@@ -76,6 +77,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat | |||
76 | m_whisperdistance = config.Configs["Chat"].GetInt("whisper_distance", m_whisperdistance); | 77 | m_whisperdistance = config.Configs["Chat"].GetInt("whisper_distance", m_whisperdistance); |
77 | m_saydistance = config.Configs["Chat"].GetInt("say_distance", m_saydistance); | 78 | m_saydistance = config.Configs["Chat"].GetInt("say_distance", m_saydistance); |
78 | m_shoutdistance = config.Configs["Chat"].GetInt("shout_distance", m_shoutdistance); | 79 | m_shoutdistance = config.Configs["Chat"].GetInt("shout_distance", m_shoutdistance); |
80 | m_adminprefix = config.Configs["Chat"].GetString("admin_prefix", m_adminprefix); | ||
79 | } | 81 | } |
80 | 82 | ||
81 | public virtual void AddRegion(Scene scene) | 83 | public virtual void AddRegion(Scene scene) |
@@ -207,6 +209,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat | |||
207 | fromPos = avatar.AbsolutePosition; | 209 | fromPos = avatar.AbsolutePosition; |
208 | fromName = avatar.Name; | 210 | fromName = avatar.Name; |
209 | fromID = c.Sender.AgentId; | 211 | fromID = c.Sender.AgentId; |
212 | if (avatar.GodLevel > 100) | ||
213 | fromName = m_adminprefix + fromName; | ||
210 | 214 | ||
211 | break; | 215 | break; |
212 | 216 | ||
@@ -255,14 +259,23 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat | |||
255 | string fromName = c.From; | 259 | string fromName = c.From; |
256 | 260 | ||
257 | UUID fromID = UUID.Zero; | 261 | UUID fromID = UUID.Zero; |
262 | UUID ownerID = UUID.Zero; | ||
258 | ChatSourceType sourceType = ChatSourceType.Object; | 263 | ChatSourceType sourceType = ChatSourceType.Object; |
259 | if (null != c.Sender) | 264 | if (null != c.Sender) |
260 | { | 265 | { |
261 | ScenePresence avatar = (c.Scene as Scene).GetScenePresence(c.Sender.AgentId); | 266 | ScenePresence avatar = (c.Scene as Scene).GetScenePresence(c.Sender.AgentId); |
262 | fromID = c.Sender.AgentId; | 267 | fromID = c.Sender.AgentId; |
268 | ownerID = c.Sender.AgentId; | ||
263 | fromName = avatar.Name; | 269 | fromName = avatar.Name; |
264 | sourceType = ChatSourceType.Agent; | 270 | sourceType = ChatSourceType.Agent; |
265 | } | 271 | } |
272 | if (c.SenderObject != null) | ||
273 | { | ||
274 | SceneObjectPart senderObject = (SceneObjectPart)c.SenderObject; | ||
275 | fromID = senderObject.UUID; | ||
276 | ownerID = senderObject.OwnerID; | ||
277 | fromName = senderObject.Name; | ||
278 | } | ||
266 | 279 | ||
267 | // m_log.DebugFormat("[CHAT] Broadcast: fromID {0} fromName {1}, cType {2}, sType {3}", fromID, fromName, cType, sourceType); | 280 | // m_log.DebugFormat("[CHAT] Broadcast: fromID {0} fromName {1}, cType {2}, sType {3}", fromID, fromName, cType, sourceType); |
268 | 281 | ||