mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 01:35:46 +08:00
Add llRegionSayTo
llRegionSayTo(key target, integer channel, string messasge) Allows messages to be sent region-wide to a particular prim.
This commit is contained in:
@@ -282,6 +282,27 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm
|
||||
}
|
||||
}
|
||||
|
||||
// wComm.DeliverMessageTo(target, channelID, m_host.Name, m_host.UUID, text);
|
||||
public void DeliverMessageTo(UUID target, int channel, string name, UUID id, string msg)
|
||||
{
|
||||
foreach (ListenerInfo li in m_listenerManager.GetListeners(UUID.Zero, channel, name, id, msg))
|
||||
{
|
||||
// Dont process if this message is from yourself!
|
||||
if (li.GetHostID().Equals(id))
|
||||
continue;
|
||||
|
||||
SceneObjectPart sPart = m_scene.GetSceneObjectPart(li.GetHostID());
|
||||
if (sPart == null)
|
||||
continue;
|
||||
|
||||
if ( li.GetHostID().Equals(target))
|
||||
{
|
||||
QueueMessage(new ListenerInfo(li, name, id, msg));
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void QueueMessage(ListenerInfo li)
|
||||
{
|
||||
lock (m_pending.SyncRoot)
|
||||
|
||||
Reference in New Issue
Block a user