rendered paste bodyvoid Self_OnInstantMessage(InstantMessage im, Simulator simulator)
{
switch (im.Dialog)
{
case InstantMessageDialog.FriendshipOffered:
//Client.Friends.AcceptFriendship(im.FromAgentID, im.IMSessionID);
Client.Friends.DeclineFriendship(im.FromAgentID, im.IMSessionID);
break;
case InstantMessageDialog.GroupInvitation:
// Client.Self.InstantMessage(Client.Self.Name, im.FromAgentID, string.Empty, im.IMSessionID, InstantMessageDialog.GroupInvitationAccept,
InstantMessageOnline.Offline, Client.Self.SimPosition, LLUUID.Zero, new byte[0]);
Client.Self.InstantMessage(Client.Self.Name, im.FromAgentID, string.Empty, im.IMSessionID, InstantMessageDialog.GroupInvitationDecline,
InstantMessageOnline.Offline, Client.Self.SimPosition, LLUUID.Zero, new byte[0]);
case InstantMessageDialog.InventoryOffered:
string custFolder;
AssetType assettype = AssetType.Unknown;
LLUUID objectID = LLUUID.Zero;
Client.Self.InstantMessage(Client.Self.Name, im.FromAgentID, String.Empty, im.IMSessionID, InstantMessageDialog.InventoryAccepted,
InstantMessageOnline.Offline, Client.Self.SimPosition, LLUUID.Zero, new byte[0]);
if (im.BinaryBucket.Length == 17)
{
assettype = (AssetType)im.BinaryBucket[0];
objectID = new LLUUID(im.BinaryBucket, 1);
}
// Client.Self.InstantMessage(Client.Self.Name, im.FromAgentID, String.Empty, im.IMSessionID, InstantMessageDialog.InventoryDeclined,
InstantMessageOnline.Offline, Client.Self.SimPosition, LLUUID.Zero, new byte[0]); // decline inventory
break;
default:
break;
}