From cf0a14bec94322656f57890d49fead85ed31730e Mon Sep 17 00:00:00 2001
From: Adam Frisby
Date: Sat, 8 Nov 2008 17:20:54 +0000
Subject: * 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.*
---
OpenSim/Framework/AssetRequestToClient.cs | 3 --
OpenSim/Framework/AvatarAppearance.cs | 4 --
OpenSim/Framework/ChildAgentDataUpdate.cs | 1 -
OpenSim/Framework/Client/IClientIM.cs | 45 ++++++++++++++++++++++
OpenSim/Framework/ClientManager.cs | 2 +-
OpenSim/Framework/ColliderData.cs | 3 +-
OpenSim/Framework/ConfigSettings.cs | 4 --
OpenSim/Framework/ConfigurationMember.cs | 2 +-
OpenSim/Framework/EstateBan.cs | 3 --
OpenSim/Framework/EstateSettings.cs | 4 +-
OpenSim/Framework/EventData.cs | 1 -
OpenSim/Framework/FriendRegionInfo.cs | 2 -
OpenSim/Framework/GroupData.cs | 4 --
OpenSim/Framework/IClientAPI.cs | 22 +++++------
OpenSim/Framework/LandStatReportItem.cs | 4 --
OpenSim/Framework/MapItemReplyStruct.cs | 1 -
OpenSim/Framework/ParcelMediaCommandEnum.cs | 4 --
OpenSim/Framework/PluginLoader.cs | 4 +-
OpenSim/Framework/PrimitiveBaseShape.cs | 2 +-
OpenSim/Framework/ProxyCodec.cs | 3 --
OpenSim/Framework/RegionInfo.cs | 3 +-
OpenSim/Framework/RegionSettings.cs | 2 -
OpenSim/Framework/SurfaceTouchEventArgs.cs | 3 --
OpenSim/Framework/TaskInventoryDictionary.cs | 2 -
OpenSim/Framework/TaskInventoryItem.cs | 6 ---
OpenSim/Framework/Util.cs | 2 +-
.../Region/ClientStack/LindenUDP/LLClientView.cs | 31 ++++++++-------
.../Currency/SampleMoney/SampleMoneyModule.cs | 10 ++---
.../Avatar/InstantMessage/InstantMessageModule.cs | 18 ++++-----
.../Inventory/Transfer/InventoryTransferModule.cs | 6 +--
.../Environment/Modules/World/NPC/NPCAvatar.cs | 11 +++---
OpenSim/Region/Environment/Scenes/Scene.cs | 4 +-
.../Region/Examples/SimpleModule/MyNpcCharacter.cs | 11 +++---
33 files changed, 111 insertions(+), 116 deletions(-)
create mode 100644 OpenSim/Framework/Client/IClientIM.cs
(limited to 'OpenSim')
diff --git a/OpenSim/Framework/AssetRequestToClient.cs b/OpenSim/Framework/AssetRequestToClient.cs
index 2bf3d3e..6e935e8 100644
--- a/OpenSim/Framework/AssetRequestToClient.cs
+++ b/OpenSim/Framework/AssetRequestToClient.cs
@@ -25,9 +25,6 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-using System;
-using System.Collections.Generic;
-using System.Text;
using OpenMetaverse;
namespace OpenSim.Framework
diff --git a/OpenSim/Framework/AvatarAppearance.cs b/OpenSim/Framework/AvatarAppearance.cs
index e1d0bbe..74a9f92 100644
--- a/OpenSim/Framework/AvatarAppearance.cs
+++ b/OpenSim/Framework/AvatarAppearance.cs
@@ -28,13 +28,9 @@
using System;
using System.Collections;
using System.Collections.Generic;
-using System.Reflection;
using System.Runtime.Serialization;
using System.Security.Permissions;
-using log4net;
using OpenMetaverse;
-using OpenMetaverse.Packets;
-using OpenSim.Framework;
namespace OpenSim.Framework
{
diff --git a/OpenSim/Framework/ChildAgentDataUpdate.cs b/OpenSim/Framework/ChildAgentDataUpdate.cs
index 0515aeb..260d6cf 100644
--- a/OpenSim/Framework/ChildAgentDataUpdate.cs
+++ b/OpenSim/Framework/ChildAgentDataUpdate.cs
@@ -26,7 +26,6 @@
*/
using System;
-using OpenSim.Framework;
namespace OpenSim.Framework
{
diff --git a/OpenSim/Framework/Client/IClientIM.cs b/OpenSim/Framework/Client/IClientIM.cs
new file mode 100644
index 0000000..a3498c2
--- /dev/null
+++ b/OpenSim/Framework/Client/IClientIM.cs
@@ -0,0 +1,45 @@
+using System;
+using OpenMetaverse;
+
+namespace OpenSim.Framework.Client
+{
+ public class ClientInstantMessageArgs : EventArgs
+ {
+ public IClientCore client;
+ public string message;
+ public DateTime time;
+ public ClientInstantMessageSender sender;
+ }
+
+ public class ClientInstantMessageSender
+ {
+ public UUID ID;
+ public bool online;
+ public string name;
+ public Vector3 position;
+ public UUID regionID;
+ }
+
+ public delegate void ClientInstantMessage(Object sender, ClientInstantMessageArgs e);
+
+ public class ClientInstantMessageParms
+ {
+ public ClientInstantMessageSender senderInfo;
+ }
+
+ // Porting Guide from old IM
+ // SendIM(...)
+ // Loses FromAgentSession - this should be added by implementers manually.
+ //
+
+ public interface IClientIM
+ {
+ void SendInstantMessage(UUID fromAgent, string message, UUID toAgent,
+ string fromName, byte dialog, uint timeStamp);
+
+ void SendInstantMessage(UUID fromAgent, string message, UUID toAgent,
+ string fromName, byte dialog, uint timeStamp,
+ bool fromGroup, byte[] binaryBucket);
+ event ImprovedInstantMessage OnInstantMessage;
+ }
+}
diff --git a/OpenSim/Framework/ClientManager.cs b/OpenSim/Framework/ClientManager.cs
index 3f83f5c..1bb9836 100644
--- a/OpenSim/Framework/ClientManager.cs
+++ b/OpenSim/Framework/ClientManager.cs
@@ -28,9 +28,9 @@
using System;
using System.Collections.Generic;
using System.Reflection;
+using log4net;
using OpenMetaverse;
using OpenMetaverse.Packets;
-using log4net;
namespace OpenSim.Framework
{
diff --git a/OpenSim/Framework/ColliderData.cs b/OpenSim/Framework/ColliderData.cs
index 4e94d6d..51ab5a8 100644
--- a/OpenSim/Framework/ColliderData.cs
+++ b/OpenSim/Framework/ColliderData.cs
@@ -26,9 +26,8 @@
*/
using System;
-using System.Collections;
-using OpenMetaverse;
using System.Collections.Generic;
+using OpenMetaverse;
namespace OpenSim.Framework
{
diff --git a/OpenSim/Framework/ConfigSettings.cs b/OpenSim/Framework/ConfigSettings.cs
index 1a24711..02b8465 100644
--- a/OpenSim/Framework/ConfigSettings.cs
+++ b/OpenSim/Framework/ConfigSettings.cs
@@ -25,10 +25,6 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-using System;
-using System.Collections.Generic;
-using System.Text;
-
namespace OpenSim.Framework
{
public class ConfigSettings
diff --git a/OpenSim/Framework/ConfigurationMember.cs b/OpenSim/Framework/ConfigurationMember.cs
index 2a2b9b2..bbfe28d 100644
--- a/OpenSim/Framework/ConfigurationMember.cs
+++ b/OpenSim/Framework/ConfigurationMember.cs
@@ -31,8 +31,8 @@ using System.Globalization;
using System.Net;
using System.Reflection;
using System.Xml;
-using OpenMetaverse;
using log4net;
+using OpenMetaverse;
using OpenSim.Framework.Console;
namespace OpenSim.Framework
diff --git a/OpenSim/Framework/EstateBan.cs b/OpenSim/Framework/EstateBan.cs
index 4d31514..5c3aa42 100644
--- a/OpenSim/Framework/EstateBan.cs
+++ b/OpenSim/Framework/EstateBan.cs
@@ -26,9 +26,6 @@
*/
using OpenMetaverse;
-using System;
-using System.Collections.Generic;
-using System.Text;
namespace OpenSim.Framework
{
diff --git a/OpenSim/Framework/EstateSettings.cs b/OpenSim/Framework/EstateSettings.cs
index f8595e0..81f85cd 100644
--- a/OpenSim/Framework/EstateSettings.cs
+++ b/OpenSim/Framework/EstateSettings.cs
@@ -26,11 +26,9 @@
*/
using System;
-using System.IO;
-using System.Reflection;
using System.Collections.Generic;
+using System.IO;
using OpenMetaverse;
-using log4net;
namespace OpenSim.Framework
{
diff --git a/OpenSim/Framework/EventData.cs b/OpenSim/Framework/EventData.cs
index 70554d0..a7d3260 100644
--- a/OpenSim/Framework/EventData.cs
+++ b/OpenSim/Framework/EventData.cs
@@ -25,7 +25,6 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-using System;
using OpenMetaverse;
namespace OpenSim.Framework
diff --git a/OpenSim/Framework/FriendRegionInfo.cs b/OpenSim/Framework/FriendRegionInfo.cs
index 04e00e8..ee308ea 100644
--- a/OpenSim/Framework/FriendRegionInfo.cs
+++ b/OpenSim/Framework/FriendRegionInfo.cs
@@ -25,8 +25,6 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-using System;
-
namespace OpenSim.Framework
{
public class FriendRegionInfo
diff --git a/OpenSim/Framework/GroupData.cs b/OpenSim/Framework/GroupData.cs
index 3b980e7..8b8c6e0 100644
--- a/OpenSim/Framework/GroupData.cs
+++ b/OpenSim/Framework/GroupData.cs
@@ -26,11 +26,7 @@
*/
-using System;
-using System.Collections;
using OpenMetaverse;
-using System.Collections.Generic;
-using System.Text;
namespace OpenSim.Framework
{
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index 4759761..0e88dbd 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -638,7 +638,6 @@ namespace OpenSim.Framework
///
/// Tell this client what items it should be wearing now
///
- ///
void SendWearables(AvatarWearable[] wearables, int serial);
///
@@ -660,15 +659,18 @@ namespace OpenSim.Framework
void SendAnimations(UUID[] animID, int[] seqs, UUID sourceAgentId);
void SendRegionHandshake(RegionInfo regionInfo, RegionHandshakeArgs args);
- void SendChatMessage(string message, byte type, Vector3 fromPos, string fromName, UUID fromAgentID, byte source, byte audible);
- void SendChatMessage(byte[] message, byte type, Vector3 fromPos, string fromName, UUID fromAgentID, byte source, byte audible);
- void SendInstantMessage(UUID fromAgent, UUID fromAgentSession, string message, UUID toAgent,
- UUID imSessionID, string fromName, byte dialog, uint timeStamp);
+ void SendChatMessage(string message, byte type, Vector3 fromPos, string fromName, UUID fromAgentID, byte source,
+ byte audible);
- void SendInstantMessage(UUID fromAgent, UUID fromAgentSession, string message, UUID toAgent,
- UUID imSessionID, string fromName, byte dialog, uint timeStamp,
- bool fromGroup, byte[] binaryBucket);
+ void SendChatMessage(byte[] message, byte type, Vector3 fromPos, string fromName, UUID fromAgentID, byte source,
+ byte audible);
+
+ void SendInstantMessage(UUID fromAgent, string message, UUID toAgent, string fromName, byte dialog,
+ uint timeStamp);
+
+ void SendInstantMessage(UUID fromAgent, string message, UUID toAgent, string fromName, byte dialog,
+ uint timeStamp, bool fromGroup, byte[] binaryBucket);
void SendGenericMessage(string method, List message);
@@ -833,7 +835,6 @@ namespace OpenSim.Framework
///
/// Tell the client that the requested texture cannot be found
///
- ///
void SendImageNotFound(UUID imageid);
void SendShutdownConnectionNotice();
@@ -880,7 +881,6 @@ namespace OpenSim.Framework
///
/// Set the debug level at which packet output should be printed to console.
///
- ///
void SetDebugPacketLevel(int newDebug);
void InPacket(object NewPack);
@@ -892,7 +892,7 @@ namespace OpenSim.Framework
event Action OnLogout;
event Action OnConnectionClosed;
- void SendBlueBoxMessage(UUID FromAvatarID, UUID fromSessionID, String FromAvatarName, String Message);
+ void SendBlueBoxMessage(UUID FromAvatarID, String FromAvatarName, String Message);
void SendLogoutPacket();
ClientInfo GetClientInfo();
diff --git a/OpenSim/Framework/LandStatReportItem.cs b/OpenSim/Framework/LandStatReportItem.cs
index b3ad02a..e93dda9 100644
--- a/OpenSim/Framework/LandStatReportItem.cs
+++ b/OpenSim/Framework/LandStatReportItem.cs
@@ -26,12 +26,8 @@
*/
-using System;
-using System.Collections.Generic;
-using System.Text;
using OpenMetaverse;
-
namespace OpenSim.Framework
{
public class LandStatReportItem
diff --git a/OpenSim/Framework/MapItemReplyStruct.cs b/OpenSim/Framework/MapItemReplyStruct.cs
index f088085..3b3107b 100644
--- a/OpenSim/Framework/MapItemReplyStruct.cs
+++ b/OpenSim/Framework/MapItemReplyStruct.cs
@@ -25,7 +25,6 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-using System;
using OpenMetaverse;
namespace OpenSim.Framework
diff --git a/OpenSim/Framework/ParcelMediaCommandEnum.cs b/OpenSim/Framework/ParcelMediaCommandEnum.cs
index 644c6ee..93c41ec 100644
--- a/OpenSim/Framework/ParcelMediaCommandEnum.cs
+++ b/OpenSim/Framework/ParcelMediaCommandEnum.cs
@@ -25,10 +25,6 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-using System;
-using System.Collections.Generic;
-using System.Text;
-
namespace OpenSim.Framework
{
public enum ParcelMediaCommandEnum
diff --git a/OpenSim/Framework/PluginLoader.cs b/OpenSim/Framework/PluginLoader.cs
index a39f787..497d9f5 100644
--- a/OpenSim/Framework/PluginLoader.cs
+++ b/OpenSim/Framework/PluginLoader.cs
@@ -26,14 +26,12 @@
*/
using System;
-using System.IO;
-using System.Xml;
using System.Collections.Generic;
+using System.IO;
using System.Reflection;
using log4net;
using Mono.Addins;
-
namespace OpenSim.Framework
{
///
diff --git a/OpenSim/Framework/PrimitiveBaseShape.cs b/OpenSim/Framework/PrimitiveBaseShape.cs
index 49bc953..cd50e9e 100644
--- a/OpenSim/Framework/PrimitiveBaseShape.cs
+++ b/OpenSim/Framework/PrimitiveBaseShape.cs
@@ -28,8 +28,8 @@
using System;
using System.Reflection;
using System.Xml.Serialization;
-using OpenMetaverse;
using log4net;
+using OpenMetaverse;
namespace OpenSim.Framework
{
diff --git a/OpenSim/Framework/ProxyCodec.cs b/OpenSim/Framework/ProxyCodec.cs
index e1aeeda..df4be64 100644
--- a/OpenSim/Framework/ProxyCodec.cs
+++ b/OpenSim/Framework/ProxyCodec.cs
@@ -26,10 +26,7 @@
*/
using System;
-using System.Collections;
using System.Net;
-using OpenMetaverse;
-using OpenMetaverse.Packets;
namespace OpenSim.Framework
{
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs
index 34a69d7..cac68d9 100644
--- a/OpenSim/Framework/RegionInfo.cs
+++ b/OpenSim/Framework/RegionInfo.cs
@@ -26,12 +26,11 @@
*/
using System;
-using System.Collections.Generic;
using System.Net;
using System.Net.Sockets;
using System.Xml;
-using OpenMetaverse;
using Nini.Config;
+using OpenMetaverse;
namespace OpenSim.Framework
{
diff --git a/OpenSim/Framework/RegionSettings.cs b/OpenSim/Framework/RegionSettings.cs
index ba04513..e1e747a 100644
--- a/OpenSim/Framework/RegionSettings.cs
+++ b/OpenSim/Framework/RegionSettings.cs
@@ -27,9 +27,7 @@
using System;
using System.IO;
-using System.Reflection;
using OpenMetaverse;
-using log4net;
namespace OpenSim.Framework
{
diff --git a/OpenSim/Framework/SurfaceTouchEventArgs.cs b/OpenSim/Framework/SurfaceTouchEventArgs.cs
index ae85197..5d4802a 100644
--- a/OpenSim/Framework/SurfaceTouchEventArgs.cs
+++ b/OpenSim/Framework/SurfaceTouchEventArgs.cs
@@ -25,9 +25,6 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-using System;
-using System.Collections.Generic;
-using System.Text;
using OpenMetaverse;
namespace OpenSim.Framework
diff --git a/OpenSim/Framework/TaskInventoryDictionary.cs b/OpenSim/Framework/TaskInventoryDictionary.cs
index 16ea042..4a1aa17 100644
--- a/OpenSim/Framework/TaskInventoryDictionary.cs
+++ b/OpenSim/Framework/TaskInventoryDictionary.cs
@@ -27,12 +27,10 @@
using System;
using System.Collections.Generic;
-using System.Reflection;
using System.Xml;
using System.Xml.Schema;
using System.Xml.Serialization;
using OpenMetaverse;
-using log4net;
namespace OpenSim.Framework
{
diff --git a/OpenSim/Framework/TaskInventoryItem.cs b/OpenSim/Framework/TaskInventoryItem.cs
index fdb1137..1443e74 100644
--- a/OpenSim/Framework/TaskInventoryItem.cs
+++ b/OpenSim/Framework/TaskInventoryItem.cs
@@ -26,13 +26,7 @@
*/
using System;
-using System.Collections.Generic;
-using System.Reflection;
-using System.Xml;
-using System.Xml.Schema;
-using System.Xml.Serialization;
using OpenMetaverse;
-using log4net;
namespace OpenSim.Framework
{
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index 122f104..7caa414 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -39,10 +39,10 @@ using System.Security.Cryptography;
using System.Text;
using System.Text.RegularExpressions;
using System.Xml;
-using OpenMetaverse;
using log4net;
using Nini.Config;
using Nwc.XmlRpc;
+using OpenMetaverse;
namespace OpenSim.Framework
{
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index d63933d..2a0f97d 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -52,7 +52,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// Handles new client connections
/// Constructor takes a single Packet and authenticates everything
///
- public class LLClientView : IClientAPI, IClientCore
+ public class LLClientView : IClientAPI, IClientCore, IClientIM
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@@ -394,6 +394,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
AuthenticateResponse sessionInfo, UUID agentId, UUID sessionId, uint circuitCode, EndPoint proxyEP,
ClientStackUserSettings userSettings)
{
+ // Should be called first?
+ RegisterInterfaces();
+
m_GroupsModule = scene.RequestModuleInterface();
m_moneyBalance = 1000;
@@ -1076,19 +1079,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP
///
/// Send an instant message to this client
///
- public void SendInstantMessage(UUID fromAgent, UUID fromAgentSession, string message, UUID toAgent,
- UUID imSessionID, string fromName, byte dialog, uint timeStamp)
+ public void SendInstantMessage(UUID fromAgent, string message, UUID toAgent, string fromName, byte dialog, uint timeStamp)
{
- SendInstantMessage(
- fromAgent, fromAgentSession, message, toAgent,
- imSessionID, fromName, dialog, timeStamp, false, new byte[0]);
+ SendInstantMessage(fromAgent, message, toAgent, fromName, dialog, timeStamp, false, new byte[0]);
}
///
/// Send an instant message to this client
///
- public void SendInstantMessage(UUID fromAgent, UUID fromAgentSession, string message, UUID toAgent,
- UUID imSessionID, string fromName, byte dialog, uint timeStamp,
+ public void SendInstantMessage(UUID fromAgent, string message, UUID toAgent,
+ string fromName, byte dialog, uint timeStamp,
bool fromGroup, byte[] binaryBucket)
{
if (((Scene)(m_scene)).ExternalChecks.ExternalChecksCanInstantMessage(fromAgent, toAgent))
@@ -1097,15 +1097,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
= (ImprovedInstantMessagePacket)PacketPool.Instance.GetPacket(PacketType.ImprovedInstantMessage);
msg.AgentData.AgentID = fromAgent;
- msg.AgentData.SessionID = fromAgentSession;
+ msg.AgentData.SessionID = UUID.Zero;
msg.MessageBlock.FromAgentName = Utils.StringToBytes(fromName);
msg.MessageBlock.Dialog = dialog;
msg.MessageBlock.FromGroup = fromGroup;
- msg.MessageBlock.ID = imSessionID;
+ msg.MessageBlock.ID = fromAgent ^ toAgent;
msg.MessageBlock.Offline = 0;
msg.MessageBlock.ParentEstateID = 0;
msg.MessageBlock.Position = new Vector3();
- msg.MessageBlock.RegionID = UUID.Random();
+ msg.MessageBlock.RegionID = UUID.Zero;
msg.MessageBlock.Timestamp = timeStamp;
msg.MessageBlock.ToAgentID = toAgent;
msg.MessageBlock.Message = Utils.StringToBytes(message);
@@ -6919,10 +6919,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
///
///
///
- public void SendBlueBoxMessage(UUID FromAvatarID, UUID fromSessionID, String FromAvatarName, String Message)
+ public void SendBlueBoxMessage(UUID FromAvatarID, String FromAvatarName, String Message)
{
if (!ChildAgentStatus())
- SendInstantMessage(FromAvatarID, fromSessionID, Message, AgentId, SessionId, FromAvatarName, 1, (uint)Util.UnixTimeSinceEpoch());
+ SendInstantMessage(FromAvatarID, Message, AgentId, FromAvatarName, 1, (uint)Util.UnixTimeSinceEpoch());
//SendInstantMessage(FromAvatarID, fromSessionID, Message, AgentId, SessionId, FromAvatarName, (byte)21,(uint) Util.UnixTimeSinceEpoch());
}
@@ -7675,6 +7675,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
}
+ protected virtual void RegisterInterfaces()
+ {
+ RegisterInterface(this);
+ }
+
public bool TryGet(out T iface)
{
if (m_clientInterfaces.ContainsKey(typeof(T)))
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
Hashtable retparam = new Hashtable();
Hashtable requestData = (Hashtable) request.Params[0];
- UUID agentId = UUID.Zero;
- UUID soundId = UUID.Zero;
- UUID regionId = UUID.Zero;
+ UUID agentId;
+ UUID soundId;
+ UUID regionId;
UUID.TryParse((string) requestData["agentId"], out agentId);
UUID.TryParse((string) requestData["soundId"], out soundId);
@@ -832,7 +832,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
Scene userScene = GetSceneByUUID(regionId);
if (userScene != null)
{
- if (userScene.RegionInfo.regionSecret.ToString() == secret)
+ if (userScene.RegionInfo.regionSecret == secret)
{
IClientAPI client = LocateClientObject(agentId);
@@ -842,7 +842,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
if (soundId != UUID.Zero)
client.SendPlayAttachedSound(soundId, UUID.Zero, UUID.Zero, 1.0f, 0);
- client.SendBlueBoxMessage(UUID.Zero, UUID.Zero, "", text);
+ client.SendBlueBoxMessage(UUID.Zero, "", text);
retparam.Add("success", true);
}
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
ScenePresence user = (ScenePresence) scene.Entities[toAgentID];
if (!user.IsChildAgent)
{
- user.ControllingClient.SendInstantMessage(fromAgentID, fromAgentSession, message,
- toAgentID, imSessionID, fromAgentName, dialog,
+ user.ControllingClient.SendInstantMessage(fromAgentID, message,
+ toAgentID, fromAgentName, dialog,
timestamp, fromGroup, binaryBucket);
// Message sent
return;
@@ -172,8 +172,8 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
// Local message
ScenePresence user = (ScenePresence) scene.Entities[toAgentID];
- user.ControllingClient.SendInstantMessage(fromAgentID, fromAgentSession, message,
- toAgentID, imSessionID, fromAgentName, dialog,
+ user.ControllingClient.SendInstantMessage(fromAgentID, message,
+ toAgentID, fromAgentName, dialog,
timestamp, fromGroup, binaryBucket);
// Message sent
return;
@@ -199,7 +199,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
if (client != null)
{
if (dialog != (byte)InstantMessageDialog.StartTyping && dialog != (byte)InstantMessageDialog.StopTyping && dialog != (byte)InstantMessageDialog.SessionDrop)
- 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");
+ 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");
}
}
}
@@ -551,7 +551,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
if (client != null)
{
if (dialog != (byte)InstantMessageDialog.StartTyping && dialog != (byte)InstantMessageDialog.StopTyping && dialog != (byte)InstantMessageDialog.SessionDrop)
- client.SendInstantMessage(toAgentID, fromAgentSession, "Unable to send instant message", fromAgentID, imSessionID, "System", (byte)InstantMessageDialog.BusyAutoResponse, (uint)Util.UnixTimeSinceEpoch());// SendAlertMessage("Unable to send instant message");
+ client.SendInstantMessage(toAgentID, "Unable to send instant message", fromAgentID, "System", (byte)InstantMessageDialog.BusyAutoResponse, (uint)Util.UnixTimeSinceEpoch());
}
return;
}
@@ -562,7 +562,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
if (client != null)
{
if (dialog != (byte)InstantMessageDialog.StartTyping && dialog != (byte)InstantMessageDialog.StopTyping && dialog != (byte)InstantMessageDialog.SessionDrop)
- client.SendInstantMessage(toAgentID, fromAgentSession, "Unable to send instant message", fromAgentID, imSessionID, "System", (byte)InstantMessageDialog.BusyAutoResponse, (uint)Util.UnixTimeSinceEpoch());// SendAlertMessage("Unable to send instant message");
+ client.SendInstantMessage(toAgentID, "Unable to send instant message", fromAgentID, "System", (byte)InstantMessageDialog.BusyAutoResponse, (uint)Util.UnixTimeSinceEpoch());
}
return;
}
@@ -635,7 +635,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
if (client != null)
{
if (dialog != (byte)InstantMessageDialog.StartTyping && dialog != (byte)InstantMessageDialog.StopTyping && dialog != (byte)InstantMessageDialog.SessionDrop)
- 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");
+ client.SendInstantMessage(toAgentID, "Unable to send instant message: Agent Offline", fromAgentID, "System", (byte)InstantMessageDialog.BusyAutoResponse, (uint)Util.UnixTimeSinceEpoch());// SendAlertMessage("Unable to send instant message");
}
}
}
@@ -643,7 +643,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
{
// send Agent doesn't exist message
if (client != null)
- 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");
+ 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");
}
}
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
m_pendingOffers[imSessionID] = itemId;
user.ControllingClient.SendInstantMessage(
- fromAgentID, fromAgentSession, message, toAgentID, imSessionID, fromAgentName,
+ fromAgentID, message, toAgentID, fromAgentName,
dialog, timestamp, false, binaryBucket);
return;
@@ -167,7 +167,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Inventory.Transfer
if (!user.IsChildAgent)
{
user.ControllingClient.SendInstantMessage(
- fromAgentID, fromAgentSession, message, toAgentID, imSessionID, fromAgentName,
+ fromAgentID, message, toAgentID, fromAgentName,
dialog, timestamp, false, binaryBucket);
if (m_pendingOffers.ContainsKey(imSessionID))
@@ -213,7 +213,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Inventory.Transfer
if (!user.IsChildAgent)
{
user.ControllingClient.SendInstantMessage(
- fromAgentID, fromAgentSession, message, toAgentID, imSessionID, fromAgentName,
+ fromAgentID, message, toAgentID, fromAgentName,
dialog, timestamp, false, binaryBucket);
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
{
}
- public virtual void SendInstantMessage(UUID fromAgent, UUID fromAgentSession, string message, UUID toAgent,
- UUID imSessionID, string fromName, byte dialog, uint timeStamp)
+ public void SendInstantMessage(UUID fromAgent, string message, UUID toAgent, string fromName, byte dialog, uint timeStamp)
{
+
}
- public virtual void SendInstantMessage(UUID fromAgent, UUID fromAgentSession, string message, UUID toAgent,
- UUID imSessionID, string fromName, byte dialog, uint timeStamp,
- bool fromGroup, byte[] binaryBucket)
+ public void SendInstantMessage(UUID fromAgent, string message, UUID toAgent, string fromName, byte dialog, uint timeStamp, bool fromGroup, byte[] binaryBucket)
{
+
}
public void SendGenericMessage(string method, List message)
@@ -793,7 +792,7 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
set { m_circuitCode = value; }
}
- public void SendBlueBoxMessage(UUID FromAvatarID, UUID fromSessionID, String FromAvatarName, String Message)
+ public void SendBlueBoxMessage(UUID FromAvatarID, String FromAvatarName, String Message)
{
}
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
foreach (ScenePresence presence in presenceList)
{
if (!presence.IsChildAgent)
- presence.ControllingClient.SendBlueBoxMessage(FromAvatarID, fromSessionID, FromAvatarName, Message);
+ presence.ControllingClient.SendBlueBoxMessage(FromAvatarID, FromAvatarName, Message);
}
}
@@ -3441,7 +3441,7 @@ namespace OpenSim.Region.Environment.Scenes
ClientManager.ForEachClient(delegate(IClientAPI controller)
{
- controller.SendBlueBoxMessage(FromAvatarID, fromSessionID, FromAvatarName, Message);
+ controller.SendBlueBoxMessage(FromAvatarID, FromAvatarName, Message);
}
);
}
diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
index 0131109..85d51e6 100644
--- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
+++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
@@ -383,15 +383,14 @@ namespace OpenSim.Region.Examples.SimpleModule
{
}
- public virtual void SendInstantMessage(UUID fromAgent, UUID fromAgentSession, string message, UUID toAgent,
- UUID imSessionID, string fromName, byte dialog, uint timeStamp)
+ public void SendInstantMessage(UUID fromAgent, string message, UUID toAgent, string fromName, byte dialog, uint timeStamp)
{
+
}
- public virtual void SendInstantMessage(UUID fromAgent, UUID fromAgentSession, string message, UUID toAgent,
- UUID imSessionID, string fromName, byte dialog, uint timeStamp,
- bool fromGroup, byte[] binaryBucket)
+ public void SendInstantMessage(UUID fromAgent, string message, UUID toAgent, string fromName, byte dialog, uint timeStamp, bool fromGroup, byte[] binaryBucket)
{
+
}
public void SendGenericMessage(string method, List message)
@@ -780,7 +779,7 @@ namespace OpenSim.Region.Examples.SimpleModule
set { m_circuitCode = value; }
}
- public void SendBlueBoxMessage(UUID FromAvatarID, UUID fromSessionID, String FromAvatarName, String Message)
+ public void SendBlueBoxMessage(UUID FromAvatarID, String FromAvatarName, String Message)
{
}
--
cgit v1.1