All pastes #988592 Raw Edit

Someone

public text v1 · immutable
#988592 ·published 2008-04-17 19:00 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);
                        }
                        Audit.Info("Customer {0} Has Given me {1} {2}", im.FromAgentName, im.Message, im.BinaryBucket);
                        Scene.ProcessCustomerSceneDrop(im.FromAgentID, custFolder, im.Message, objectID, assettype);
  //                      Client.Self.InstantMessage(Client.Self.Name, im.FromAgentID, String.Empty, im.IMSessionID, InstantMessageDialog.InventoryDeclined,
                        InstantMessageOnline.Offline, Client.Self.SimPosition, LLUUID.Zero, new byte[0]);
                    break;
                case InstantMessageDialog.InventoryAccepted:
                    Audit.Info("Your Inventory Offer was Accepted?");
                    break;
                default:
                    break;
}