A few more bots to yesterday's plumbing: change instant message method

signature
0.6.0-stable
Melanie Thielker 2008-10-25 13:53:17 +00:00
parent 5e6954dfe6
commit c49e1b8fb6
6 changed files with 12 additions and 10 deletions

View File

@ -656,7 +656,7 @@ namespace OpenSim.Framework
void SendInstantMessage(UUID fromAgent, UUID fromAgentSession, string message, UUID toAgent, void SendInstantMessage(UUID fromAgent, UUID fromAgentSession, string message, UUID toAgent,
UUID imSessionID, string fromName, byte dialog, uint timeStamp, UUID imSessionID, string fromName, byte dialog, uint timeStamp,
byte[] binaryBucket); bool fromGroup, byte[] binaryBucket);
void SendGenericMessage(string method, List<string> message); void SendGenericMessage(string method, List<string> message);

View File

@ -1106,7 +1106,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{ {
SendInstantMessage( SendInstantMessage(
fromAgent, fromAgentSession, message, toAgent, fromAgent, fromAgentSession, message, toAgent,
imSessionID, fromName, dialog, timeStamp, new byte[0]); imSessionID, fromName, dialog, timeStamp, false, new byte[0]);
} }
/// <summary> /// <summary>
@ -1116,7 +1116,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// <param name="target"></param> /// <param name="target"></param>
public void SendInstantMessage(UUID fromAgent, UUID fromAgentSession, string message, UUID toAgent, public void SendInstantMessage(UUID fromAgent, UUID fromAgentSession, string message, UUID toAgent,
UUID imSessionID, string fromName, byte dialog, uint timeStamp, UUID imSessionID, string fromName, byte dialog, uint timeStamp,
byte[] binaryBucket) bool fromGroup, byte[] binaryBucket)
{ {
if (((Scene)(this.m_scene)).ExternalChecks.ExternalChecksCanInstantMessage(fromAgent, toAgent)) if (((Scene)(this.m_scene)).ExternalChecks.ExternalChecksCanInstantMessage(fromAgent, toAgent))
{ {
@ -1127,7 +1127,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
msg.AgentData.SessionID = fromAgentSession; msg.AgentData.SessionID = fromAgentSession;
msg.MessageBlock.FromAgentName = Utils.StringToBytes(fromName); msg.MessageBlock.FromAgentName = Utils.StringToBytes(fromName);
msg.MessageBlock.Dialog = dialog; msg.MessageBlock.Dialog = dialog;
msg.MessageBlock.FromGroup = false; msg.MessageBlock.FromGroup = fromGroup;
msg.MessageBlock.ID = imSessionID; msg.MessageBlock.ID = imSessionID;
msg.MessageBlock.Offline = 0; msg.MessageBlock.Offline = 0;
msg.MessageBlock.ParentEstateID = 0; msg.MessageBlock.ParentEstateID = 0;
@ -4089,6 +4089,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
break; break;
case PacketType.ImprovedInstantMessage: case PacketType.ImprovedInstantMessage:
ImprovedInstantMessagePacket msgpack = (ImprovedInstantMessagePacket)Pack; ImprovedInstantMessagePacket msgpack = (ImprovedInstantMessagePacket)Pack;
Console.WriteLine(msgpack.ToString());
string IMfromName = Util.FieldToString(msgpack.MessageBlock.FromAgentName); string IMfromName = Util.FieldToString(msgpack.MessageBlock.FromAgentName);
string IMmessage = Utils.BytesToString(msgpack.MessageBlock.Message); string IMmessage = Utils.BytesToString(msgpack.MessageBlock.Message);
handlerInstantMessage = OnInstantMessage; handlerInstantMessage = OnInstantMessage;

View File

@ -117,7 +117,8 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
= ((dialog == 38) || (dialog == 39) || (dialog == 40) = ((dialog == 38) || (dialog == 39) || (dialog == 40)
|| dialog == (byte) InstantMessageDialog.InventoryOffered || dialog == (byte) InstantMessageDialog.InventoryOffered
|| dialog == (byte) InstantMessageDialog.InventoryAccepted || dialog == (byte) InstantMessageDialog.InventoryAccepted
|| dialog == (byte) InstantMessageDialog.InventoryDeclined); || dialog == (byte) InstantMessageDialog.InventoryDeclined
|| dialog == (byte) InstantMessageDialog.GroupNotice);
// IM dialogs need to be pre-processed and have their sessionID filled by the server // IM dialogs need to be pre-processed and have their sessionID filled by the server
// so the sim can match the transaction on the return packet. // so the sim can match the transaction on the return packet.

View File

@ -127,7 +127,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Inventory.Transfer
user.ControllingClient.SendInstantMessage( user.ControllingClient.SendInstantMessage(
fromAgentID, fromAgentSession, message, toAgentID, imSessionID, fromAgentName, fromAgentID, fromAgentSession, message, toAgentID, imSessionID, fromAgentName,
dialog, timestamp, binaryBucket); dialog, timestamp, false, binaryBucket);
return; return;
} }
@ -159,7 +159,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Inventory.Transfer
{ {
user.ControllingClient.SendInstantMessage( user.ControllingClient.SendInstantMessage(
fromAgentID, fromAgentSession, message, toAgentID, imSessionID, fromAgentName, fromAgentID, fromAgentSession, message, toAgentID, imSessionID, fromAgentName,
dialog, timestamp, binaryBucket); dialog, timestamp, false, binaryBucket);
if (m_pendingOffers.ContainsKey(imSessionID)) if (m_pendingOffers.ContainsKey(imSessionID))
{ {
@ -205,7 +205,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Inventory.Transfer
{ {
user.ControllingClient.SendInstantMessage( user.ControllingClient.SendInstantMessage(
fromAgentID, fromAgentSession, message, toAgentID, imSessionID, fromAgentName, fromAgentID, fromAgentSession, message, toAgentID, imSessionID, fromAgentName,
dialog, timestamp, binaryBucket); dialog, timestamp, false, binaryBucket);
if (m_pendingOffers.ContainsKey(imSessionID)) if (m_pendingOffers.ContainsKey(imSessionID))
{ {

View File

@ -478,7 +478,7 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
public virtual void SendInstantMessage(UUID fromAgent, UUID fromAgentSession, string message, UUID toAgent, public virtual void SendInstantMessage(UUID fromAgent, UUID fromAgentSession, string message, UUID toAgent,
UUID imSessionID, string fromName, byte dialog, uint timeStamp, UUID imSessionID, string fromName, byte dialog, uint timeStamp,
byte[] binaryBucket) bool fromGroup, byte[] binaryBucket)
{ {
} }

View File

@ -390,7 +390,7 @@ namespace OpenSim.Region.Examples.SimpleModule
public virtual void SendInstantMessage(UUID fromAgent, UUID fromAgentSession, string message, UUID toAgent, public virtual void SendInstantMessage(UUID fromAgent, UUID fromAgentSession, string message, UUID toAgent,
UUID imSessionID, string fromName, byte dialog, uint timeStamp, UUID imSessionID, string fromName, byte dialog, uint timeStamp,
byte[] binaryBucket) bool fromGroup, byte[] binaryBucket)
{ {
} }