aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs')
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs43
1 files changed, 42 insertions, 1 deletions
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
index 2b8379d..adc6f9c 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
@@ -212,6 +212,11 @@ namespace OpenSim.Region.OptionalModules.World.NPC
212 212
213 public bool Say(UUID agentID, Scene scene, string text) 213 public bool Say(UUID agentID, Scene scene, string text)
214 { 214 {
215 return Say(agentID, scene, text, 0);
216 }
217
218 public bool Say(UUID agentID, Scene scene, string text, int channel)
219 {
215 lock (m_avatars) 220 lock (m_avatars)
216 { 221 {
217 if (m_avatars.ContainsKey(agentID)) 222 if (m_avatars.ContainsKey(agentID))
@@ -219,7 +224,25 @@ namespace OpenSim.Region.OptionalModules.World.NPC
219 ScenePresence sp; 224 ScenePresence sp;
220 scene.TryGetScenePresence(agentID, out sp); 225 scene.TryGetScenePresence(agentID, out sp);
221 226
222 m_avatars[agentID].Say(text); 227 m_avatars[agentID].Say(channel, text);
228
229 return true;
230 }
231 }
232
233 return false;
234 }
235
236 public bool Shout(UUID agentID, Scene scene, string text, int channel)
237 {
238 lock (m_avatars)
239 {
240 if (m_avatars.ContainsKey(agentID))
241 {
242 ScenePresence sp;
243 scene.TryGetScenePresence(agentID, out sp);
244
245 m_avatars[agentID].Shout(channel, text);
223 246
224 return true; 247 return true;
225 } 248 }
@@ -246,6 +269,24 @@ namespace OpenSim.Region.OptionalModules.World.NPC
246 return false; 269 return false;
247 } 270 }
248 271
272 public bool Whisper(UUID agentID, Scene scene, string text, int channel)
273 {
274 lock (m_avatars)
275 {
276 if (m_avatars.ContainsKey(agentID))
277 {
278 ScenePresence sp;
279 scene.TryGetScenePresence(agentID, out sp);
280
281 m_avatars[agentID].Whisper(channel, text);
282
283 return true;
284 }
285 }
286
287 return false;
288 }
289
249 public bool Stand(UUID agentID, Scene scene) 290 public bool Stand(UUID agentID, Scene scene)
250 { 291 {
251 lock (m_avatars) 292 lock (m_avatars)