mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 22:26:09 +08:00
* refactor: move code for sending a message to all users in a region to the DialogModule
This commit is contained in:
@@ -90,10 +90,6 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Dialog
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Send an alert messages to all avatars in this scene.
|
||||
/// </summary>
|
||||
/// <param name="message"></param>
|
||||
public void SendGeneralAlert(string message)
|
||||
{
|
||||
List<ScenePresence> presenceList = m_scene.GetScenePresences();
|
||||
@@ -103,6 +99,18 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Dialog
|
||||
if (!presence.IsChildAgent)
|
||||
presence.ControllingClient.SendAlertMessage(message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void SendNotificationToUsersInRegion(
|
||||
UUID fromAvatarID, string fromAvatarName, string message)
|
||||
{
|
||||
List<ScenePresence> presenceList = m_scene.GetScenePresences();
|
||||
|
||||
foreach (ScenePresence presence in presenceList)
|
||||
{
|
||||
if (!presence.IsChildAgent)
|
||||
presence.ControllingClient.SendBlueBoxMessage(fromAvatarID, fromAvatarName, message);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user