All pastes #988595 Raw Edit

Someone

public text v1 · immutable
#988595 ·published 2008-04-17 19:01 UTC
rendered paste body
void 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;
}