aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Modules/ChatModule.cs61
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.cs17
2 files changed, 15 insertions, 63 deletions
diff --git a/OpenSim/Region/Environment/Modules/ChatModule.cs b/OpenSim/Region/Environment/Modules/ChatModule.cs
index 081e7ac..75d3670 100644
--- a/OpenSim/Region/Environment/Modules/ChatModule.cs
+++ b/OpenSim/Region/Environment/Modules/ChatModule.cs
@@ -119,31 +119,15 @@ namespace OpenSim.Region.Environment.Modules
119 LLVector3 toRegionPos = presence.AbsolutePosition + regionPos; 119 LLVector3 toRegionPos = presence.AbsolutePosition + regionPos;
120 int dis = Math.Abs((int) Util.GetDistanceTo(toRegionPos, fromRegionPos)); 120 int dis = Math.Abs((int) Util.GetDistanceTo(toRegionPos, fromRegionPos));
121 121
122 switch (type) 122 if (type == ChatTypeEnum.Whisper && dis > m_whisperdistance ||
123 type == ChatTypeEnum.Say && dis > m_saydistance ||
124 type == ChatTypeEnum.Shout && dis > m_shoutdistance)
123 { 125 {
124 case ChatTypeEnum.Whisper: 126 return;
125 if (dis < m_whisperdistance)
126 {
127 // TODO: should change so the message is sent through the avatar rather than direct to the ClientView
128 presence.ControllingClient.SendChatMessage(message, (byte) type, fromPos, fromName, fromAgentID);
129 }
130 break;
131 case ChatTypeEnum.Say:
132 if (dis < m_saydistance)
133 {
134 presence.ControllingClient.SendChatMessage(message, (byte) type, fromPos, fromName, fromAgentID);
135 }
136 break;
137 case ChatTypeEnum.Shout:
138 if (dis < m_shoutdistance)
139 {
140 presence.ControllingClient.SendChatMessage(message, (byte) type, fromPos, fromName, fromAgentID);
141 }
142 break;
143 case ChatTypeEnum.Broadcast:
144 presence.ControllingClient.SendChatMessage(message, (byte) type, fromPos, fromName, fromAgentID);
145 break;
146 } 127 }
128
129 // TODO: should change so the message is sent through the avatar rather than direct to the ClientView
130 presence.ControllingClient.SendChatMessage(message, (byte) type, fromPos, fromName, fromAgentID);
147 } 131 }
148 } 132 }
149 133
@@ -185,32 +169,17 @@ namespace OpenSim.Region.Environment.Modules
185 { 169 {
186 m_irc.PrivMsg(fromName, scene.RegionInfo.RegionName, e.Message); 170 m_irc.PrivMsg(fromName, scene.RegionInfo.RegionName, e.Message);
187 } 171 }
188
189 if (e.Channel == 0)
190 {
191 foreach (Scene s in m_scenes)
192 {
193 s.ForEachScenePresence(delegate(ScenePresence presence)
194 {
195 TrySendChatMessage(presence, fromPos, regionPos,
196 fromAgentID, fromName, e.Type, message);
197 });
198 }
199 }
200 } 172 }
201 else 173
174 if (e.Channel == 0)
202 { 175 {
203 if (avatar != null) 176 foreach (Scene s in m_scenes)
204 { 177 {
205 switch (e.Type) 178 s.ForEachScenePresence(delegate(ScenePresence presence)
206 { 179 {
207 case ChatTypeEnum.StartTyping: 180 TrySendChatMessage(presence, fromPos, regionPos,
208 avatar.setTyping(true); 181 fromAgentID, fromName, e.Type, message);
209 break; 182 });
210 case ChatTypeEnum.StopTyping:
211 avatar.setTyping(false);
212 break;
213 }
214 } 183 }
215 } 184 }
216 } 185 }
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
index 512eed0..3460e8f 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
@@ -964,23 +964,6 @@ namespace OpenSim.Region.Environment.Scenes
964 m_forcesList.Add(newVelocity); 964 m_forcesList.Add(newVelocity);
965 } 965 }
966 966
967 /// <summary>
968 /// Sets whether or not the agent is typing.
969 /// </summary>
970 public void setTyping(bool typing)
971 {
972 if (m_isChildAgent)
973 {
974 MainLog.Instance.Warn("setTyping called on child agent");
975 return;
976 }
977
978 if (typing)
979 AddAnimation(Animations.AnimsLLUUID["TYPE"], 1);
980 else
981 RemoveAnimation(Animations.AnimsLLUUID["TYPE"]);
982 }
983
984 #endregion 967 #endregion
985 968
986 #region Overridden Methods 969 #region Overridden Methods