diff options
author | Adam Frisby | 2008-11-08 17:20:54 +0000 |
---|---|---|
committer | Adam Frisby | 2008-11-08 17:20:54 +0000 |
commit | cf0a14bec94322656f57890d49fead85ed31730e (patch) | |
tree | 861596444093bb68567cda8583cd0e94a618c120 /OpenSim/Region/Environment | |
parent | Fix broken build since r7179 (diff) | |
download | opensim-SC_OLD-cf0a14bec94322656f57890d49fead85ed31730e.zip opensim-SC_OLD-cf0a14bec94322656f57890d49fead85ed31730e.tar.gz opensim-SC_OLD-cf0a14bec94322656f57890d49fead85ed31730e.tar.bz2 opensim-SC_OLD-cf0a14bec94322656f57890d49fead85ed31730e.tar.xz |
* Added IClientIM to IClientCore interfaces
* Changed SendInstantMessage, dropped fromAgentSession and imSessionID as security precaution, see http://opensimulator.org/wiki/OpenSim_0.6_IClientAPI#Porting_Guide for details on porting.
* Removed unused usings from Framework.*
Diffstat (limited to 'OpenSim/Region/Environment')
5 files changed, 24 insertions, 25 deletions
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs index fc1decf..c8050da 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs | |||
@@ -819,9 +819,9 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney | |||
819 | Hashtable retparam = new Hashtable(); | 819 | Hashtable retparam = new Hashtable(); |
820 | Hashtable requestData = (Hashtable) request.Params[0]; | 820 | Hashtable requestData = (Hashtable) request.Params[0]; |
821 | 821 | ||
822 | UUID agentId = UUID.Zero; | 822 | UUID agentId; |
823 | UUID soundId = UUID.Zero; | 823 | UUID soundId; |
824 | UUID regionId = UUID.Zero; | 824 | UUID regionId; |
825 | 825 | ||
826 | UUID.TryParse((string) requestData["agentId"], out agentId); | 826 | UUID.TryParse((string) requestData["agentId"], out agentId); |
827 | UUID.TryParse((string) requestData["soundId"], out soundId); | 827 | UUID.TryParse((string) requestData["soundId"], out soundId); |
@@ -832,7 +832,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney | |||
832 | Scene userScene = GetSceneByUUID(regionId); | 832 | Scene userScene = GetSceneByUUID(regionId); |
833 | if (userScene != null) | 833 | if (userScene != null) |
834 | { | 834 | { |
835 | if (userScene.RegionInfo.regionSecret.ToString() == secret) | 835 | if (userScene.RegionInfo.regionSecret == secret) |
836 | { | 836 | { |
837 | 837 | ||
838 | IClientAPI client = LocateClientObject(agentId); | 838 | IClientAPI client = LocateClientObject(agentId); |
@@ -842,7 +842,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney | |||
842 | if (soundId != UUID.Zero) | 842 | if (soundId != UUID.Zero) |
843 | client.SendPlayAttachedSound(soundId, UUID.Zero, UUID.Zero, 1.0f, 0); | 843 | client.SendPlayAttachedSound(soundId, UUID.Zero, UUID.Zero, 1.0f, 0); |
844 | 844 | ||
845 | client.SendBlueBoxMessage(UUID.Zero, UUID.Zero, "", text); | 845 | client.SendBlueBoxMessage(UUID.Zero, "", text); |
846 | 846 | ||
847 | retparam.Add("success", true); | 847 | retparam.Add("success", true); |
848 | } | 848 | } |
diff --git a/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/InstantMessageModule.cs b/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/InstantMessageModule.cs index 5597381..b8fbe2b 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/InstantMessageModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/InstantMessageModule.cs | |||
@@ -155,8 +155,8 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage | |||
155 | ScenePresence user = (ScenePresence) scene.Entities[toAgentID]; | 155 | ScenePresence user = (ScenePresence) scene.Entities[toAgentID]; |
156 | if (!user.IsChildAgent) | 156 | if (!user.IsChildAgent) |
157 | { | 157 | { |
158 | user.ControllingClient.SendInstantMessage(fromAgentID, fromAgentSession, message, | 158 | user.ControllingClient.SendInstantMessage(fromAgentID, message, |
159 | toAgentID, imSessionID, fromAgentName, dialog, | 159 | toAgentID, fromAgentName, dialog, |
160 | timestamp, fromGroup, binaryBucket); | 160 | timestamp, fromGroup, binaryBucket); |
161 | // Message sent | 161 | // Message sent |
162 | return; | 162 | return; |
@@ -172,8 +172,8 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage | |||
172 | // Local message | 172 | // Local message |
173 | ScenePresence user = (ScenePresence) scene.Entities[toAgentID]; | 173 | ScenePresence user = (ScenePresence) scene.Entities[toAgentID]; |
174 | 174 | ||
175 | user.ControllingClient.SendInstantMessage(fromAgentID, fromAgentSession, message, | 175 | user.ControllingClient.SendInstantMessage(fromAgentID, message, |
176 | toAgentID, imSessionID, fromAgentName, dialog, | 176 | toAgentID, fromAgentName, dialog, |
177 | timestamp, fromGroup, binaryBucket); | 177 | timestamp, fromGroup, binaryBucket); |
178 | // Message sent | 178 | // Message sent |
179 | return; | 179 | return; |
@@ -199,7 +199,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage | |||
199 | if (client != null) | 199 | if (client != null) |
200 | { | 200 | { |
201 | if (dialog != (byte)InstantMessageDialog.StartTyping && dialog != (byte)InstantMessageDialog.StopTyping && dialog != (byte)InstantMessageDialog.SessionDrop) | 201 | if (dialog != (byte)InstantMessageDialog.StartTyping && dialog != (byte)InstantMessageDialog.StopTyping && dialog != (byte)InstantMessageDialog.SessionDrop) |
202 | client.SendInstantMessage(toAgentID, fromAgentSession, "Unable to send instant message. User is not logged in.", fromAgentID, imSessionID, "System", (byte)InstantMessageDialog.BusyAutoResponse, (uint)Util.UnixTimeSinceEpoch());// SendAlertMessage("Unable to send instant message"); | 202 | client.SendInstantMessage(toAgentID, "Unable to send instant message. User is not logged in.", fromAgentID, "System", (byte)InstantMessageDialog.BusyAutoResponse, (uint)Util.UnixTimeSinceEpoch());// SendAlertMessage("Unable to send instant message"); |
203 | } | 203 | } |
204 | } | 204 | } |
205 | } | 205 | } |
@@ -551,7 +551,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage | |||
551 | if (client != null) | 551 | if (client != null) |
552 | { | 552 | { |
553 | if (dialog != (byte)InstantMessageDialog.StartTyping && dialog != (byte)InstantMessageDialog.StopTyping && dialog != (byte)InstantMessageDialog.SessionDrop) | 553 | if (dialog != (byte)InstantMessageDialog.StartTyping && dialog != (byte)InstantMessageDialog.StopTyping && dialog != (byte)InstantMessageDialog.SessionDrop) |
554 | client.SendInstantMessage(toAgentID, fromAgentSession, "Unable to send instant message", fromAgentID, imSessionID, "System", (byte)InstantMessageDialog.BusyAutoResponse, (uint)Util.UnixTimeSinceEpoch());// SendAlertMessage("Unable to send instant message"); | 554 | client.SendInstantMessage(toAgentID, "Unable to send instant message", fromAgentID, "System", (byte)InstantMessageDialog.BusyAutoResponse, (uint)Util.UnixTimeSinceEpoch()); |
555 | } | 555 | } |
556 | return; | 556 | return; |
557 | } | 557 | } |
@@ -562,7 +562,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage | |||
562 | if (client != null) | 562 | if (client != null) |
563 | { | 563 | { |
564 | if (dialog != (byte)InstantMessageDialog.StartTyping && dialog != (byte)InstantMessageDialog.StopTyping && dialog != (byte)InstantMessageDialog.SessionDrop) | 564 | if (dialog != (byte)InstantMessageDialog.StartTyping && dialog != (byte)InstantMessageDialog.StopTyping && dialog != (byte)InstantMessageDialog.SessionDrop) |
565 | client.SendInstantMessage(toAgentID, fromAgentSession, "Unable to send instant message", fromAgentID, imSessionID, "System", (byte)InstantMessageDialog.BusyAutoResponse, (uint)Util.UnixTimeSinceEpoch());// SendAlertMessage("Unable to send instant message"); | 565 | client.SendInstantMessage(toAgentID, "Unable to send instant message", fromAgentID, "System", (byte)InstantMessageDialog.BusyAutoResponse, (uint)Util.UnixTimeSinceEpoch()); |
566 | } | 566 | } |
567 | return; | 567 | return; |
568 | } | 568 | } |
@@ -635,7 +635,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage | |||
635 | if (client != null) | 635 | if (client != null) |
636 | { | 636 | { |
637 | if (dialog != (byte)InstantMessageDialog.StartTyping && dialog != (byte)InstantMessageDialog.StopTyping && dialog != (byte)InstantMessageDialog.SessionDrop) | 637 | if (dialog != (byte)InstantMessageDialog.StartTyping && dialog != (byte)InstantMessageDialog.StopTyping && dialog != (byte)InstantMessageDialog.SessionDrop) |
638 | client.SendInstantMessage(toAgentID, fromAgentSession, "Unable to send instant message: Agent Offline", fromAgentID, imSessionID, "System", (byte)InstantMessageDialog.BusyAutoResponse, (uint)Util.UnixTimeSinceEpoch());// SendAlertMessage("Unable to send instant message"); | 638 | client.SendInstantMessage(toAgentID, "Unable to send instant message: Agent Offline", fromAgentID, "System", (byte)InstantMessageDialog.BusyAutoResponse, (uint)Util.UnixTimeSinceEpoch());// SendAlertMessage("Unable to send instant message"); |
639 | } | 639 | } |
640 | } | 640 | } |
641 | } | 641 | } |
@@ -643,7 +643,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage | |||
643 | { | 643 | { |
644 | // send Agent doesn't exist message | 644 | // send Agent doesn't exist message |
645 | if (client != null) | 645 | if (client != null) |
646 | client.SendInstantMessage(toAgentID, fromAgentSession, "Unable to send instant message: Are you sure this agent exists anymore?", fromAgentID, imSessionID, "System", (byte)InstantMessageDialog.MessageFromObject, (uint)Util.UnixTimeSinceEpoch());// SendAlertMessage("Unable to send instant message"); | 646 | client.SendInstantMessage(toAgentID, "Unable to send instant message: Are you sure this agent exists anymore?", fromAgentID, "System", (byte)InstantMessageDialog.MessageFromObject, (uint)Util.UnixTimeSinceEpoch());// SendAlertMessage("Unable to send instant message"); |
647 | } | 647 | } |
648 | 648 | ||
649 | } | 649 | } |
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Inventory/Transfer/InventoryTransferModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Inventory/Transfer/InventoryTransferModule.cs index a07fc5f..d8b203f 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/Inventory/Transfer/InventoryTransferModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/Inventory/Transfer/InventoryTransferModule.cs | |||
@@ -135,7 +135,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Inventory.Transfer | |||
135 | m_pendingOffers[imSessionID] = itemId; | 135 | m_pendingOffers[imSessionID] = itemId; |
136 | 136 | ||
137 | user.ControllingClient.SendInstantMessage( | 137 | user.ControllingClient.SendInstantMessage( |
138 | fromAgentID, fromAgentSession, message, toAgentID, imSessionID, fromAgentName, | 138 | fromAgentID, message, toAgentID, fromAgentName, |
139 | dialog, timestamp, false, binaryBucket); | 139 | dialog, timestamp, false, binaryBucket); |
140 | 140 | ||
141 | return; | 141 | return; |
@@ -167,7 +167,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Inventory.Transfer | |||
167 | if (!user.IsChildAgent) | 167 | if (!user.IsChildAgent) |
168 | { | 168 | { |
169 | user.ControllingClient.SendInstantMessage( | 169 | user.ControllingClient.SendInstantMessage( |
170 | fromAgentID, fromAgentSession, message, toAgentID, imSessionID, fromAgentName, | 170 | fromAgentID, message, toAgentID, fromAgentName, |
171 | dialog, timestamp, false, binaryBucket); | 171 | dialog, timestamp, false, binaryBucket); |
172 | 172 | ||
173 | if (m_pendingOffers.ContainsKey(imSessionID)) | 173 | if (m_pendingOffers.ContainsKey(imSessionID)) |
@@ -213,7 +213,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Inventory.Transfer | |||
213 | if (!user.IsChildAgent) | 213 | if (!user.IsChildAgent) |
214 | { | 214 | { |
215 | user.ControllingClient.SendInstantMessage( | 215 | user.ControllingClient.SendInstantMessage( |
216 | fromAgentID, fromAgentSession, message, toAgentID, imSessionID, fromAgentName, | 216 | fromAgentID, message, toAgentID, fromAgentName, |
217 | dialog, timestamp, false, binaryBucket); | 217 | dialog, timestamp, false, binaryBucket); |
218 | 218 | ||
219 | if (m_pendingOffers.ContainsKey(imSessionID)) | 219 | if (m_pendingOffers.ContainsKey(imSessionID)) |
diff --git a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs index 369b56c..155a01b 100644 --- a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs | |||
@@ -471,15 +471,14 @@ namespace OpenSim.Region.Environment.Modules.World.NPC | |||
471 | { | 471 | { |
472 | } | 472 | } |
473 | 473 | ||
474 | public virtual void SendInstantMessage(UUID fromAgent, UUID fromAgentSession, string message, UUID toAgent, | 474 | public void SendInstantMessage(UUID fromAgent, string message, UUID toAgent, string fromName, byte dialog, uint timeStamp) |
475 | UUID imSessionID, string fromName, byte dialog, uint timeStamp) | ||
476 | { | 475 | { |
476 | |||
477 | } | 477 | } |
478 | 478 | ||
479 | public virtual void SendInstantMessage(UUID fromAgent, UUID fromAgentSession, string message, UUID toAgent, | 479 | public void SendInstantMessage(UUID fromAgent, string message, UUID toAgent, string fromName, byte dialog, uint timeStamp, bool fromGroup, byte[] binaryBucket) |
480 | UUID imSessionID, string fromName, byte dialog, uint timeStamp, | ||
481 | bool fromGroup, byte[] binaryBucket) | ||
482 | { | 480 | { |
481 | |||
483 | } | 482 | } |
484 | 483 | ||
485 | public void SendGenericMessage(string method, List<string> message) | 484 | public void SendGenericMessage(string method, List<string> message) |
@@ -793,7 +792,7 @@ namespace OpenSim.Region.Environment.Modules.World.NPC | |||
793 | set { m_circuitCode = value; } | 792 | set { m_circuitCode = value; } |
794 | } | 793 | } |
795 | 794 | ||
796 | public void SendBlueBoxMessage(UUID FromAvatarID, UUID fromSessionID, String FromAvatarName, String Message) | 795 | public void SendBlueBoxMessage(UUID FromAvatarID, String FromAvatarName, String Message) |
797 | { | 796 | { |
798 | 797 | ||
799 | } | 798 | } |
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 4b8df37..70ea709 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -3424,7 +3424,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
3424 | foreach (ScenePresence presence in presenceList) | 3424 | foreach (ScenePresence presence in presenceList) |
3425 | { | 3425 | { |
3426 | if (!presence.IsChildAgent) | 3426 | if (!presence.IsChildAgent) |
3427 | presence.ControllingClient.SendBlueBoxMessage(FromAvatarID, fromSessionID, FromAvatarName, Message); | 3427 | presence.ControllingClient.SendBlueBoxMessage(FromAvatarID, FromAvatarName, Message); |
3428 | } | 3428 | } |
3429 | } | 3429 | } |
3430 | 3430 | ||
@@ -3441,7 +3441,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
3441 | 3441 | ||
3442 | ClientManager.ForEachClient(delegate(IClientAPI controller) | 3442 | ClientManager.ForEachClient(delegate(IClientAPI controller) |
3443 | { | 3443 | { |
3444 | controller.SendBlueBoxMessage(FromAvatarID, fromSessionID, FromAvatarName, Message); | 3444 | controller.SendBlueBoxMessage(FromAvatarID, FromAvatarName, Message); |
3445 | } | 3445 | } |
3446 | ); | 3446 | ); |
3447 | } | 3447 | } |