diff options
author | Jeff Ames | 2008-05-28 03:44:49 +0000 |
---|---|---|
committer | Jeff Ames | 2008-05-28 03:44:49 +0000 |
commit | 5752c1f5c2ee069e2ff5ffc0ff2f186d7454c5c4 (patch) | |
tree | ea980f49f1a6bb40ba037a87581a3d741c3d3c56 /OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs | |
parent | Thank you kindly, Melanie for a patch that: (diff) | |
download | opensim-SC_OLD-5752c1f5c2ee069e2ff5ffc0ff2f186d7454c5c4.zip opensim-SC_OLD-5752c1f5c2ee069e2ff5ffc0ff2f186d7454c5c4.tar.gz opensim-SC_OLD-5752c1f5c2ee069e2ff5ffc0ff2f186d7454c5c4.tar.bz2 opensim-SC_OLD-5752c1f5c2ee069e2ff5ffc0ff2f186d7454c5c4.tar.xz |
Formatting cleanup.
Diffstat (limited to 'OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs')
-rw-r--r-- | OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs index 89437c5..5414322 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs | |||
@@ -122,24 +122,24 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat | |||
122 | 122 | ||
123 | IClientAPI client = presence.ControllingClient; | 123 | IClientAPI client = presence.ControllingClient; |
124 | 124 | ||
125 | if ((c.Type == ChatTypeEnum.Owner) && | 125 | if ((c.Type == ChatTypeEnum.Owner) && |
126 | (null != c.SenderObject) && | 126 | (null != c.SenderObject) && |
127 | (((SceneObjectPart)c.SenderObject).OwnerID != client.AgentId)) | 127 | (((SceneObjectPart)c.SenderObject).OwnerID != client.AgentId)) |
128 | return; | 128 | return; |
129 | 129 | ||
130 | if (null == c.SenderObject) | 130 | if (null == c.SenderObject) |
131 | client.SendChatMessage(c.Message, (byte)c.Type, | 131 | client.SendChatMessage(c.Message, (byte)c.Type, |
132 | pos, c.From, LLUUID.Zero, | 132 | pos, c.From, LLUUID.Zero, |
133 | (byte)ChatSourceType.Agent, | 133 | (byte)ChatSourceType.Agent, |
134 | (byte)ChatAudibleLevel.Fully); | 134 | (byte)ChatAudibleLevel.Fully); |
135 | else | 135 | else |
136 | client.SendChatMessage(c.Message, (byte)c.Type, | 136 | client.SendChatMessage(c.Message, (byte)c.Type, |
137 | pos, c.From, LLUUID.Zero, | 137 | pos, c.From, LLUUID.Zero, |
138 | (byte)ChatSourceType.Object, | 138 | (byte)ChatSourceType.Object, |
139 | (byte)ChatAudibleLevel.Fully); | 139 | (byte)ChatAudibleLevel.Fully); |
140 | }); | 140 | }); |
141 | } | 141 | } |
142 | 142 | ||
143 | public void SimChat(Object sender, ChatFromViewerArgs e) | 143 | public void SimChat(Object sender, ChatFromViewerArgs e) |
144 | { | 144 | { |
145 | // early return if not on public or debug channel | 145 | // early return if not on public or debug channel |
@@ -187,13 +187,13 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat | |||
187 | if (e.Channel == DEBUG_CHANNEL) | 187 | if (e.Channel == DEBUG_CHANNEL) |
188 | { | 188 | { |
189 | TrySendChatMessage(presence, fromPos, regionPos, | 189 | TrySendChatMessage(presence, fromPos, regionPos, |
190 | fromID, fromName, e.Type, | 190 | fromID, fromName, e.Type, |
191 | message, ChatSourceType.Object); | 191 | message, ChatSourceType.Object); |
192 | } | 192 | } |
193 | else | 193 | else |
194 | { | 194 | { |
195 | TrySendChatMessage(presence, fromPos, regionPos, | 195 | TrySendChatMessage(presence, fromPos, regionPos, |
196 | fromID, fromName, e.Type, | 196 | fromID, fromName, e.Type, |
197 | message, ChatSourceType.Agent); | 197 | message, ChatSourceType.Agent); |
198 | } | 198 | } |
199 | }); | 199 | }); |
@@ -224,16 +224,16 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat | |||
224 | LLVector3 fromRegionPos = fromPos + regionPos; | 224 | LLVector3 fromRegionPos = fromPos + regionPos; |
225 | LLVector3 toRegionPos = presence.AbsolutePosition + regionPos; | 225 | LLVector3 toRegionPos = presence.AbsolutePosition + regionPos; |
226 | int dis = Math.Abs((int) Util.GetDistanceTo(toRegionPos, fromRegionPos)); | 226 | int dis = Math.Abs((int) Util.GetDistanceTo(toRegionPos, fromRegionPos)); |
227 | 227 | ||
228 | if (type == ChatTypeEnum.Whisper && dis > m_whisperdistance || | 228 | if (type == ChatTypeEnum.Whisper && dis > m_whisperdistance || |
229 | type == ChatTypeEnum.Say && dis > m_saydistance || | 229 | type == ChatTypeEnum.Say && dis > m_saydistance || |
230 | type == ChatTypeEnum.Shout && dis > m_shoutdistance) | 230 | type == ChatTypeEnum.Shout && dis > m_shoutdistance) |
231 | { | 231 | { |
232 | return; | 232 | return; |
233 | } | 233 | } |
234 | 234 | ||
235 | // TODO: should change so the message is sent through the avatar rather than direct to the ClientView | 235 | // TODO: should change so the message is sent through the avatar rather than direct to the ClientView |
236 | presence.ControllingClient.SendChatMessage(message, (byte) type, fromPos, fromName, | 236 | presence.ControllingClient.SendChatMessage(message, (byte) type, fromPos, fromName, |
237 | fromAgentID,(byte)src,(byte)ChatAudibleLevel.Fully); | 237 | fromAgentID,(byte)src,(byte)ChatAudibleLevel.Fully); |
238 | } | 238 | } |
239 | } | 239 | } |