* refactor: move code for sending a message to all users in a region to the DialogModule

This commit is contained in:
Justin Clarke Casey
2009-01-08 18:50:46 +00:00
parent b0a59c3bf3
commit 17f783457b
5 changed files with 42 additions and 41 deletions

View File

@@ -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);
}
}
}
}