diff options
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/Environment/Interfaces/IDialogModule.cs | 16 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Modules/Avatar/Dialog/DialogModule.cs | 12 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 18 |
3 files changed, 36 insertions, 10 deletions
diff --git a/OpenSim/Region/Environment/Interfaces/IDialogModule.cs b/OpenSim/Region/Environment/Interfaces/IDialogModule.cs index 1e5c791..a296c5a 100644 --- a/OpenSim/Region/Environment/Interfaces/IDialogModule.cs +++ b/OpenSim/Region/Environment/Interfaces/IDialogModule.cs | |||
@@ -27,6 +27,7 @@ | |||
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using OpenMetaverse; | 29 | using OpenMetaverse; |
30 | using OpenSim.Framework; | ||
30 | 31 | ||
31 | namespace OpenSim.Region.Environment.Interfaces | 32 | namespace OpenSim.Region.Environment.Interfaces |
32 | { | 33 | { |
@@ -35,6 +36,21 @@ namespace OpenSim.Region.Environment.Interfaces | |||
35 | /// <summary> | 36 | /// <summary> |
36 | /// Send a non-modal alert message to a particular user. | 37 | /// Send a non-modal alert message to a particular user. |
37 | /// </summary> | 38 | /// </summary> |
39 | /// <param name="client"></param> | ||
40 | /// <param name="message"></param> | ||
41 | void SendAlertToUser(IClientAPI client, string message); | ||
42 | |||
43 | /// <summary> | ||
44 | /// Send an alert message to a particular user. | ||
45 | /// </summary> | ||
46 | /// <param name="client"></param> | ||
47 | /// <param name="message"></param> | ||
48 | /// <param name="modal"></param> | ||
49 | void SendAlertToUser(IClientAPI client, string message, bool modal); | ||
50 | |||
51 | /// <summary> | ||
52 | /// Send a non-modal alert message to a particular user. | ||
53 | /// </summary> | ||
38 | /// <param name="agentID"></param> | 54 | /// <param name="agentID"></param> |
39 | /// <param name="message"></param> | 55 | /// <param name="message"></param> |
40 | void SendAlertToUser(UUID agentID, string message); | 56 | void SendAlertToUser(UUID agentID, string message); |
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Dialog/DialogModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Dialog/DialogModule.cs index 14a05ae..430968d 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/Dialog/DialogModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/Dialog/DialogModule.cs | |||
@@ -53,6 +53,16 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Dialog | |||
53 | public string Name { get { return "Dialog Module"; } } | 53 | public string Name { get { return "Dialog Module"; } } |
54 | public bool IsSharedModule { get { return false; } } | 54 | public bool IsSharedModule { get { return false; } } |
55 | 55 | ||
56 | public void SendAlertToUser(IClientAPI client, string message) | ||
57 | { | ||
58 | SendAlertToUser(client, message, false); | ||
59 | } | ||
60 | |||
61 | public void SendAlertToUser(IClientAPI client, string message, bool modal) | ||
62 | { | ||
63 | client.SendAgentAlertMessage(message, modal); | ||
64 | } | ||
65 | |||
56 | public void SendAlertToUser(UUID agentID, string message) | 66 | public void SendAlertToUser(UUID agentID, string message) |
57 | { | 67 | { |
58 | SendAlertToUser(agentID, message, false); | 68 | SendAlertToUser(agentID, message, false); |
@@ -64,7 +74,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Dialog | |||
64 | 74 | ||
65 | if (sp != null) | 75 | if (sp != null) |
66 | sp.ControllingClient.SendAgentAlertMessage(message, modal); | 76 | sp.ControllingClient.SendAgentAlertMessage(message, modal); |
67 | } | 77 | } |
68 | 78 | ||
69 | public void SendAlertToUser(string firstName, string lastName, string message, bool modal) | 79 | public void SendAlertToUser(string firstName, string lastName, string message, bool modal) |
70 | { | 80 | { |
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 43354e6..dea265e 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -2506,11 +2506,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
2506 | CommsManager.UserService.UpdateUserProfile(UserProfile); | 2506 | CommsManager.UserService.UpdateUserProfile(UserProfile); |
2507 | 2507 | ||
2508 | // FUBAR ALERT: this needs to be "Home position set." so the viewer saves a home-screenshot. | 2508 | // FUBAR ALERT: this needs to be "Home position set." so the viewer saves a home-screenshot. |
2509 | remoteClient.SendAgentAlertMessage("Home position set.",false); | 2509 | m_dialogModule.SendAlertToUser(remoteClient, "Home position set."); |
2510 | } | 2510 | } |
2511 | else | 2511 | else |
2512 | { | 2512 | { |
2513 | remoteClient.SendAgentAlertMessage("Set Home request Failed",false); | 2513 | m_dialogModule.SendAlertToUser(remoteClient, "Set Home request Failed."); |
2514 | } | 2514 | } |
2515 | } | 2515 | } |
2516 | 2516 | ||
@@ -3469,7 +3469,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
3469 | } | 3469 | } |
3470 | else | 3470 | else |
3471 | { | 3471 | { |
3472 | m_scenePresences[agentID].ControllingClient.SendAgentAlertMessage("Request for god powers denied", false); | 3472 | m_dialogModule.SendAlertToUser(agentID, "Request for god powers denied"); |
3473 | } | 3473 | } |
3474 | } | 3474 | } |
3475 | } | 3475 | } |
@@ -3567,8 +3567,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
3567 | } | 3567 | } |
3568 | else | 3568 | else |
3569 | { | 3569 | { |
3570 | if (m_scenePresences.ContainsKey(godID)) | 3570 | m_dialogModule.SendAlertToUser(godID, "Kick request denied"); |
3571 | m_scenePresences[godID].ControllingClient.SendAgentAlertMessage("Kick request denied", false); | ||
3572 | } | 3571 | } |
3573 | } | 3572 | } |
3574 | } | 3573 | } |
@@ -4209,7 +4208,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
4209 | 4208 | ||
4210 | if ((effectivePerms & (uint)PermissionMask.Transfer) == 0) | 4209 | if ((effectivePerms & (uint)PermissionMask.Transfer) == 0) |
4211 | { | 4210 | { |
4212 | remoteClient.SendAgentAlertMessage("This item doesn't appear to be for sale", false); | 4211 | m_dialogModule.SendAlertToUser(remoteClient, "This item doesn't appear to be for sale"); |
4213 | return false; | 4212 | return false; |
4214 | } | 4213 | } |
4215 | 4214 | ||
@@ -4250,7 +4249,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
4250 | 4249 | ||
4251 | if ((perms & (uint)PermissionMask.Transfer) == 0) | 4250 | if ((perms & (uint)PermissionMask.Transfer) == 0) |
4252 | { | 4251 | { |
4253 | remoteClient.SendAgentAlertMessage("This item doesn't appear to be for sale", false); | 4252 | m_dialogModule.SendAlertToUser(remoteClient, "This item doesn't appear to be for sale"); |
4254 | return false; | 4253 | return false; |
4255 | } | 4254 | } |
4256 | 4255 | ||
@@ -4296,7 +4295,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
4296 | } | 4295 | } |
4297 | else | 4296 | else |
4298 | { | 4297 | { |
4299 | remoteClient.SendAgentAlertMessage("Cannot buy now. Your inventory is unavailable", false); | 4298 | m_dialogModule.SendAlertToUser(remoteClient, "Cannot buy now. Your inventory is unavailable"); |
4300 | return false; | 4299 | return false; |
4301 | } | 4300 | } |
4302 | break; | 4301 | break; |
@@ -4319,7 +4318,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
4319 | 4318 | ||
4320 | if (!okToSell) | 4319 | if (!okToSell) |
4321 | { | 4320 | { |
4322 | remoteClient.SendAgentAlertMessage("This item's inventory doesn't appear to be for sale", false); | 4321 | m_dialogModule.SendAlertToUser( |
4322 | remoteClient, "This item's inventory doesn't appear to be for sale"); | ||
4323 | return false; | 4323 | return false; |
4324 | } | 4324 | } |
4325 | 4325 | ||