public void OnClosingClient(UUID clientID, Scene scene)
{
//Clear out the auth speakers list
lock (m_authorizedSpeakers)
{
if (m_authorizedSpeakers.Contains(clientID))
m_authorizedSpeakers.Remove(clientID);
}
ScenePresence presence = scene.GetScenePresence(clientID);
//Announce the closing agent if enabled
if (m_announceClosedAgents)
{
scene.ForEachScenePresence(delegate(ScenePresence SP)
{
if (SP.UUID != clientID && !SP.IsChildAgent)
{
IEntityCountModule entityCountModule = scene.RequestModuleInterface<IEntityCountModule>();
if (entityCountModule != null)
SP.ControllingClient.SendChatMessage(presence.Name + " has left the region. Total Agents: " + entityCountModule.RootAgents, 1, SP.AbsolutePosition, "System",
UUID.Zero, (byte)ChatSourceType.System, (byte)ChatAudibleLevel.Fully);
}
}
);
}
}