diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/Dialog')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs b/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs index ebebaf9..72ec869 100644 --- a/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs | |||
@@ -85,10 +85,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog | |||
85 | 85 | ||
86 | public void SendAlertToUser(string firstName, string lastName, string message, bool modal) | 86 | public void SendAlertToUser(string firstName, string lastName, string message, bool modal) |
87 | { | 87 | { |
88 | List<ScenePresence> presenceList = m_scene.GetScenePresences(); | 88 | ScenePresence[] presenceList = m_scene.GetScenePresences(); |
89 | 89 | ||
90 | foreach (ScenePresence presence in presenceList) | 90 | for (int i = 0; i < presenceList.Length; i++) |
91 | { | 91 | { |
92 | ScenePresence presence = presenceList[i]; | ||
93 | |||
92 | if (presence.Firstname == firstName && presence.Lastname == lastName) | 94 | if (presence.Firstname == firstName && presence.Lastname == lastName) |
93 | { | 95 | { |
94 | presence.ControllingClient.SendAgentAlertMessage(message, modal); | 96 | presence.ControllingClient.SendAgentAlertMessage(message, modal); |
@@ -99,10 +101,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog | |||
99 | 101 | ||
100 | public void SendGeneralAlert(string message) | 102 | public void SendGeneralAlert(string message) |
101 | { | 103 | { |
102 | List<ScenePresence> presenceList = m_scene.GetScenePresences(); | 104 | ScenePresence[] presenceList = m_scene.GetScenePresences(); |
103 | 105 | ||
104 | foreach (ScenePresence presence in presenceList) | 106 | for (int i = 0; i < presenceList.Length; i++) |
105 | { | 107 | { |
108 | ScenePresence presence = presenceList[i]; | ||
109 | |||
106 | if (!presence.IsChildAgent) | 110 | if (!presence.IsChildAgent) |
107 | presence.ControllingClient.SendAlertMessage(message); | 111 | presence.ControllingClient.SendAlertMessage(message); |
108 | } | 112 | } |
@@ -150,10 +154,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog | |||
150 | public void SendNotificationToUsersInRegion( | 154 | public void SendNotificationToUsersInRegion( |
151 | UUID fromAvatarID, string fromAvatarName, string message) | 155 | UUID fromAvatarID, string fromAvatarName, string message) |
152 | { | 156 | { |
153 | List<ScenePresence> presenceList = m_scene.GetScenePresences(); | 157 | ScenePresence[] presences = m_scene.GetScenePresences(); |
154 | 158 | ||
155 | foreach (ScenePresence presence in presenceList) | 159 | for (int i = 0; i < presences.Length; i++) |
156 | { | 160 | { |
161 | ScenePresence presence = presences[i]; | ||
157 | if (!presence.IsChildAgent) | 162 | if (!presence.IsChildAgent) |
158 | presence.ControllingClient.SendBlueBoxMessage(fromAvatarID, fromAvatarName, message); | 163 | presence.ControllingClient.SendBlueBoxMessage(fromAvatarID, fromAvatarName, message); |
159 | } | 164 | } |