Merge branch 'presence-refactor' of ssh://diva@opensimulator.org/var/git/opensim into presence-refactor
commit
1427572294
|
@ -756,6 +756,25 @@ namespace OpenSim.Client.MXP.ClientStack
|
|||
public event AvatarNotesUpdate OnAvatarNotesUpdate;
|
||||
public event MuteListRequest OnMuteListRequest;
|
||||
public event AvatarInterestUpdate OnAvatarInterestUpdate;
|
||||
public event FindAgentUpdate OnFindAgentEvent;
|
||||
public event TrackAgentUpdate OnTrackAgentEvent;
|
||||
public event NewUserReport OnUserReportEvent;
|
||||
public event SaveStateHandler OnSaveStateEvent;
|
||||
public event GroupAccountSummaryRequest OnGroupAccountSummaryRequest;
|
||||
public event GroupAccountDetailsRequest OnGroupAccountDetailsRequest;
|
||||
public event GroupAccountTransactionsRequest OnGroupAccountTransactionsRequest;
|
||||
public event FreezeUserUpdate OnParcelFreezeUserEvent;
|
||||
public event EjectUserUpdate OnParcelEjectUserEvent;
|
||||
public event ParcelBuyPass OnParcelBuyPass;
|
||||
public event ParcelGodMark OnParcelGodMark;
|
||||
public event GroupActiveProposalsRequest OnGroupActiveProposalsRequest;
|
||||
public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest;
|
||||
public event SimWideDeletesDelegate OnSimWideDeletes;
|
||||
public event SendPostcard OnSendPostcard;
|
||||
public event MuteListEntryUpdate OnUpdateMuteListEntryEvent;
|
||||
public event MuteListEntryRemove OnRemoveMuteListEntryEvent;
|
||||
public event GodlikeMessage onGodlikeMessageEvent;
|
||||
public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdateEvent;
|
||||
|
||||
public event PlacesQuery OnPlacesQuery;
|
||||
|
||||
|
@ -1659,5 +1678,17 @@ namespace OpenSim.Client.MXP.ClientStack
|
|||
public void SendAvatarInterestsReply(UUID avatarID, uint wantMask, string wantText, uint skillsMask, string skillsText, string languages)
|
||||
{
|
||||
}
|
||||
|
||||
public void SendGroupAccountingDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID, int amt)
|
||||
{
|
||||
}
|
||||
|
||||
public void SendGroupAccountingSummary(IClientAPI sender,UUID groupID, uint moneyAmt, int totalTier, int usedTier)
|
||||
{
|
||||
}
|
||||
|
||||
public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -374,6 +374,25 @@ namespace OpenSim.Client.Sirikata.ClientStack
|
|||
public event GrantUserFriendRights OnGrantUserRights;
|
||||
public event MuteListRequest OnMuteListRequest;
|
||||
public event PlacesQuery OnPlacesQuery;
|
||||
public event FindAgentUpdate OnFindAgentEvent;
|
||||
public event TrackAgentUpdate OnTrackAgentEvent;
|
||||
public event NewUserReport OnUserReportEvent;
|
||||
public event SaveStateHandler OnSaveStateEvent;
|
||||
public event GroupAccountSummaryRequest OnGroupAccountSummaryRequest;
|
||||
public event GroupAccountDetailsRequest OnGroupAccountDetailsRequest;
|
||||
public event GroupAccountTransactionsRequest OnGroupAccountTransactionsRequest;
|
||||
public event FreezeUserUpdate OnParcelFreezeUserEvent;
|
||||
public event EjectUserUpdate OnParcelEjectUserEvent;
|
||||
public event ParcelBuyPass OnParcelBuyPass;
|
||||
public event ParcelGodMark OnParcelGodMark;
|
||||
public event GroupActiveProposalsRequest OnGroupActiveProposalsRequest;
|
||||
public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest;
|
||||
public event SimWideDeletesDelegate OnSimWideDeletes;
|
||||
public event SendPostcard OnSendPostcard;
|
||||
public event MuteListEntryUpdate OnUpdateMuteListEntryEvent;
|
||||
public event MuteListEntryRemove OnRemoveMuteListEntryEvent;
|
||||
public event GodlikeMessage onGodlikeMessageEvent;
|
||||
public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdateEvent;
|
||||
public void SetDebugPacketLevel(int newDebug)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
|
@ -1122,6 +1141,18 @@ namespace OpenSim.Client.Sirikata.ClientStack
|
|||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public void SendGroupAccountingDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID, int amt)
|
||||
{
|
||||
}
|
||||
|
||||
public void SendGroupAccountingSummary(IClientAPI sender,UUID groupID, uint moneyAmt, int totalTier, int usedTier)
|
||||
{
|
||||
}
|
||||
|
||||
public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt)
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
@ -405,6 +405,25 @@ namespace OpenSim.Client.VWoHTTP.ClientStack
|
|||
public event MuteListRequest OnMuteListRequest = delegate { };
|
||||
public event AvatarInterestUpdate OnAvatarInterestUpdate = delegate { };
|
||||
public event PlacesQuery OnPlacesQuery = delegate { };
|
||||
public event FindAgentUpdate OnFindAgentEvent = delegate { };
|
||||
public event TrackAgentUpdate OnTrackAgentEvent = delegate { };
|
||||
public event NewUserReport OnUserReportEvent = delegate { };
|
||||
public event SaveStateHandler OnSaveStateEvent = delegate { };
|
||||
public event GroupAccountSummaryRequest OnGroupAccountSummaryRequest = delegate { };
|
||||
public event GroupAccountDetailsRequest OnGroupAccountDetailsRequest = delegate { };
|
||||
public event GroupAccountTransactionsRequest OnGroupAccountTransactionsRequest = delegate { };
|
||||
public event FreezeUserUpdate OnParcelFreezeUserEvent = delegate { };
|
||||
public event EjectUserUpdate OnParcelEjectUserEvent = delegate { };
|
||||
public event ParcelBuyPass OnParcelBuyPass = delegate { };
|
||||
public event ParcelGodMark OnParcelGodMark = delegate { };
|
||||
public event GroupActiveProposalsRequest OnGroupActiveProposalsRequest = delegate { };
|
||||
public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest = delegate { };
|
||||
public event SimWideDeletesDelegate OnSimWideDeletes = delegate { };
|
||||
public event SendPostcard OnSendPostcard = delegate { };
|
||||
public event MuteListEntryUpdate OnUpdateMuteListEntryEvent = delegate { };
|
||||
public event MuteListEntryRemove OnRemoveMuteListEntryEvent = delegate { };
|
||||
public event GodlikeMessage onGodlikeMessageEvent = delegate { };
|
||||
public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdateEvent = delegate { };
|
||||
|
||||
|
||||
|
||||
|
@ -1165,5 +1184,17 @@ namespace OpenSim.Client.VWoHTTP.ClientStack
|
|||
public void SendAvatarInterestsReply(UUID avatarID, uint wantMask, string wantText, uint skillsMask, string skillsText, string languages)
|
||||
{
|
||||
}
|
||||
|
||||
public void SendGroupAccountingDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID, int amt)
|
||||
{
|
||||
}
|
||||
|
||||
public void SendGroupAccountingSummary(IClientAPI sender,UUID groupID, uint moneyAmt, int totalTier, int usedTier)
|
||||
{
|
||||
}
|
||||
|
||||
public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -453,6 +453,47 @@ namespace OpenSim.Framework
|
|||
|
||||
public delegate double UpdatePriorityHandler(UpdatePriorityData data);
|
||||
|
||||
public delegate void MuteListEntryUpdate(IClientAPI client, UUID MuteID, string Name, int Flags,UUID AgentID);
|
||||
|
||||
public delegate void MuteListEntryRemove(IClientAPI client, UUID MuteID, string Name, UUID AgentID);
|
||||
|
||||
public delegate void AvatarInterestReply(IClientAPI client,UUID target, uint wantmask, string wanttext, uint skillsmask, string skillstext, string languages);
|
||||
|
||||
public delegate void FindAgentUpdate(IClientAPI client, UUID hunter, UUID target);
|
||||
|
||||
public delegate void TrackAgentUpdate(IClientAPI client, UUID hunter, UUID target);
|
||||
|
||||
public delegate void FreezeUserUpdate(IClientAPI client, UUID parcelowner,uint flags, UUID target);
|
||||
|
||||
public delegate void EjectUserUpdate(IClientAPI client, UUID parcelowner,uint flags, UUID target);
|
||||
|
||||
public delegate void NewUserReport(IClientAPI client, string regionName,UUID abuserID, byte catagory, byte checkflags, string details, UUID objectID, Vector3 postion, byte reportType ,UUID screenshotID, string summery, UUID reporter);
|
||||
|
||||
public delegate void GodUpdateRegionInfoUpdate(IClientAPI client, float BillableFactor, ulong EstateID, ulong RegionFlags, byte[] SimName,int RedirectX, int RedirectY);
|
||||
|
||||
public delegate void GodlikeMessage(IClientAPI client, UUID requester, byte[] Method, byte[] Parameter);
|
||||
|
||||
public delegate void SaveStateHandler(IClientAPI client,UUID agentID);
|
||||
|
||||
public delegate void GroupAccountSummaryRequest(IClientAPI client,UUID agentID, UUID groupID);
|
||||
|
||||
public delegate void GroupAccountDetailsRequest(IClientAPI client,UUID agentID, UUID groupID, UUID transactionID, UUID sessionID);
|
||||
|
||||
public delegate void GroupAccountTransactionsRequest(IClientAPI client,UUID agentID, UUID groupID, UUID transactionID, UUID sessionID);
|
||||
|
||||
public delegate void ParcelBuyPass(IClientAPI client, UUID agentID, int ParcelLocalID);
|
||||
|
||||
public delegate void ParcelGodMark(IClientAPI client, UUID agentID, int ParcelLocalID);
|
||||
|
||||
public delegate void GroupActiveProposalsRequest(IClientAPI client,UUID agentID, UUID groupID, UUID transactionID, UUID sessionID);
|
||||
|
||||
public delegate void GroupVoteHistoryRequest(IClientAPI client,UUID agentID, UUID groupID, UUID transactionID, UUID sessionID);
|
||||
|
||||
|
||||
public delegate void SimWideDeletesDelegate(IClientAPI client,UUID agentID, int flags, UUID targetID);
|
||||
|
||||
public delegate void SendPostcard(IClientAPI client);
|
||||
|
||||
#endregion
|
||||
|
||||
public struct DirPlacesReplyData
|
||||
|
@ -1028,6 +1069,26 @@ namespace OpenSim.Framework
|
|||
|
||||
event PlacesQuery OnPlacesQuery;
|
||||
|
||||
event FindAgentUpdate OnFindAgentEvent;
|
||||
event TrackAgentUpdate OnTrackAgentEvent;
|
||||
event NewUserReport OnUserReportEvent;
|
||||
event SaveStateHandler OnSaveStateEvent;
|
||||
event GroupAccountSummaryRequest OnGroupAccountSummaryRequest;
|
||||
event GroupAccountDetailsRequest OnGroupAccountDetailsRequest;
|
||||
event GroupAccountTransactionsRequest OnGroupAccountTransactionsRequest;
|
||||
event FreezeUserUpdate OnParcelFreezeUserEvent;
|
||||
event EjectUserUpdate OnParcelEjectUserEvent;
|
||||
event ParcelBuyPass OnParcelBuyPass;
|
||||
event ParcelGodMark OnParcelGodMark;
|
||||
event GroupActiveProposalsRequest OnGroupActiveProposalsRequest;
|
||||
event GroupVoteHistoryRequest OnGroupVoteHistoryRequest;
|
||||
event SimWideDeletesDelegate OnSimWideDeletes;
|
||||
event SendPostcard OnSendPostcard;
|
||||
event MuteListEntryUpdate OnUpdateMuteListEntryEvent;
|
||||
event MuteListEntryRemove OnRemoveMuteListEntryEvent;
|
||||
event GodlikeMessage onGodlikeMessageEvent;
|
||||
event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdateEvent;
|
||||
|
||||
/// <summary>
|
||||
/// Set the debug level at which packet output should be printed to console.
|
||||
/// </summary>
|
||||
|
@ -1394,5 +1455,12 @@ namespace OpenSim.Framework
|
|||
void SendRebakeAvatarTextures(UUID textureID);
|
||||
|
||||
void SendAvatarInterestsReply(UUID avatarID, uint wantMask, string wantText, uint skillsMask, string skillsText, string languages);
|
||||
|
||||
void SendGroupAccountingDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID, int amt);
|
||||
|
||||
void SendGroupAccountingSummary(IClientAPI sender,UUID groupID, uint moneyAmt, int totalTier, int usedTier);
|
||||
|
||||
void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -298,6 +298,26 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
public event AvatarInterestUpdate OnAvatarInterestUpdate;
|
||||
public event PlacesQuery OnPlacesQuery;
|
||||
public event AgentFOV OnAgentFOV;
|
||||
public event FindAgentUpdate OnFindAgentEvent;
|
||||
public event TrackAgentUpdate OnTrackAgentEvent;
|
||||
public event NewUserReport OnUserReportEvent;
|
||||
public event SaveStateHandler OnSaveStateEvent;
|
||||
public event GroupAccountSummaryRequest OnGroupAccountSummaryRequest;
|
||||
public event GroupAccountDetailsRequest OnGroupAccountDetailsRequest;
|
||||
public event GroupAccountTransactionsRequest OnGroupAccountTransactionsRequest;
|
||||
public event FreezeUserUpdate OnParcelFreezeUserEvent;
|
||||
public event EjectUserUpdate OnParcelEjectUserEvent;
|
||||
public event ParcelBuyPass OnParcelBuyPass;
|
||||
public event ParcelGodMark OnParcelGodMark;
|
||||
public event GroupActiveProposalsRequest OnGroupActiveProposalsRequest;
|
||||
public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest;
|
||||
public event SimWideDeletesDelegate OnSimWideDeletes;
|
||||
public event SendPostcard OnSendPostcard;
|
||||
public event MuteListEntryUpdate OnUpdateMuteListEntryEvent;
|
||||
public event MuteListEntryRemove OnRemoveMuteListEntryEvent;
|
||||
public event GodlikeMessage onGodlikeMessageEvent;
|
||||
public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdateEvent;
|
||||
|
||||
|
||||
#endregion Events
|
||||
|
||||
|
@ -806,6 +826,189 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
OutPacket(gmp, ThrottleOutPacketType.Task);
|
||||
}
|
||||
|
||||
public void SendGroupActiveProposals(IClientAPI sender,UUID agentID, UUID sessionID, UUID groupID, UUID transactionID, Dictionary<int, string> VoteID, Dictionary<int, string> VoteInitiator, Dictionary<int, string> Majority, Dictionary<int, string> Quorum, Dictionary<int, string> TerseDateID, Dictionary<int, string> StartDateTime, Dictionary<int, string> EndDateTime, Dictionary<int, string> ProposalText)
|
||||
{
|
||||
foreach(KeyValuePair<int, string> Blank in VoteID)
|
||||
{
|
||||
GroupActiveProposalItemReplyPacket GAPIRP = new GroupActiveProposalItemReplyPacket();
|
||||
|
||||
GAPIRP.AgentData.AgentID = agentID;
|
||||
GAPIRP.AgentData.GroupID = groupID;
|
||||
GAPIRP.TransactionData.TransactionID = transactionID;
|
||||
GAPIRP.TransactionData.TotalNumItems = 1;
|
||||
GroupActiveProposalItemReplyPacket.ProposalDataBlock ProposalData = new GroupActiveProposalItemReplyPacket.ProposalDataBlock();
|
||||
GAPIRP.ProposalData = new GroupActiveProposalItemReplyPacket.ProposalDataBlock[1];
|
||||
ProposalData.VoteCast = Utils.StringToBytes("false");
|
||||
ProposalData.VoteID = new UUID(VoteID[Blank.Key]);
|
||||
ProposalData.VoteInitiator = new UUID(VoteInitiator[Blank.Key]);
|
||||
ProposalData.Majority = (float)Convert.ToInt32(Majority[Blank.Key]);
|
||||
ProposalData.Quorum = Convert.ToInt32(Quorum[Blank.Key]);
|
||||
ProposalData.TerseDateID = Utils.StringToBytes(TerseDateID[Blank.Key]);
|
||||
ProposalData.StartDateTime = Utils.StringToBytes(StartDateTime[Blank.Key]);
|
||||
ProposalData.EndDateTime = Utils.StringToBytes(EndDateTime[Blank.Key]);
|
||||
ProposalData.ProposalText = Utils.StringToBytes(ProposalText[Blank.Key]);
|
||||
ProposalData.AlreadyVoted = false;
|
||||
GAPIRP.ProposalData[0] = ProposalData;
|
||||
OutPacket(GAPIRP, ThrottleOutPacketType.Task);
|
||||
}
|
||||
if(VoteID.Count == 0)
|
||||
{
|
||||
GroupActiveProposalItemReplyPacket GAPIRP = new GroupActiveProposalItemReplyPacket();
|
||||
|
||||
GAPIRP.AgentData.AgentID = agentID;
|
||||
GAPIRP.AgentData.GroupID = groupID;
|
||||
GAPIRP.TransactionData.TransactionID = transactionID;
|
||||
GAPIRP.TransactionData.TotalNumItems = 1;
|
||||
GroupActiveProposalItemReplyPacket.ProposalDataBlock ProposalData = new GroupActiveProposalItemReplyPacket.ProposalDataBlock();
|
||||
GAPIRP.ProposalData = new GroupActiveProposalItemReplyPacket.ProposalDataBlock[1];
|
||||
ProposalData.VoteCast = Utils.StringToBytes("false");
|
||||
ProposalData.VoteID = UUID.Zero;
|
||||
ProposalData.VoteInitiator = UUID.Zero;
|
||||
ProposalData.Majority = 0;
|
||||
ProposalData.Quorum = 0;
|
||||
ProposalData.TerseDateID = Utils.StringToBytes("");
|
||||
ProposalData.StartDateTime = Utils.StringToBytes("");
|
||||
ProposalData.EndDateTime = Utils.StringToBytes("");
|
||||
ProposalData.ProposalText = Utils.StringToBytes("");
|
||||
ProposalData.AlreadyVoted = false;
|
||||
GAPIRP.ProposalData[0] = ProposalData;
|
||||
OutPacket(GAPIRP, ThrottleOutPacketType.Task);
|
||||
}
|
||||
}
|
||||
|
||||
public void SendGroupVoteHistory(IClientAPI sender,UUID agentID, UUID sessionID, UUID groupID, UUID transactionID, Dictionary<int, string> VoteID, Dictionary<int, string> VoteInitiator, Dictionary<int, string> Majority, Dictionary<int, string> Quorum, Dictionary<int, string> TerseDateID, Dictionary<int, string> StartDateTime, Dictionary<int, string> EndDateTime, Dictionary<int, string> VoteType, Dictionary<int, string> VoteResult, Dictionary<int, string> ProposalText)
|
||||
{
|
||||
foreach(KeyValuePair<int, string> Blank in VoteID)
|
||||
{
|
||||
GroupVoteHistoryItemReplyPacket GVHIRP = new GroupVoteHistoryItemReplyPacket();
|
||||
|
||||
GVHIRP.AgentData.AgentID = agentID;
|
||||
GVHIRP.AgentData.GroupID = groupID;
|
||||
GVHIRP.TransactionData.TransactionID = transactionID;
|
||||
GVHIRP.TransactionData.TotalNumItems = 1;
|
||||
GVHIRP.HistoryItemData.VoteID = new UUID(VoteID[Blank.Key]);
|
||||
GVHIRP.HistoryItemData.VoteInitiator = new UUID(VoteInitiator[Blank.Key]);
|
||||
GVHIRP.HistoryItemData.Majority = (float)Convert.ToInt32(Majority[Blank.Key]);
|
||||
GVHIRP.HistoryItemData.Quorum = Convert.ToInt32(Quorum[Blank.Key]);
|
||||
GVHIRP.HistoryItemData.TerseDateID = Utils.StringToBytes(TerseDateID[Blank.Key]);
|
||||
GVHIRP.HistoryItemData.StartDateTime = Utils.StringToBytes(StartDateTime[Blank.Key]);
|
||||
GVHIRP.HistoryItemData.EndDateTime = Utils.StringToBytes(EndDateTime[Blank.Key]);
|
||||
GVHIRP.HistoryItemData.VoteType = Utils.StringToBytes(VoteType[Blank.Key]);
|
||||
GVHIRP.HistoryItemData.VoteResult = Utils.StringToBytes(VoteResult[Blank.Key]);
|
||||
GVHIRP.HistoryItemData.ProposalText = Utils.StringToBytes(ProposalText[Blank.Key]);
|
||||
GroupVoteHistoryItemReplyPacket.VoteItemBlock VoteItem = new GroupVoteHistoryItemReplyPacket.VoteItemBlock();
|
||||
GVHIRP.VoteItem = new GroupVoteHistoryItemReplyPacket.VoteItemBlock[1];
|
||||
VoteItem.CandidateID = UUID.Zero;
|
||||
VoteItem.NumVotes = 0; //TODO: FIX THIS!!!
|
||||
VoteItem.VoteCast = Utils.StringToBytes("Yes");
|
||||
GVHIRP.VoteItem[0] = VoteItem;
|
||||
OutPacket(GVHIRP, ThrottleOutPacketType.Task);
|
||||
}
|
||||
if(VoteID.Count == 0)
|
||||
{
|
||||
GroupVoteHistoryItemReplyPacket GVHIRP = new GroupVoteHistoryItemReplyPacket();
|
||||
|
||||
GVHIRP.AgentData.AgentID = agentID;
|
||||
GVHIRP.AgentData.GroupID = groupID;
|
||||
GVHIRP.TransactionData.TransactionID = transactionID;
|
||||
GVHIRP.TransactionData.TotalNumItems = 0;
|
||||
GVHIRP.HistoryItemData.VoteID = UUID.Zero;
|
||||
GVHIRP.HistoryItemData.VoteInitiator = UUID.Zero;
|
||||
GVHIRP.HistoryItemData.Majority = 0;
|
||||
GVHIRP.HistoryItemData.Quorum = 0;
|
||||
GVHIRP.HistoryItemData.TerseDateID = Utils.StringToBytes("");
|
||||
GVHIRP.HistoryItemData.StartDateTime = Utils.StringToBytes("");
|
||||
GVHIRP.HistoryItemData.EndDateTime = Utils.StringToBytes("");
|
||||
GVHIRP.HistoryItemData.VoteType = Utils.StringToBytes("");
|
||||
GVHIRP.HistoryItemData.VoteResult = Utils.StringToBytes("");
|
||||
GVHIRP.HistoryItemData.ProposalText = Utils.StringToBytes("");
|
||||
GroupVoteHistoryItemReplyPacket.VoteItemBlock VoteItem = new GroupVoteHistoryItemReplyPacket.VoteItemBlock();
|
||||
GVHIRP.VoteItem = new GroupVoteHistoryItemReplyPacket.VoteItemBlock[1];
|
||||
VoteItem.CandidateID = UUID.Zero;
|
||||
VoteItem.NumVotes = 0; //TODO: FIX THIS!!!
|
||||
VoteItem.VoteCast = Utils.StringToBytes("No");
|
||||
GVHIRP.VoteItem[0] = VoteItem;
|
||||
OutPacket(GVHIRP, ThrottleOutPacketType.Task);
|
||||
}
|
||||
}
|
||||
|
||||
public void SendGroupAccountingDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID, int amt)
|
||||
{
|
||||
GroupAccountDetailsReplyPacket GADRP = new GroupAccountDetailsReplyPacket();
|
||||
GADRP.AgentData = new GroupAccountDetailsReplyPacket.AgentDataBlock();
|
||||
GADRP.AgentData.AgentID = sender.AgentId;
|
||||
GADRP.AgentData.GroupID = groupID;
|
||||
GADRP.HistoryData = new GroupAccountDetailsReplyPacket.HistoryDataBlock[1];
|
||||
GroupAccountDetailsReplyPacket.HistoryDataBlock History = new GroupAccountDetailsReplyPacket.HistoryDataBlock();
|
||||
GADRP.MoneyData = new GroupAccountDetailsReplyPacket.MoneyDataBlock();
|
||||
GADRP.MoneyData.CurrentInterval = 0;
|
||||
GADRP.MoneyData.IntervalDays = 7;
|
||||
GADRP.MoneyData.RequestID = transactionID;
|
||||
GADRP.MoneyData.StartDate = Utils.StringToBytes(DateTime.Today.ToString());
|
||||
History.Amount = amt;
|
||||
History.Description = Utils.StringToBytes("");
|
||||
GADRP.HistoryData[0] = History;
|
||||
OutPacket(GADRP, ThrottleOutPacketType.Task);
|
||||
}
|
||||
|
||||
public void SendGroupAccountingSummary(IClientAPI sender,UUID groupID, uint moneyAmt, int totalTier, int usedTier)
|
||||
{
|
||||
GroupAccountSummaryReplyPacket GASRP =
|
||||
(GroupAccountSummaryReplyPacket)PacketPool.Instance.GetPacket(
|
||||
PacketType.GroupAccountSummaryReply);
|
||||
|
||||
GASRP.AgentData = new GroupAccountSummaryReplyPacket.AgentDataBlock();
|
||||
GASRP.AgentData.AgentID = sender.AgentId;
|
||||
GASRP.AgentData.GroupID = groupID;
|
||||
GASRP.MoneyData = new GroupAccountSummaryReplyPacket.MoneyDataBlock();
|
||||
GASRP.MoneyData.Balance = (int)moneyAmt;
|
||||
GASRP.MoneyData.TotalCredits = totalTier;
|
||||
GASRP.MoneyData.TotalDebits = usedTier;
|
||||
GASRP.MoneyData.StartDate = new byte[1];
|
||||
GASRP.MoneyData.CurrentInterval = 1;
|
||||
GASRP.MoneyData.GroupTaxCurrent = 0;
|
||||
GASRP.MoneyData.GroupTaxEstimate = 0;
|
||||
GASRP.MoneyData.IntervalDays = 0;
|
||||
GASRP.MoneyData.LandTaxCurrent = 0;
|
||||
GASRP.MoneyData.LandTaxEstimate = 0;
|
||||
GASRP.MoneyData.LastTaxDate = new byte[1];
|
||||
GASRP.MoneyData.LightTaxCurrent = 0;
|
||||
GASRP.MoneyData.TaxDate = new byte[1];
|
||||
GASRP.MoneyData.RequestID = sender.AgentId;
|
||||
GASRP.MoneyData.ParcelDirFeeEstimate = 0;
|
||||
GASRP.MoneyData.ParcelDirFeeCurrent = 0;
|
||||
GASRP.MoneyData.ObjectTaxEstimate = 0;
|
||||
GASRP.MoneyData.NonExemptMembers = 0;
|
||||
GASRP.MoneyData.ObjectTaxCurrent = 0;
|
||||
GASRP.MoneyData.LightTaxEstimate = 0;
|
||||
OutPacket(GASRP, ThrottleOutPacketType.Task);
|
||||
}
|
||||
|
||||
public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID, int amt)
|
||||
{
|
||||
GroupAccountTransactionsReplyPacket GATRP =
|
||||
(GroupAccountTransactionsReplyPacket)PacketPool.Instance.GetPacket(
|
||||
PacketType.GroupAccountTransactionsReply);
|
||||
|
||||
GATRP.AgentData = new GroupAccountTransactionsReplyPacket.AgentDataBlock();
|
||||
GATRP.AgentData.AgentID = sender.AgentId;
|
||||
GATRP.AgentData.GroupID = groupID;
|
||||
GATRP.MoneyData = new GroupAccountTransactionsReplyPacket.MoneyDataBlock();
|
||||
GATRP.MoneyData.CurrentInterval = 0;
|
||||
GATRP.MoneyData.IntervalDays = 7;
|
||||
GATRP.MoneyData.RequestID = transactionID;
|
||||
GATRP.MoneyData.StartDate = Utils.StringToBytes(DateTime.Today.ToString());
|
||||
GATRP.HistoryData = new GroupAccountTransactionsReplyPacket.HistoryDataBlock[1];
|
||||
GroupAccountTransactionsReplyPacket.HistoryDataBlock History = new GroupAccountTransactionsReplyPacket.HistoryDataBlock();
|
||||
History.Amount = 0;
|
||||
History.Item = Utils.StringToBytes("");
|
||||
History.Time = Utils.StringToBytes("");
|
||||
History.Type = 0;
|
||||
History.User = Utils.StringToBytes("");
|
||||
GATRP.HistoryData[0] = History;
|
||||
OutPacket(GATRP, ThrottleOutPacketType.Task);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Send the region heightmap to the client
|
||||
/// </summary>
|
||||
|
@ -4554,6 +4757,25 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
AddLocalPacketHandler(PacketType.AvatarInterestsUpdate, HandleAvatarInterestsUpdate);
|
||||
AddLocalPacketHandler(PacketType.GrantUserRights, HandleGrantUserRights);
|
||||
AddLocalPacketHandler(PacketType.PlacesQuery, HandlePlacesQuery);
|
||||
AddLocalPacketHandler(PacketType.UpdateMuteListEntry, HandleUpdateMuteListEntry);
|
||||
AddLocalPacketHandler(PacketType.RemoveMuteListEntry, HandleRemoveMuteListEntry);
|
||||
AddLocalPacketHandler(PacketType.UserReport, HandleUserReport);
|
||||
AddLocalPacketHandler(PacketType.FindAgent, HandleFindAgent);
|
||||
AddLocalPacketHandler(PacketType.TrackAgent, HandleTrackAgent);
|
||||
AddLocalPacketHandler(PacketType.GodUpdateRegionInfo, HandleGodUpdateRegionInfoUpdate);
|
||||
AddLocalPacketHandler(PacketType.GodlikeMessage, HandleGodlikeMessage);
|
||||
AddLocalPacketHandler(PacketType.StateSave, HandleSaveStatePacket);
|
||||
AddLocalPacketHandler(PacketType.GroupAccountDetailsRequest, HandleGroupAccountDetailsRequest);
|
||||
AddLocalPacketHandler(PacketType.GroupAccountSummaryRequest, HandleGroupAccountSummaryRequest);
|
||||
AddLocalPacketHandler(PacketType.GroupAccountTransactionsRequest, HandleGroupTransactionsDetailsRequest);
|
||||
AddLocalPacketHandler(PacketType.FreezeUser, HandleFreezeUser);
|
||||
AddLocalPacketHandler(PacketType.EjectUser, HandleEjectUser);
|
||||
AddLocalPacketHandler(PacketType.ParcelBuyPass, HandleParcelBuyPass);
|
||||
AddLocalPacketHandler(PacketType.ParcelGodMarkAsContent, HandleParcelGodMarkAsContent);
|
||||
AddLocalPacketHandler(PacketType.GroupActiveProposalsRequest, HandleGroupActiveProposalsRequest);
|
||||
AddLocalPacketHandler(PacketType.GroupVoteHistoryRequest, HandleGroupVoteHistoryRequest);
|
||||
AddLocalPacketHandler(PacketType.SimWideDeletes, HandleSimWideDeletes);
|
||||
AddLocalPacketHandler(PacketType.SendPostcard, HandleSendPostcard);
|
||||
}
|
||||
|
||||
#region Packet Handlers
|
||||
|
@ -4650,6 +4872,71 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
return false;
|
||||
}
|
||||
|
||||
private bool HandleParcelGodMarkAsContent(IClientAPI client, Packet Packet)
|
||||
{
|
||||
ParcelGodMarkAsContentPacket ParcelGodMarkAsContent =
|
||||
(ParcelGodMarkAsContentPacket)Packet;
|
||||
|
||||
ParcelGodMark ParcelGodMarkAsContentHandler = OnParcelGodMark;
|
||||
if (ParcelGodMarkAsContentHandler != null)
|
||||
{
|
||||
ParcelGodMarkAsContentHandler(this,
|
||||
ParcelGodMarkAsContent.AgentData.AgentID,
|
||||
ParcelGodMarkAsContent.ParcelData.LocalID);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private bool HandleFreezeUser(IClientAPI client, Packet Packet)
|
||||
{
|
||||
FreezeUserPacket FreezeUser = (FreezeUserPacket)Packet;
|
||||
|
||||
FreezeUserUpdate FreezeUserHandler = OnParcelFreezeUserEvent;
|
||||
if (FreezeUserHandler != null)
|
||||
{
|
||||
FreezeUserHandler(this,
|
||||
FreezeUser.AgentData.AgentID,
|
||||
FreezeUser.Data.Flags,
|
||||
FreezeUser.Data.TargetID);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private bool HandleEjectUser(IClientAPI client, Packet Packet)
|
||||
{
|
||||
EjectUserPacket EjectUser =
|
||||
(EjectUserPacket)Packet;
|
||||
|
||||
EjectUserUpdate EjectUserHandler = OnParcelEjectUserEvent;
|
||||
if (EjectUserHandler != null)
|
||||
{
|
||||
EjectUserHandler(this,
|
||||
EjectUser.AgentData.AgentID,
|
||||
EjectUser.Data.Flags,
|
||||
EjectUser.Data.TargetID);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private bool HandleParcelBuyPass(IClientAPI client, Packet Packet)
|
||||
{
|
||||
ParcelBuyPassPacket ParcelBuyPass =
|
||||
(ParcelBuyPassPacket)Packet;
|
||||
|
||||
ParcelBuyPass ParcelBuyPassHandler = OnParcelBuyPass;
|
||||
if (ParcelBuyPassHandler != null)
|
||||
{
|
||||
ParcelBuyPassHandler(this,
|
||||
ParcelBuyPass.AgentData.AgentID,
|
||||
ParcelBuyPass.ParcelData.LocalID);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private bool HandleParcelBuyRequest(IClientAPI sender, Packet Pack)
|
||||
{
|
||||
ParcelBuyPacket parcel = (ParcelBuyPacket)Pack;
|
||||
|
@ -5016,6 +5303,36 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
return true;
|
||||
}
|
||||
|
||||
private bool HandleFindAgent(IClientAPI client, Packet Packet)
|
||||
{
|
||||
FindAgentPacket FindAgent =
|
||||
(FindAgentPacket)Packet;
|
||||
|
||||
FindAgentUpdate FindAgentHandler = OnFindAgentEvent;
|
||||
if (FindAgentHandler != null)
|
||||
{
|
||||
FindAgentHandler(this,FindAgent.AgentBlock.Hunter,FindAgent.AgentBlock.Prey);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private bool HandleTrackAgent(IClientAPI client, Packet Packet)
|
||||
{
|
||||
TrackAgentPacket TrackAgent =
|
||||
(TrackAgentPacket)Packet;
|
||||
|
||||
TrackAgentUpdate TrackAgentHandler = OnTrackAgentEvent;
|
||||
if (TrackAgentHandler != null)
|
||||
{
|
||||
TrackAgentHandler(this,
|
||||
TrackAgent.AgentData.AgentID,
|
||||
TrackAgent.TargetData.PreyID);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private bool HandlerRezObject(IClientAPI sender, Packet Pack)
|
||||
{
|
||||
RezObjectPacket rezPacket = (RezObjectPacket)Pack;
|
||||
|
@ -8285,6 +8602,70 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
|
||||
return true;
|
||||
}
|
||||
|
||||
private bool HandleGodUpdateRegionInfoUpdate(IClientAPI client, Packet Packet)
|
||||
{
|
||||
GodUpdateRegionInfoPacket GodUpdateRegionInfo =
|
||||
(GodUpdateRegionInfoPacket)Packet;
|
||||
|
||||
GodUpdateRegionInfoUpdate handlerGodUpdateRegionInfo = OnGodUpdateRegionInfoUpdateEvent;
|
||||
if (handlerGodUpdateRegionInfo != null)
|
||||
{
|
||||
handlerGodUpdateRegionInfo(this,
|
||||
GodUpdateRegionInfo.RegionInfo.BillableFactor,
|
||||
GodUpdateRegionInfo.RegionInfo.EstateID,
|
||||
GodUpdateRegionInfo.RegionInfo.RegionFlags,
|
||||
GodUpdateRegionInfo.RegionInfo.SimName,
|
||||
GodUpdateRegionInfo.RegionInfo.RedirectGridX,
|
||||
GodUpdateRegionInfo.RegionInfo.RedirectGridY);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private bool HandleSimWideDeletes(IClientAPI client, Packet Packet)
|
||||
{
|
||||
SimWideDeletesPacket SimWideDeletesRequest =
|
||||
(SimWideDeletesPacket)Packet;
|
||||
SimWideDeletesDelegate handlerSimWideDeletesRequest = OnSimWideDeletes;
|
||||
if (handlerSimWideDeletesRequest != null)
|
||||
{
|
||||
handlerSimWideDeletesRequest(this, SimWideDeletesRequest.AgentData.AgentID,(int)SimWideDeletesRequest.DataBlock.Flags,SimWideDeletesRequest.DataBlock.TargetID);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private bool HandleGodlikeMessage(IClientAPI client, Packet Packet)
|
||||
{
|
||||
GodlikeMessagePacket GodlikeMessage =
|
||||
(GodlikeMessagePacket)Packet;
|
||||
|
||||
GodlikeMessage handlerGodlikeMessage = onGodlikeMessageEvent;
|
||||
if (handlerGodlikeMessage != null)
|
||||
{
|
||||
handlerGodlikeMessage(this,
|
||||
GodlikeMessage.MethodData.Invoice,
|
||||
GodlikeMessage.MethodData.Method,
|
||||
GodlikeMessage.ParamList[0].Parameter);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private bool HandleSaveStatePacket(IClientAPI client, Packet Packet)
|
||||
{
|
||||
StateSavePacket SaveStateMessage =
|
||||
(StateSavePacket)Packet;
|
||||
SaveStateHandler handlerSaveStatePacket = OnSaveStateEvent;
|
||||
if (handlerSaveStatePacket != null)
|
||||
{
|
||||
handlerSaveStatePacket(this,SaveStateMessage.AgentData.AgentID);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private bool HandleGodKickUser(IClientAPI sender, Packet Pack)
|
||||
{
|
||||
GodKickUserPacket gkupack = (GodKickUserPacket)Pack;
|
||||
|
@ -8636,6 +9017,76 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
return true;
|
||||
}
|
||||
|
||||
private bool HandleUpdateMuteListEntry(IClientAPI client, Packet Packet)
|
||||
{
|
||||
UpdateMuteListEntryPacket UpdateMuteListEntry =
|
||||
(UpdateMuteListEntryPacket)Packet;
|
||||
MuteListEntryUpdate handlerUpdateMuteListEntry = OnUpdateMuteListEntryEvent;
|
||||
if (handlerUpdateMuteListEntry != null)
|
||||
{
|
||||
handlerUpdateMuteListEntry(this, UpdateMuteListEntry.MuteData.MuteID,
|
||||
Utils.BytesToString(UpdateMuteListEntry.MuteData.MuteName),
|
||||
UpdateMuteListEntry.MuteData.MuteType,
|
||||
UpdateMuteListEntry.AgentData.AgentID);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private bool HandleRemoveMuteListEntry(IClientAPI client, Packet Packet)
|
||||
{
|
||||
RemoveMuteListEntryPacket RemoveMuteListEntry =
|
||||
(RemoveMuteListEntryPacket)Packet;
|
||||
MuteListEntryRemove handlerRemoveMuteListEntry = OnRemoveMuteListEntryEvent;
|
||||
if (handlerRemoveMuteListEntry != null)
|
||||
{
|
||||
handlerRemoveMuteListEntry(this,
|
||||
RemoveMuteListEntry.MuteData.MuteID,
|
||||
Utils.BytesToString(RemoveMuteListEntry.MuteData.MuteName),
|
||||
RemoveMuteListEntry.AgentData.AgentID);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private bool HandleUserReport(IClientAPI client, Packet Packet)
|
||||
{
|
||||
UserReportPacket UserReport =
|
||||
(UserReportPacket)Packet;
|
||||
|
||||
NewUserReport handlerUserReport = OnUserReportEvent;
|
||||
if (handlerUserReport != null)
|
||||
{
|
||||
handlerUserReport(this,
|
||||
Utils.BytesToString(UserReport.ReportData.AbuseRegionName),
|
||||
UserReport.ReportData.AbuserID,
|
||||
UserReport.ReportData.Category,
|
||||
UserReport.ReportData.CheckFlags,
|
||||
Utils.BytesToString(UserReport.ReportData.Details),
|
||||
UserReport.ReportData.ObjectID,
|
||||
UserReport.ReportData.Position,
|
||||
UserReport.ReportData.ReportType,
|
||||
UserReport.ReportData.ScreenshotID,
|
||||
Utils.BytesToString(UserReport.ReportData.Summary),
|
||||
UserReport.AgentData.AgentID);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private bool HandleSendPostcard(IClientAPI client, Packet packet)
|
||||
{
|
||||
SendPostcardPacket SendPostcard =
|
||||
(SendPostcardPacket)packet;
|
||||
SendPostcard handlerSendPostcard = OnSendPostcard;
|
||||
if (handlerSendPostcard != null)
|
||||
{
|
||||
handlerSendPostcard(this);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private bool HandleUseCircuitCode(IClientAPI sender, Packet Pack)
|
||||
{
|
||||
return true;
|
||||
|
@ -8905,6 +9356,71 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
|
||||
}
|
||||
|
||||
private bool HandleGroupVoteHistoryRequest(IClientAPI client, Packet Packet)
|
||||
{
|
||||
GroupVoteHistoryRequestPacket GroupVoteHistoryRequest =
|
||||
(GroupVoteHistoryRequestPacket)Packet;
|
||||
GroupVoteHistoryRequest handlerGroupVoteHistoryRequest = OnGroupVoteHistoryRequest;
|
||||
if (handlerGroupVoteHistoryRequest != null)
|
||||
{
|
||||
handlerGroupVoteHistoryRequest(this, GroupVoteHistoryRequest.AgentData.AgentID,GroupVoteHistoryRequest.AgentData.SessionID,GroupVoteHistoryRequest.GroupData.GroupID,GroupVoteHistoryRequest.TransactionData.TransactionID);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private bool HandleGroupActiveProposalsRequest(IClientAPI client, Packet Packet)
|
||||
{
|
||||
GroupActiveProposalsRequestPacket GroupActiveProposalsRequest =
|
||||
(GroupActiveProposalsRequestPacket)Packet;
|
||||
GroupActiveProposalsRequest handlerGroupActiveProposalsRequest = OnGroupActiveProposalsRequest;
|
||||
if (handlerGroupActiveProposalsRequest != null)
|
||||
{
|
||||
handlerGroupActiveProposalsRequest(this, GroupActiveProposalsRequest.AgentData.AgentID,GroupActiveProposalsRequest.AgentData.SessionID,GroupActiveProposalsRequest.GroupData.GroupID,GroupActiveProposalsRequest.TransactionData.TransactionID);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private bool HandleGroupAccountDetailsRequest(IClientAPI client, Packet Packet)
|
||||
{
|
||||
GroupAccountDetailsRequestPacket GroupAccountDetailsRequest =
|
||||
(GroupAccountDetailsRequestPacket)Packet;
|
||||
GroupAccountDetailsRequest handlerGroupAccountDetailsRequest = OnGroupAccountDetailsRequest;
|
||||
if (handlerGroupAccountDetailsRequest != null)
|
||||
{
|
||||
handlerGroupAccountDetailsRequest(this, GroupAccountDetailsRequest.AgentData.AgentID,GroupAccountDetailsRequest.AgentData.GroupID,GroupAccountDetailsRequest.MoneyData.RequestID,GroupAccountDetailsRequest.AgentData.SessionID);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private bool HandleGroupAccountSummaryRequest(IClientAPI client, Packet Packet)
|
||||
{
|
||||
GroupAccountSummaryRequestPacket GroupAccountSummaryRequest =
|
||||
(GroupAccountSummaryRequestPacket)Packet;
|
||||
GroupAccountSummaryRequest handlerGroupAccountSummaryRequest = OnGroupAccountSummaryRequest;
|
||||
if (handlerGroupAccountSummaryRequest != null)
|
||||
{
|
||||
handlerGroupAccountSummaryRequest(this, GroupAccountSummaryRequest.AgentData.AgentID,GroupAccountSummaryRequest.AgentData.GroupID);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private bool HandleGroupTransactionsDetailsRequest(IClientAPI client, Packet Packet)
|
||||
{
|
||||
GroupAccountTransactionsRequestPacket GroupAccountTransactionsRequest =
|
||||
(GroupAccountTransactionsRequestPacket)Packet;
|
||||
GroupAccountTransactionsRequest handlerGroupAccountTransactionsRequest = OnGroupAccountTransactionsRequest;
|
||||
if (handlerGroupAccountTransactionsRequest != null)
|
||||
{
|
||||
handlerGroupAccountTransactionsRequest(this, GroupAccountTransactionsRequest.AgentData.AgentID,GroupAccountTransactionsRequest.AgentData.GroupID,GroupAccountTransactionsRequest.MoneyData.RequestID,GroupAccountTransactionsRequest.AgentData.SessionID);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private bool HandleGroupTitlesRequest(IClientAPI sender, Packet Pack)
|
||||
{
|
||||
GroupTitlesRequestPacket groupTitlesRequest =
|
||||
|
@ -13705,7 +14221,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
if (handlerGodKickUser != null)
|
||||
{
|
||||
handlerGodKickUser(gkupack.UserInfo.GodID, gkupack.UserInfo.GodSessionID,
|
||||
gkupack.UserInfo.AgentID, gkupack.UserInfo.KickFlags, gkupack.UserInfo.Reason,gkupack.UserInfo);
|
||||
gkupack.UserInfo.AgentID, gkupack.UserInfo.KickFlags, gkupack.UserInfo.Reason,gkupack.UserInfo);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -54,6 +54,534 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
|||
{
|
||||
}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
}
|
||||
|
||||
public string Name
|
||||
{
|
||||
get { return "FriendsModule"; }
|
||||
}
|
||||
|
||||
public bool IsSharedModule
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IInterregionFriendsComms
|
||||
|
||||
public List<UUID> InformFriendsInOtherRegion(UUID agentId, ulong destRegionHandle, List<UUID> friends, bool online)
|
||||
{
|
||||
List<UUID> tpdAway = new List<UUID>();
|
||||
|
||||
// destRegionHandle is a region on another server
|
||||
uint x = 0, y = 0;
|
||||
Utils.LongToUInts(destRegionHandle, out x, out y);
|
||||
GridRegion info = m_gridServices.GetRegionByPosition(m_initialScene.RegionInfo.ScopeID, (int)x, (int)y);
|
||||
if (info != null)
|
||||
{
|
||||
string httpServer = "http://" + info.ExternalEndPoint.Address + ":" + info.HttpPort + "/presence_update_bulk";
|
||||
|
||||
Hashtable reqParams = new Hashtable();
|
||||
reqParams["agentID"] = agentId.ToString();
|
||||
reqParams["agentOnline"] = online;
|
||||
int count = 0;
|
||||
foreach (UUID uuid in friends)
|
||||
{
|
||||
reqParams["friendID_" + count++] = uuid.ToString();
|
||||
}
|
||||
reqParams["friendCount"] = count;
|
||||
|
||||
IList parameters = new ArrayList();
|
||||
parameters.Add(reqParams);
|
||||
try
|
||||
{
|
||||
XmlRpcRequest request = new XmlRpcRequest("presence_update_bulk", parameters);
|
||||
XmlRpcResponse response = request.Send(httpServer, 5000);
|
||||
Hashtable respData = (Hashtable)response.Value;
|
||||
|
||||
count = (int)respData["friendCount"];
|
||||
for (int i = 0; i < count; ++i)
|
||||
{
|
||||
UUID uuid;
|
||||
if (UUID.TryParse((string)respData["friendID_" + i], out uuid)) tpdAway.Add(uuid);
|
||||
}
|
||||
}
|
||||
catch (WebException e)
|
||||
{
|
||||
// Ignore connect failures, simulators come and go
|
||||
//
|
||||
if (!e.Message.Contains("ConnectFailure"))
|
||||
{
|
||||
m_log.Error("[OGS1 GRID SERVICES]: InformFriendsInOtherRegion XMLRPC failure: ", e);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.Error("[OGS1 GRID SERVICES]: InformFriendsInOtherRegion XMLRPC failure: ", e);
|
||||
}
|
||||
}
|
||||
else m_log.WarnFormat("[OGS1 GRID SERVICES]: Couldn't find region {0}???", destRegionHandle);
|
||||
|
||||
return tpdAway;
|
||||
}
|
||||
|
||||
public bool TriggerTerminateFriend(ulong destRegionHandle, UUID agentID, UUID exFriendID)
|
||||
{
|
||||
// destRegionHandle is a region on another server
|
||||
uint x = 0, y = 0;
|
||||
Utils.LongToUInts(destRegionHandle, out x, out y);
|
||||
GridRegion info = m_gridServices.GetRegionByPosition(m_initialScene.RegionInfo.ScopeID, (int)x, (int)y);
|
||||
if (info == null)
|
||||
{
|
||||
m_log.WarnFormat("[OGS1 GRID SERVICES]: Couldn't find region {0}", destRegionHandle);
|
||||
return false; // region not found???
|
||||
}
|
||||
|
||||
string httpServer = "http://" + info.ExternalEndPoint.Address + ":" + info.HttpPort + "/presence_update_bulk";
|
||||
|
||||
Hashtable reqParams = new Hashtable();
|
||||
reqParams["agentID"] = agentID.ToString();
|
||||
reqParams["friendID"] = exFriendID.ToString();
|
||||
|
||||
IList parameters = new ArrayList();
|
||||
parameters.Add(reqParams);
|
||||
try
|
||||
{
|
||||
XmlRpcRequest request = new XmlRpcRequest("terminate_friend", parameters);
|
||||
XmlRpcResponse response = request.Send(httpServer, 5000);
|
||||
Hashtable respData = (Hashtable)response.Value;
|
||||
|
||||
return (bool)respData["success"];
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.Error("[OGS1 GRID SERVICES]: InformFriendsInOtherRegion XMLRPC failure: ", e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Incoming XMLRPC messages
|
||||
/// <summary>
|
||||
/// Receive presence information changes about clients in other regions.
|
||||
/// </summary>
|
||||
/// <param name="req"></param>
|
||||
/// <returns></returns>
|
||||
public XmlRpcResponse processPresenceUpdateBulk(XmlRpcRequest req, IPEndPoint remoteClient)
|
||||
{
|
||||
Hashtable requestData = (Hashtable)req.Params[0];
|
||||
|
||||
List<UUID> friendsNotHere = new List<UUID>();
|
||||
|
||||
// this is called with the expectation that all the friends in the request are on this region-server.
|
||||
// But as some time passed since we checked (on the other region-server, via the MessagingServer),
|
||||
// some of the friends might have teleported away.
|
||||
// Actually, even now, between this line and the sending below, some people could TP away. So,
|
||||
// we'll have to lock the m_rootAgents list for the duration to prevent/delay that.
|
||||
lock (m_rootAgents)
|
||||
{
|
||||
List<ScenePresence> friendsHere = new List<ScenePresence>();
|
||||
|
||||
try
|
||||
{
|
||||
UUID agentID = new UUID((string)requestData["agentID"]);
|
||||
bool agentOnline = (bool)requestData["agentOnline"];
|
||||
int count = (int)requestData["friendCount"];
|
||||
for (int i = 0; i < count; ++i)
|
||||
{
|
||||
UUID uuid;
|
||||
if (UUID.TryParse((string)requestData["friendID_" + i], out uuid))
|
||||
{
|
||||
if (m_rootAgents.ContainsKey(uuid)) friendsHere.Add(GetRootPresenceFromAgentID(uuid));
|
||||
else friendsNotHere.Add(uuid);
|
||||
}
|
||||
}
|
||||
|
||||
// now send, as long as they are still here...
|
||||
UUID[] agentUUID = new UUID[] { agentID };
|
||||
if (agentOnline)
|
||||
{
|
||||
foreach (ScenePresence agent in friendsHere)
|
||||
{
|
||||
agent.ControllingClient.SendAgentOnline(agentUUID);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (ScenePresence agent in friendsHere)
|
||||
{
|
||||
agent.ControllingClient.SendAgentOffline(agentUUID);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
m_log.Warn("[FRIENDS]: Got exception while parsing presence_update_bulk request:", e);
|
||||
}
|
||||
}
|
||||
|
||||
// no need to lock anymore; if TPs happen now, worst case is that we have an additional agent in this region,
|
||||
// which should be caught on the next iteration...
|
||||
Hashtable result = new Hashtable();
|
||||
int idx = 0;
|
||||
foreach (UUID uuid in friendsNotHere)
|
||||
{
|
||||
result["friendID_" + idx++] = uuid.ToString();
|
||||
}
|
||||
result["friendCount"] = idx;
|
||||
|
||||
XmlRpcResponse response = new XmlRpcResponse();
|
||||
response.Value = result;
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
public XmlRpcResponse processTerminateFriend(XmlRpcRequest req, IPEndPoint remoteClient)
|
||||
{
|
||||
Hashtable requestData = (Hashtable)req.Params[0];
|
||||
|
||||
bool success = false;
|
||||
|
||||
UUID agentID;
|
||||
UUID friendID;
|
||||
if (requestData.ContainsKey("agentID") && UUID.TryParse((string)requestData["agentID"], out agentID) &&
|
||||
requestData.ContainsKey("friendID") && UUID.TryParse((string)requestData["friendID"], out friendID))
|
||||
{
|
||||
// try to find it and if it is there, prevent it to vanish before we sent the message
|
||||
lock (m_rootAgents)
|
||||
{
|
||||
if (m_rootAgents.ContainsKey(agentID))
|
||||
{
|
||||
m_log.DebugFormat("[FRIEND]: Sending terminate friend {0} to agent {1}", friendID, agentID);
|
||||
GetRootPresenceFromAgentID(agentID).ControllingClient.SendTerminateFriend(friendID);
|
||||
success = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// return whether we were successful
|
||||
Hashtable result = new Hashtable();
|
||||
result["success"] = success;
|
||||
|
||||
XmlRpcResponse response = new XmlRpcResponse();
|
||||
response.Value = result;
|
||||
return response;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Scene events
|
||||
|
||||
private void OnNewClient(IClientAPI client)
|
||||
{
|
||||
// All friends establishment protocol goes over instant message
|
||||
// There's no way to send a message from the sim
|
||||
// to a user to 'add a friend' without causing dialog box spam
|
||||
|
||||
// Subscribe to instant messages
|
||||
client.OnInstantMessage += OnInstantMessage;
|
||||
|
||||
// Friend list management
|
||||
client.OnApproveFriendRequest += OnApproveFriendRequest;
|
||||
client.OnDenyFriendRequest += OnDenyFriendRequest;
|
||||
client.OnTerminateFriendship += OnTerminateFriendship;
|
||||
|
||||
// ... calling card handling...
|
||||
client.OnOfferCallingCard += OnOfferCallingCard;
|
||||
client.OnAcceptCallingCard += OnAcceptCallingCard;
|
||||
client.OnDeclineCallingCard += OnDeclineCallingCard;
|
||||
|
||||
// we need this one exactly once per agent session (see comments in the handler below)
|
||||
client.OnEconomyDataRequest += OnEconomyDataRequest;
|
||||
|
||||
// if it leaves, we want to know, too
|
||||
client.OnLogout += OnLogout;
|
||||
|
||||
client.OnGrantUserRights += GrantUserFriendRights;
|
||||
client.OnTrackAgentEvent += FindAgent;
|
||||
client.OnFindAgentEvent += FindAgent;
|
||||
|
||||
}
|
||||
|
||||
private void ClientClosed(UUID AgentId, Scene scene)
|
||||
{
|
||||
// agent's client was closed. As we handle logout in OnLogout, this here has only to handle
|
||||
// TPing away (root agent is closed) or TPing/crossing in a region far enough away (client
|
||||
// agent is closed).
|
||||
// NOTE: In general, this doesn't mean that the agent logged out, just that it isn't around
|
||||
// in one of the regions here anymore.
|
||||
lock (m_rootAgents)
|
||||
{
|
||||
if (m_rootAgents.ContainsKey(AgentId))
|
||||
{
|
||||
m_rootAgents.Remove(AgentId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void AvatarEnteringParcel(ScenePresence avatar, int localLandID, UUID regionID)
|
||||
{
|
||||
lock (m_rootAgents)
|
||||
{
|
||||
m_rootAgents[avatar.UUID] = avatar.RegionHandle;
|
||||
// Claim User! my user! Mine mine mine!
|
||||
}
|
||||
}
|
||||
|
||||
private void MakeChildAgent(ScenePresence avatar)
|
||||
{
|
||||
lock (m_rootAgents)
|
||||
{
|
||||
if (m_rootAgents.ContainsKey(avatar.UUID))
|
||||
{
|
||||
// only delete if the region matches. As this is a shared module, the avatar could be
|
||||
// root agent in another region on this server.
|
||||
if (m_rootAgents[avatar.UUID] == avatar.RegionHandle)
|
||||
{
|
||||
m_rootAgents.Remove(avatar.UUID);
|
||||
// m_log.Debug("[FRIEND]: Removing " + avatar.Firstname + " " + avatar.Lastname + " as a root agent");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
private ScenePresence GetRootPresenceFromAgentID(UUID AgentID)
|
||||
{
|
||||
ScenePresence returnAgent = null;
|
||||
lock (m_scenes)
|
||||
{
|
||||
ScenePresence queryagent = null;
|
||||
foreach (Scene scene in m_scenes.Values)
|
||||
{
|
||||
queryagent = scene.GetScenePresence(AgentID);
|
||||
if (queryagent != null)
|
||||
{
|
||||
if (!queryagent.IsChildAgent)
|
||||
{
|
||||
returnAgent = queryagent;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return returnAgent;
|
||||
}
|
||||
|
||||
private ScenePresence GetAnyPresenceFromAgentID(UUID AgentID)
|
||||
{
|
||||
ScenePresence returnAgent = null;
|
||||
lock (m_scenes)
|
||||
{
|
||||
ScenePresence queryagent = null;
|
||||
foreach (Scene scene in m_scenes.Values)
|
||||
{
|
||||
queryagent = scene.GetScenePresence(AgentID);
|
||||
if (queryagent != null)
|
||||
{
|
||||
returnAgent = queryagent;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return returnAgent;
|
||||
}
|
||||
|
||||
public void OfferFriendship(UUID fromUserId, IClientAPI toUserClient, string offerMessage)
|
||||
{
|
||||
CachedUserInfo userInfo = m_initialScene.CommsManager.UserProfileCacheService.GetUserDetails(fromUserId);
|
||||
|
||||
if (userInfo != null)
|
||||
{
|
||||
GridInstantMessage msg = new GridInstantMessage(
|
||||
toUserClient.Scene, fromUserId, userInfo.UserProfile.Name, toUserClient.AgentId,
|
||||
(byte)InstantMessageDialog.FriendshipOffered, offerMessage, false, Vector3.Zero);
|
||||
|
||||
FriendshipOffered(msg);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.ErrorFormat("[FRIENDS]: No user found for id {0} in OfferFriendship()", fromUserId);
|
||||
}
|
||||
}
|
||||
|
||||
#region FriendRequestHandling
|
||||
|
||||
private void OnInstantMessage(IClientAPI client, GridInstantMessage im)
|
||||
{
|
||||
// Friend Requests go by Instant Message.. using the dialog param
|
||||
// https://wiki.secondlife.com/wiki/ImprovedInstantMessage
|
||||
|
||||
if (im.dialog == (byte)InstantMessageDialog.FriendshipOffered) // 38
|
||||
{
|
||||
// fromAgentName is the *destination* name (the friend we offer friendship to)
|
||||
ScenePresence initiator = GetAnyPresenceFromAgentID(new UUID(im.fromAgentID));
|
||||
im.fromAgentName = initiator != null ? initiator.Name : "(hippo)";
|
||||
|
||||
FriendshipOffered(im);
|
||||
}
|
||||
else if (im.dialog == (byte)InstantMessageDialog.FriendshipAccepted) // 39
|
||||
{
|
||||
FriendshipAccepted(client, im);
|
||||
}
|
||||
else if (im.dialog == (byte)InstantMessageDialog.FriendshipDeclined) // 40
|
||||
{
|
||||
FriendshipDeclined(client, im);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Invoked when a user offers a friendship.
|
||||
/// </summary>
|
||||
///
|
||||
/// <param name="im"></param>
|
||||
/// <param name="client"></param>
|
||||
private void FriendshipOffered(GridInstantMessage im)
|
||||
{
|
||||
// this is triggered by the initiating agent:
|
||||
// A local agent offers friendship to some possibly remote friend.
|
||||
// A IM is triggered, processed here and sent to the friend (possibly in a remote region).
|
||||
|
||||
m_log.DebugFormat("[FRIEND]: Offer(38) - From: {0}, FromName: {1} To: {2}, Session: {3}, Message: {4}, Offline {5}",
|
||||
im.fromAgentID, im.fromAgentName, im.toAgentID, im.imSessionID, im.message, im.offline);
|
||||
|
||||
// 1.20 protocol sends an UUID in the message field, instead of the friendship offer text.
|
||||
// For interoperability, we have to clear that
|
||||
if (Util.isUUID(im.message)) im.message = "";
|
||||
|
||||
// be sneeky and use the initiator-UUID as transactionID. This means we can be stateless.
|
||||
// we have to look up the agent name on friendship-approval, though.
|
||||
im.imSessionID = im.fromAgentID;
|
||||
|
||||
if (m_TransferModule != null)
|
||||
{
|
||||
// Send it to whoever is the destination.
|
||||
// If new friend is local, it will send an IM to the viewer.
|
||||
// If new friend is remote, it will cause a OnGridInstantMessage on the remote server
|
||||
m_TransferModule.SendInstantMessage(
|
||||
im,
|
||||
delegate(bool success)
|
||||
{
|
||||
m_log.DebugFormat("[FRIEND]: sending IM success = {0}", success);
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Invoked when a user accepts a friendship offer.
|
||||
/// </summary>
|
||||
/// <param name="im"></param>
|
||||
/// <param name="client"></param>
|
||||
private void FriendshipAccepted(IClientAPI client, GridInstantMessage im)
|
||||
{
|
||||
m_log.DebugFormat("[FRIEND]: 39 - from client {0}, agent {2} {3}, imsession {4} to {5}: {6} (dialog {7})",
|
||||
client.AgentId, im.fromAgentID, im.fromAgentName, im.imSessionID, im.toAgentID, im.message, im.dialog);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Invoked when a user declines a friendship offer.
|
||||
/// </summary>
|
||||
/// May not currently be used - see OnDenyFriendRequest() instead
|
||||
/// <param name="im"></param>
|
||||
/// <param name="client"></param>
|
||||
private void FriendshipDeclined(IClientAPI client, GridInstantMessage im)
|
||||
{
|
||||
UUID fromAgentID = new UUID(im.fromAgentID);
|
||||
UUID toAgentID = new UUID(im.toAgentID);
|
||||
|
||||
// declining the friendship offer causes a type 40 IM being sent to the (possibly remote) initiator
|
||||
// toAgentID is initiator, fromAgentID declined friendship
|
||||
m_log.DebugFormat("[FRIEND]: 40 - from client {0}, agent {1} {2}, imsession {3} to {4}: {5} (dialog {6})",
|
||||
client != null ? client.AgentId.ToString() : "<null>",
|
||||
fromAgentID, im.fromAgentName, im.imSessionID, im.toAgentID, im.message, im.dialog);
|
||||
|
||||
// Send the decline to whoever is the destination.
|
||||
GridInstantMessage msg
|
||||
= new GridInstantMessage(
|
||||
client.Scene, fromAgentID, client.Name, toAgentID,
|
||||
im.dialog, im.message, im.offline != 0, im.Position);
|
||||
|
||||
// If new friend is local, it will send an IM to the viewer.
|
||||
// If new friend is remote, it will cause a OnGridInstantMessage on the remote server
|
||||
m_TransferModule.SendInstantMessage(msg,
|
||||
delegate(bool success) {
|
||||
m_log.DebugFormat("[FRIEND]: sending IM success = {0}", success);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
private void OnGridInstantMessage(GridInstantMessage msg)
|
||||
{
|
||||
// This event won't be raised unless we have that agent,
|
||||
// so we can depend on the above not trying to send
|
||||
// via grid again
|
||||
//m_log.DebugFormat("[FRIEND]: Got GridIM from {0}, to {1}, imSession {2}, message {3}, dialog {4}",
|
||||
// msg.fromAgentID, msg.toAgentID, msg.imSessionID, msg.message, msg.dialog);
|
||||
|
||||
if (msg.dialog == (byte)InstantMessageDialog.FriendshipOffered ||
|
||||
msg.dialog == (byte)InstantMessageDialog.FriendshipAccepted ||
|
||||
msg.dialog == (byte)InstantMessageDialog.FriendshipDeclined)
|
||||
{
|
||||
// this should succeed as we *know* the root agent is here.
|
||||
m_TransferModule.SendInstantMessage(msg,
|
||||
delegate(bool success) {
|
||||
//m_log.DebugFormat("[FRIEND]: sending IM success = {0}", success);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
if (msg.dialog == (byte)InstantMessageDialog.FriendshipAccepted)
|
||||
{
|
||||
// for accept friendship, we have to do a bit more
|
||||
ApproveFriendship(new UUID(msg.fromAgentID), new UUID(msg.toAgentID), msg.fromAgentName);
|
||||
}
|
||||
}
|
||||
|
||||
private void ApproveFriendship(UUID fromAgentID, UUID toAgentID, string fromName)
|
||||
{
|
||||
m_log.DebugFormat("[FRIEND]: Approve friendship from {0} (ID: {1}) to {2}",
|
||||
fromAgentID, fromName, toAgentID);
|
||||
|
||||
// a new friend was added in the initiator's and friend's data, so the cache entries are wrong now.
|
||||
lock (m_friendLists)
|
||||
{
|
||||
m_friendLists.Invalidate(fromAgentID.ToString());
|
||||
m_friendLists.Invalidate(toAgentID.ToString());
|
||||
}
|
||||
|
||||
// now send presence update and add a calling card for the new friend
|
||||
|
||||
ScenePresence initiator = GetAnyPresenceFromAgentID(toAgentID);
|
||||
if (initiator == null)
|
||||
{
|
||||
// quite wrong. Shouldn't happen.
|
||||
m_log.WarnFormat("[FRIEND]: Coudn't find initiator of friend request {0}", toAgentID);
|
||||
return;
|
||||
}
|
||||
|
||||
m_log.DebugFormat("[FRIEND]: Tell {0} that {1} is online",
|
||||
initiator.Name, fromName);
|
||||
// tell initiator that friend is online
|
||||
initiator.ControllingClient.SendAgentOnline(new UUID[] { fromAgentID });
|
||||
|
||||
// find the folder for the friend...
|
||||
//InventoryFolderImpl folder =
|
||||
// initiator.Scene.CommsManager.UserProfileCacheService.GetUserDetails(toAgentID).FindFolderForType((int)InventoryType.CallingCard);
|
||||
IInventoryService invService = initiator.Scene.InventoryService;
|
||||
InventoryFolderBase folder = invService.GetFolderForType(toAgentID, AssetType.CallingCard);
|
||||
if (folder != null)
|
||||
{
|
||||
// ... and add the calling card
|
||||
CreateCallingCard(initiator.ControllingClient, fromAgentID, folder.ID, fromName);
|
||||
}
|
||||
>>>>>>> master:OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
{
|
||||
}
|
||||
|
@ -84,6 +612,26 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
|||
string offerMessage)
|
||||
{
|
||||
}
|
||||
public void FindAgent(IClientAPI remoteClient, UUID hunter, UUID target)
|
||||
{
|
||||
List<FriendListItem> friendList = GetUserFriends(hunter);
|
||||
foreach (FriendListItem item in friendList)
|
||||
{
|
||||
if(item.onlinestatus == true)
|
||||
{
|
||||
if(item.Friend == target && (item.FriendPerms & (uint)FriendRights.CanSeeOnMap) != 0)
|
||||
{
|
||||
ScenePresence SPTarget = ((Scene)remoteClient.Scene).GetScenePresence(target);
|
||||
string regionname = SPTarget.Scene.RegionInfo.RegionName;
|
||||
remoteClient.SendScriptTeleportRequest("FindAgent", regionname,new Vector3(SPTarget.AbsolutePosition),new Vector3(SPTarget.Lookat));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
remoteClient.SendAgentAlertMessage("The agent you are looking for is not online.", false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public List<FriendListItem> GetUserFriends(UUID agentID)
|
||||
{
|
||||
|
|
|
@ -708,5 +708,10 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue
|
|||
OSD item = EventQueueHelper.GroupMembership(groupUpdate);
|
||||
Enqueue(item, avatarID);
|
||||
}
|
||||
public void QueryReply(PlacesReplyPacket groupUpdate, UUID avatarID)
|
||||
{
|
||||
OSD item = EventQueueHelper.PlacesQuery(groupUpdate);
|
||||
Enqueue(item, avatarID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -455,5 +455,47 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue
|
|||
return groupUpdate;
|
||||
}
|
||||
|
||||
public static OSD PlacesQuery(PlacesReplyPacket PlacesReply)
|
||||
{
|
||||
OSDMap placesReply = new OSDMap();
|
||||
placesReply.Add("message", OSD.FromString("PlacesReplyMessage"));
|
||||
|
||||
OSDMap body = new OSDMap();
|
||||
OSDArray agentData = new OSDArray();
|
||||
OSDMap agentDataMap = new OSDMap();
|
||||
agentDataMap.Add("AgentID", OSD.FromUUID(PlacesReply.AgentData.AgentID));
|
||||
agentDataMap.Add("QueryID", OSD.FromUUID(PlacesReply.AgentData.QueryID));
|
||||
agentDataMap.Add("TransactionID", OSD.FromUUID(PlacesReply.TransactionData.TransactionID));
|
||||
agentData.Add(agentDataMap);
|
||||
body.Add("AgentData", agentData);
|
||||
|
||||
OSDArray QueryData = new OSDArray();
|
||||
|
||||
foreach (PlacesReplyPacket.QueryDataBlock groupDataBlock in PlacesReply.QueryData)
|
||||
{
|
||||
OSDMap QueryDataMap = new OSDMap();
|
||||
QueryDataMap.Add("ActualArea", OSD.FromInteger(groupDataBlock.ActualArea));
|
||||
QueryDataMap.Add("BillableArea", OSD.FromInteger(groupDataBlock.BillableArea));
|
||||
QueryDataMap.Add("Description", OSD.FromBinary(groupDataBlock.Desc));
|
||||
QueryDataMap.Add("Dwell", OSD.FromInteger((int)groupDataBlock.Dwell));
|
||||
QueryDataMap.Add("Flags", OSD.FromString(Convert.ToString(groupDataBlock.Flags)));
|
||||
QueryDataMap.Add("GlobalX", OSD.FromInteger((int)groupDataBlock.GlobalX));
|
||||
QueryDataMap.Add("GlobalY", OSD.FromInteger((int)groupDataBlock.GlobalY));
|
||||
QueryDataMap.Add("GlobalZ", OSD.FromInteger((int)groupDataBlock.GlobalZ));
|
||||
QueryDataMap.Add("Name", OSD.FromBinary(groupDataBlock.Name));
|
||||
QueryDataMap.Add("OwnerID", OSD.FromUUID(groupDataBlock.OwnerID));
|
||||
QueryDataMap.Add("SimName", OSD.FromBinary(groupDataBlock.SimName));
|
||||
QueryDataMap.Add("SnapShotID", OSD.FromUUID(groupDataBlock.SnapshotID));
|
||||
QueryDataMap.Add("ProductSku", OSD.FromInteger(0));
|
||||
QueryDataMap.Add("Price", OSD.FromInteger(groupDataBlock.Price));
|
||||
|
||||
QueryData.Add(QueryDataMap);
|
||||
}
|
||||
body.Add("QueryData", QueryData);
|
||||
placesReply.Add("QueryData[]", body);
|
||||
|
||||
return placesReply;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -274,6 +274,26 @@ namespace OpenSim.Region.Examples.SimpleModule
|
|||
|
||||
public event PlacesQuery OnPlacesQuery;
|
||||
|
||||
public event FindAgentUpdate OnFindAgentEvent;
|
||||
public event TrackAgentUpdate OnTrackAgentEvent;
|
||||
public event NewUserReport OnUserReportEvent;
|
||||
public event SaveStateHandler OnSaveStateEvent;
|
||||
public event GroupAccountSummaryRequest OnGroupAccountSummaryRequest;
|
||||
public event GroupAccountDetailsRequest OnGroupAccountDetailsRequest;
|
||||
public event GroupAccountTransactionsRequest OnGroupAccountTransactionsRequest;
|
||||
public event FreezeUserUpdate OnParcelFreezeUserEvent;
|
||||
public event EjectUserUpdate OnParcelEjectUserEvent;
|
||||
public event ParcelBuyPass OnParcelBuyPass;
|
||||
public event ParcelGodMark OnParcelGodMark;
|
||||
public event GroupActiveProposalsRequest OnGroupActiveProposalsRequest;
|
||||
public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest;
|
||||
public event SimWideDeletesDelegate OnSimWideDeletes;
|
||||
public event SendPostcard OnSendPostcard;
|
||||
public event MuteListEntryUpdate OnUpdateMuteListEntryEvent;
|
||||
public event MuteListEntryRemove OnRemoveMuteListEntryEvent;
|
||||
public event GodlikeMessage onGodlikeMessageEvent;
|
||||
public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdateEvent;
|
||||
|
||||
#pragma warning restore 67
|
||||
|
||||
private UUID myID = UUID.Random();
|
||||
|
@ -1103,5 +1123,17 @@ namespace OpenSim.Region.Examples.SimpleModule
|
|||
public void SendAvatarInterestsReply(UUID avatarID, uint wantMask, string wantText, uint skillsMask, string skillsText, string languages)
|
||||
{
|
||||
}
|
||||
|
||||
public void SendGroupAccountingDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID, int amt)
|
||||
{
|
||||
}
|
||||
|
||||
public void SendGroupAccountingSummary(IClientAPI sender,UUID groupID, uint moneyAmt, int totalTier, int usedTier)
|
||||
{
|
||||
}
|
||||
|
||||
public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -341,6 +341,17 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
get { return true; }
|
||||
}
|
||||
|
||||
private bool m_passCollision;
|
||||
public bool PassCollision
|
||||
{
|
||||
get { return m_passCollision; }
|
||||
set
|
||||
{
|
||||
m_passCollision = value;
|
||||
HasGroupChanged = true;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsSelected
|
||||
{
|
||||
get { return m_isSelected; }
|
||||
|
|
|
@ -141,6 +141,9 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
[XmlIgnore]
|
||||
public UUID FromItemID;
|
||||
|
||||
[XmlIgnore]
|
||||
private Dictionary<int, string> m_CollisionFilter = new Dictionary<int, string>();
|
||||
|
||||
/// <value>
|
||||
/// The UUID of the user inventory item from which this object was rezzed if this is a root part.
|
||||
/// If UUID.Zero then either this is not a root part or there is no connection with a user inventory item.
|
||||
|
@ -452,6 +455,17 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
[XmlIgnore]
|
||||
public Dictionary<int, string> CollisionFilter
|
||||
{
|
||||
get { return m_CollisionFilter; }
|
||||
set
|
||||
{
|
||||
m_CollisionFilter = value;
|
||||
}
|
||||
}
|
||||
|
||||
public ulong RegionHandle
|
||||
{
|
||||
get { return m_regionHandle; }
|
||||
|
@ -1876,18 +1890,49 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
return;
|
||||
|
||||
SceneObjectPart obj = m_parentGroup.Scene.GetSceneObjectPart(localId);
|
||||
string data = "";
|
||||
if (obj != null)
|
||||
{
|
||||
DetectedObject detobj = new DetectedObject();
|
||||
detobj.keyUUID = obj.UUID;
|
||||
detobj.nameStr = obj.Name;
|
||||
detobj.ownerUUID = obj._ownerID;
|
||||
detobj.posVector = obj.AbsolutePosition;
|
||||
detobj.rotQuat = obj.GetWorldRotation();
|
||||
detobj.velVector = obj.Velocity;
|
||||
detobj.colliderType = 0;
|
||||
detobj.groupUUID = obj._groupID;
|
||||
colliding.Add(detobj);
|
||||
if(m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.UUID.ToString()) || m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.Name))
|
||||
{
|
||||
bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data);
|
||||
//If it is 1, it is to accept ONLY collisions from this object
|
||||
if(found)
|
||||
{
|
||||
DetectedObject detobj = new DetectedObject();
|
||||
detobj.keyUUID = obj.UUID;
|
||||
detobj.nameStr = obj.Name;
|
||||
detobj.ownerUUID = obj._ownerID;
|
||||
detobj.posVector = obj.AbsolutePosition;
|
||||
detobj.rotQuat = obj.GetWorldRotation();
|
||||
detobj.velVector = obj.Velocity;
|
||||
detobj.colliderType = 0;
|
||||
detobj.groupUUID = obj._groupID;
|
||||
colliding.Add(detobj);
|
||||
}
|
||||
//If it is 0, it is to not accept collisions from this object
|
||||
else
|
||||
{
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data);
|
||||
//If it is 1, it is to accept ONLY collisions from this object, so this other object will not work
|
||||
if(found)
|
||||
{
|
||||
DetectedObject detobj = new DetectedObject();
|
||||
detobj.keyUUID = obj.UUID;
|
||||
detobj.nameStr = obj.Name;
|
||||
detobj.ownerUUID = obj._ownerID;
|
||||
detobj.posVector = obj.AbsolutePosition;
|
||||
detobj.rotQuat = obj.GetWorldRotation();
|
||||
detobj.velVector = obj.Velocity;
|
||||
detobj.colliderType = 0;
|
||||
detobj.groupUUID = obj._groupID;
|
||||
colliding.Add(detobj);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1899,16 +1944,47 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
|
||||
if (av.LocalId == localId)
|
||||
{
|
||||
DetectedObject detobj = new DetectedObject();
|
||||
detobj.keyUUID = av.UUID;
|
||||
detobj.nameStr = av.ControllingClient.Name;
|
||||
detobj.ownerUUID = av.UUID;
|
||||
detobj.posVector = av.AbsolutePosition;
|
||||
detobj.rotQuat = av.Rotation;
|
||||
detobj.velVector = av.Velocity;
|
||||
detobj.colliderType = 0;
|
||||
detobj.groupUUID = av.ControllingClient.ActiveGroupId;
|
||||
colliding.Add(detobj);
|
||||
if(m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.UUID.ToString()) || m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.Name))
|
||||
{
|
||||
bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data);
|
||||
//If it is 1, it is to accept ONLY collisions from this avatar
|
||||
if(found)
|
||||
{
|
||||
DetectedObject detobj = new DetectedObject();
|
||||
detobj.keyUUID = av.UUID;
|
||||
detobj.nameStr = av.ControllingClient.Name;
|
||||
detobj.ownerUUID = av.UUID;
|
||||
detobj.posVector = av.AbsolutePosition;
|
||||
detobj.rotQuat = av.Rotation;
|
||||
detobj.velVector = av.Velocity;
|
||||
detobj.colliderType = 0;
|
||||
detobj.groupUUID = av.ControllingClient.ActiveGroupId;
|
||||
colliding.Add(detobj);
|
||||
}
|
||||
//If it is 0, it is to not accept collisions from this avatar
|
||||
else
|
||||
{
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data);
|
||||
//If it is 1, it is to accept ONLY collisions from this avatar, so this other avatar will not work
|
||||
if(found)
|
||||
{
|
||||
DetectedObject detobj = new DetectedObject();
|
||||
detobj.keyUUID = av.UUID;
|
||||
detobj.nameStr = av.ControllingClient.Name;
|
||||
detobj.ownerUUID = av.UUID;
|
||||
detobj.posVector = av.AbsolutePosition;
|
||||
detobj.rotQuat = av.Rotation;
|
||||
detobj.velVector = av.Velocity;
|
||||
detobj.colliderType = 0;
|
||||
detobj.groupUUID = av.ControllingClient.ActiveGroupId;
|
||||
colliding.Add(detobj);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1922,7 +1998,10 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
|
||||
if (m_parentGroup.Scene == null)
|
||||
return;
|
||||
|
||||
if(m_parentGroup.PassCollision == true)
|
||||
{
|
||||
//TODO: Add pass to root prim!
|
||||
}
|
||||
m_parentGroup.Scene.EventManager.TriggerScriptCollidingStart(LocalId, StartCollidingMessage);
|
||||
}
|
||||
}
|
||||
|
@ -1947,18 +2026,49 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
return;
|
||||
|
||||
SceneObjectPart obj = m_parentGroup.Scene.GetSceneObjectPart(localId);
|
||||
string data = "";
|
||||
if (obj != null)
|
||||
{
|
||||
DetectedObject detobj = new DetectedObject();
|
||||
detobj.keyUUID = obj.UUID;
|
||||
detobj.nameStr = obj.Name;
|
||||
detobj.ownerUUID = obj._ownerID;
|
||||
detobj.posVector = obj.AbsolutePosition;
|
||||
detobj.rotQuat = obj.GetWorldRotation();
|
||||
detobj.velVector = obj.Velocity;
|
||||
detobj.colliderType = 0;
|
||||
detobj.groupUUID = obj._groupID;
|
||||
colliding.Add(detobj);
|
||||
if(m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.UUID.ToString()) || m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.Name))
|
||||
{
|
||||
bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data);
|
||||
//If it is 1, it is to accept ONLY collisions from this object
|
||||
if(found)
|
||||
{
|
||||
DetectedObject detobj = new DetectedObject();
|
||||
detobj.keyUUID = obj.UUID;
|
||||
detobj.nameStr = obj.Name;
|
||||
detobj.ownerUUID = obj._ownerID;
|
||||
detobj.posVector = obj.AbsolutePosition;
|
||||
detobj.rotQuat = obj.GetWorldRotation();
|
||||
detobj.velVector = obj.Velocity;
|
||||
detobj.colliderType = 0;
|
||||
detobj.groupUUID = obj._groupID;
|
||||
colliding.Add(detobj);
|
||||
}
|
||||
//If it is 0, it is to not accept collisions from this object
|
||||
else
|
||||
{
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data);
|
||||
//If it is 1, it is to accept ONLY collisions from this object, so this other object will not work
|
||||
if(found)
|
||||
{
|
||||
DetectedObject detobj = new DetectedObject();
|
||||
detobj.keyUUID = obj.UUID;
|
||||
detobj.nameStr = obj.Name;
|
||||
detobj.ownerUUID = obj._ownerID;
|
||||
detobj.posVector = obj.AbsolutePosition;
|
||||
detobj.rotQuat = obj.GetWorldRotation();
|
||||
detobj.velVector = obj.Velocity;
|
||||
detobj.colliderType = 0;
|
||||
detobj.groupUUID = obj._groupID;
|
||||
colliding.Add(detobj);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1970,16 +2080,47 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
|
||||
if (av.LocalId == localId)
|
||||
{
|
||||
DetectedObject detobj = new DetectedObject();
|
||||
detobj.keyUUID = av.UUID;
|
||||
detobj.nameStr = av.Name;
|
||||
detobj.ownerUUID = av.UUID;
|
||||
detobj.posVector = av.AbsolutePosition;
|
||||
detobj.rotQuat = av.Rotation;
|
||||
detobj.velVector = av.Velocity;
|
||||
detobj.colliderType = 0;
|
||||
detobj.groupUUID = av.ControllingClient.ActiveGroupId;
|
||||
colliding.Add(detobj);
|
||||
if(m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.UUID.ToString()) || m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.Name))
|
||||
{
|
||||
bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data);
|
||||
//If it is 1, it is to accept ONLY collisions from this avatar
|
||||
if(found)
|
||||
{
|
||||
DetectedObject detobj = new DetectedObject();
|
||||
detobj.keyUUID = av.UUID;
|
||||
detobj.nameStr = av.ControllingClient.Name;
|
||||
detobj.ownerUUID = av.UUID;
|
||||
detobj.posVector = av.AbsolutePosition;
|
||||
detobj.rotQuat = av.Rotation;
|
||||
detobj.velVector = av.Velocity;
|
||||
detobj.colliderType = 0;
|
||||
detobj.groupUUID = av.ControllingClient.ActiveGroupId;
|
||||
colliding.Add(detobj);
|
||||
}
|
||||
//If it is 0, it is to not accept collisions from this avatar
|
||||
else
|
||||
{
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data);
|
||||
//If it is 1, it is to accept ONLY collisions from this avatar, so this other avatar will not work
|
||||
if(found)
|
||||
{
|
||||
DetectedObject detobj = new DetectedObject();
|
||||
detobj.keyUUID = av.UUID;
|
||||
detobj.nameStr = av.ControllingClient.Name;
|
||||
detobj.ownerUUID = av.UUID;
|
||||
detobj.posVector = av.AbsolutePosition;
|
||||
detobj.rotQuat = av.Rotation;
|
||||
detobj.velVector = av.Velocity;
|
||||
detobj.colliderType = 0;
|
||||
detobj.groupUUID = av.ControllingClient.ActiveGroupId;
|
||||
colliding.Add(detobj);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2016,18 +2157,49 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
if (m_parentGroup.Scene == null)
|
||||
return;
|
||||
SceneObjectPart obj = m_parentGroup.Scene.GetSceneObjectPart(localId);
|
||||
string data = "";
|
||||
if (obj != null)
|
||||
{
|
||||
DetectedObject detobj = new DetectedObject();
|
||||
detobj.keyUUID = obj.UUID;
|
||||
detobj.nameStr = obj.Name;
|
||||
detobj.ownerUUID = obj._ownerID;
|
||||
detobj.posVector = obj.AbsolutePosition;
|
||||
detobj.rotQuat = obj.GetWorldRotation();
|
||||
detobj.velVector = obj.Velocity;
|
||||
detobj.colliderType = 0;
|
||||
detobj.groupUUID = obj._groupID;
|
||||
colliding.Add(detobj);
|
||||
if(m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.UUID.ToString()) || m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.Name))
|
||||
{
|
||||
bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data);
|
||||
//If it is 1, it is to accept ONLY collisions from this object
|
||||
if(found)
|
||||
{
|
||||
DetectedObject detobj = new DetectedObject();
|
||||
detobj.keyUUID = obj.UUID;
|
||||
detobj.nameStr = obj.Name;
|
||||
detobj.ownerUUID = obj._ownerID;
|
||||
detobj.posVector = obj.AbsolutePosition;
|
||||
detobj.rotQuat = obj.GetWorldRotation();
|
||||
detobj.velVector = obj.Velocity;
|
||||
detobj.colliderType = 0;
|
||||
detobj.groupUUID = obj._groupID;
|
||||
colliding.Add(detobj);
|
||||
}
|
||||
//If it is 0, it is to not accept collisions from this object
|
||||
else
|
||||
{
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data);
|
||||
//If it is 1, it is to accept ONLY collisions from this object, so this other object will not work
|
||||
if(found)
|
||||
{
|
||||
DetectedObject detobj = new DetectedObject();
|
||||
detobj.keyUUID = obj.UUID;
|
||||
detobj.nameStr = obj.Name;
|
||||
detobj.ownerUUID = obj._ownerID;
|
||||
detobj.posVector = obj.AbsolutePosition;
|
||||
detobj.rotQuat = obj.GetWorldRotation();
|
||||
detobj.velVector = obj.Velocity;
|
||||
detobj.colliderType = 0;
|
||||
detobj.groupUUID = obj._groupID;
|
||||
colliding.Add(detobj);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2039,16 +2211,47 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
|
||||
if (av.LocalId == localId)
|
||||
{
|
||||
DetectedObject detobj = new DetectedObject();
|
||||
detobj.keyUUID = av.UUID;
|
||||
detobj.nameStr = av.Name;
|
||||
detobj.ownerUUID = av.UUID;
|
||||
detobj.posVector = av.AbsolutePosition;
|
||||
detobj.rotQuat = av.Rotation;
|
||||
detobj.velVector = av.Velocity;
|
||||
detobj.colliderType = 0;
|
||||
detobj.groupUUID = av.ControllingClient.ActiveGroupId;
|
||||
colliding.Add(detobj);
|
||||
if(m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.UUID.ToString()) || m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.Name))
|
||||
{
|
||||
bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data);
|
||||
//If it is 1, it is to accept ONLY collisions from this avatar
|
||||
if(found)
|
||||
{
|
||||
DetectedObject detobj = new DetectedObject();
|
||||
detobj.keyUUID = av.UUID;
|
||||
detobj.nameStr = av.ControllingClient.Name;
|
||||
detobj.ownerUUID = av.UUID;
|
||||
detobj.posVector = av.AbsolutePosition;
|
||||
detobj.rotQuat = av.Rotation;
|
||||
detobj.velVector = av.Velocity;
|
||||
detobj.colliderType = 0;
|
||||
detobj.groupUUID = av.ControllingClient.ActiveGroupId;
|
||||
colliding.Add(detobj);
|
||||
}
|
||||
//If it is 0, it is to not accept collisions from this avatar
|
||||
else
|
||||
{
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data);
|
||||
//If it is 1, it is to accept ONLY collisions from this avatar, so this other avatar will not work
|
||||
if(found)
|
||||
{
|
||||
DetectedObject detobj = new DetectedObject();
|
||||
detobj.keyUUID = av.UUID;
|
||||
detobj.nameStr = av.ControllingClient.Name;
|
||||
detobj.ownerUUID = av.UUID;
|
||||
detobj.posVector = av.AbsolutePosition;
|
||||
detobj.rotQuat = av.Rotation;
|
||||
detobj.velVector = av.Velocity;
|
||||
detobj.colliderType = 0;
|
||||
detobj.groupUUID = av.ControllingClient.ActiveGroupId;
|
||||
colliding.Add(detobj);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -836,6 +836,25 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
|
|||
public event MuteListRequest OnMuteListRequest;
|
||||
public event AvatarInterestUpdate OnAvatarInterestUpdate;
|
||||
public event PlacesQuery OnPlacesQuery;
|
||||
public event FindAgentUpdate OnFindAgentEvent;
|
||||
public event TrackAgentUpdate OnTrackAgentEvent;
|
||||
public event NewUserReport OnUserReportEvent;
|
||||
public event SaveStateHandler OnSaveStateEvent;
|
||||
public event GroupAccountSummaryRequest OnGroupAccountSummaryRequest;
|
||||
public event GroupAccountDetailsRequest OnGroupAccountDetailsRequest;
|
||||
public event GroupAccountTransactionsRequest OnGroupAccountTransactionsRequest;
|
||||
public event FreezeUserUpdate OnParcelFreezeUserEvent;
|
||||
public event EjectUserUpdate OnParcelEjectUserEvent;
|
||||
public event ParcelBuyPass OnParcelBuyPass;
|
||||
public event ParcelGodMark OnParcelGodMark;
|
||||
public event GroupActiveProposalsRequest OnGroupActiveProposalsRequest;
|
||||
public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest;
|
||||
public event SimWideDeletesDelegate OnSimWideDeletes;
|
||||
public event SendPostcard OnSendPostcard;
|
||||
public event MuteListEntryUpdate OnUpdateMuteListEntryEvent;
|
||||
public event MuteListEntryRemove OnRemoveMuteListEntryEvent;
|
||||
public event GodlikeMessage onGodlikeMessageEvent;
|
||||
public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdateEvent;
|
||||
|
||||
#pragma warning restore 67
|
||||
|
||||
|
@ -1628,5 +1647,17 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
|
|||
public void SendAvatarInterestsReply(UUID avatarID, uint wantMask, string wantText, uint skillsMask, string skillsText, string languages)
|
||||
{
|
||||
}
|
||||
|
||||
public void SendGroupAccountingDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID, int amt)
|
||||
{
|
||||
}
|
||||
|
||||
public void SendGroupAccountingSummary(IClientAPI sender,UUID groupID, uint moneyAmt, int totalTier, int usedTier)
|
||||
{
|
||||
}
|
||||
|
||||
public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -380,6 +380,26 @@ namespace OpenSim.Region.OptionalModules.World.NPC
|
|||
|
||||
public event PlacesQuery OnPlacesQuery;
|
||||
|
||||
public event FindAgentUpdate OnFindAgentEvent;
|
||||
public event TrackAgentUpdate OnTrackAgentEvent;
|
||||
public event NewUserReport OnUserReportEvent;
|
||||
public event SaveStateHandler OnSaveStateEvent;
|
||||
public event GroupAccountSummaryRequest OnGroupAccountSummaryRequest;
|
||||
public event GroupAccountDetailsRequest OnGroupAccountDetailsRequest;
|
||||
public event GroupAccountTransactionsRequest OnGroupAccountTransactionsRequest;
|
||||
public event FreezeUserUpdate OnParcelFreezeUserEvent;
|
||||
public event EjectUserUpdate OnParcelEjectUserEvent;
|
||||
public event ParcelBuyPass OnParcelBuyPass;
|
||||
public event ParcelGodMark OnParcelGodMark;
|
||||
public event GroupActiveProposalsRequest OnGroupActiveProposalsRequest;
|
||||
public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest;
|
||||
public event SimWideDeletesDelegate OnSimWideDeletes;
|
||||
public event SendPostcard OnSendPostcard;
|
||||
public event MuteListEntryUpdate OnUpdateMuteListEntryEvent;
|
||||
public event MuteListEntryRemove OnRemoveMuteListEntryEvent;
|
||||
public event GodlikeMessage onGodlikeMessageEvent;
|
||||
public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdateEvent;
|
||||
|
||||
#pragma warning restore 67
|
||||
|
||||
#endregion
|
||||
|
@ -1108,5 +1128,17 @@ namespace OpenSim.Region.OptionalModules.World.NPC
|
|||
public void SendAvatarInterestsReply(UUID avatarID, uint wantMask, string wantText, uint skillsMask, string skillsText, string languages)
|
||||
{
|
||||
}
|
||||
|
||||
public void SendGroupAccountingDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID, int amt)
|
||||
{
|
||||
}
|
||||
|
||||
public void SendGroupAccountingSummary(IClientAPI sender,UUID groupID, uint moneyAmt, int totalTier, int usedTier)
|
||||
{
|
||||
}
|
||||
|
||||
public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2752,7 +2752,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
public void llCollisionFilter(string name, string id, int accept)
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
NotImplemented("llCollisionFilter");
|
||||
m_host.CollisionFilter.Clear();
|
||||
if(id != null)
|
||||
{
|
||||
m_host.CollisionFilter.Add(accept,id);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_host.CollisionFilter.Add(accept,name);
|
||||
}
|
||||
}
|
||||
|
||||
public void llTakeControls(int controls, int accept, int pass_on)
|
||||
|
@ -4232,7 +4240,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
public void llPassCollisions(int pass)
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
NotImplemented("llPassCollisions");
|
||||
if(pass == 0)
|
||||
{
|
||||
m_host.ParentGroup.PassCollision = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_host.ParentGroup.PassCollision = true;
|
||||
}
|
||||
}
|
||||
|
||||
public LSL_String llGetScriptName()
|
||||
|
|
|
@ -1983,5 +1983,82 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
|
||||
return (int)pws;
|
||||
}
|
||||
public void osSetSpeed(string UUID, float SpeedModifier)
|
||||
{
|
||||
CheckThreatLevel(ThreatLevel.Moderate, "osSetSpeed");
|
||||
m_host.AddScriptLPS(1);
|
||||
ScenePresence avatar = World.GetScenePresence(new UUID(UUID));
|
||||
avatar.SpeedModifier = SpeedModifier;
|
||||
}
|
||||
public void osKickAvatar(string FirstName,string SurName,string alert)
|
||||
{
|
||||
CheckThreatLevel(ThreatLevel.Severe, "osKickAvatar");
|
||||
if (World.Permissions.CanRunConsoleCommand(m_host.OwnerID))
|
||||
{
|
||||
foreach (ScenePresence presence in World.GetAvatars())
|
||||
{
|
||||
if ((presence.Firstname == FirstName) &&
|
||||
presence.Lastname == SurName)
|
||||
{
|
||||
// kick client...
|
||||
if (alert != null)
|
||||
presence.ControllingClient.Kick(alert);
|
||||
|
||||
// ...and close on our side
|
||||
presence.Scene.IncomingCloseAgent(presence.UUID);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
public void osCauseDamage(string avatar, double damage)
|
||||
{
|
||||
CheckThreatLevel(ThreatLevel.High, "osCauseDamage");
|
||||
m_host.AddScriptLPS(1);
|
||||
|
||||
UUID avatarId = new UUID(avatar);
|
||||
Vector3 pos = m_host.GetWorldPosition();
|
||||
|
||||
ScenePresence presence = World.GetScenePresence(avatarId);
|
||||
if (presence != null)
|
||||
{
|
||||
LandData land = World.GetLandData((float)pos.X, (float)pos.Y);
|
||||
if ((land.Flags & (uint)ParcelFlags.AllowDamage) == (uint)ParcelFlags.AllowDamage)
|
||||
{
|
||||
float health = presence.Health;
|
||||
health -= (float)damage;
|
||||
presence.setHealthWithUpdate(health);
|
||||
if (health <= 0)
|
||||
{
|
||||
float healthliveagain = 100;
|
||||
presence.ControllingClient.SendAgentAlertMessage("You died!", true);
|
||||
presence.setHealthWithUpdate(healthliveagain);
|
||||
presence.Scene.TeleportClientHome(presence.UUID, presence.ControllingClient);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
public void osCauseHealing(string avatar, double healing)
|
||||
{
|
||||
CheckThreatLevel(ThreatLevel.High, "osCauseHealing");
|
||||
m_host.AddScriptLPS(1);
|
||||
|
||||
UUID avatarId = new UUID(avatar);
|
||||
ScenePresence presence = World.GetScenePresence(avatarId);
|
||||
Vector3 pos = m_host.GetWorldPosition();
|
||||
bool result = World.ScriptDanger(m_host.LocalId, new Vector3((float)pos.X, (float)pos.Y, (float)pos.Z));
|
||||
if (result)
|
||||
{
|
||||
if (presence != null)
|
||||
{
|
||||
float health = presence.Health;
|
||||
health += (float)healing;
|
||||
if (health >= 100)
|
||||
{
|
||||
health = 100;
|
||||
}
|
||||
presence.setHealthWithUpdate(health);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -165,5 +165,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
|||
LSL_List osGetRegionStats();
|
||||
|
||||
int osGetSimulatorMemory();
|
||||
void osKickAvatar(string FirstName,string SurName,string alert);
|
||||
void osSetSpeed(string UUID, float SpeedModifier);
|
||||
void osCauseHealing(string avatar, double healing);
|
||||
void osCauseDamage(string avatar, double damage);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -647,5 +647,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
|||
{
|
||||
return m_OSSL_Functions.osGetSimulatorMemory();
|
||||
}
|
||||
public void osKickAvatar(string FirstName,string SurName,string alert)
|
||||
{
|
||||
m_OSSL_Functions.osKickAvatar( FirstName, SurName, alert);
|
||||
}
|
||||
public void osSetSpeed(string UUID, float SpeedModifier)
|
||||
{
|
||||
m_OSSL_Functions.osSetSpeed(UUID, SpeedModifier);
|
||||
}
|
||||
public void osCauseDamage(string avatar, double damage)
|
||||
{
|
||||
m_OSSL_Functions.osCauseDamage(avatar, damage);
|
||||
}
|
||||
public void osCauseHealing(string avatar, double healing)
|
||||
{
|
||||
m_OSSL_Functions.osCauseHealing(avatar, healing);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -288,6 +288,26 @@ namespace OpenSim.Tests.Common.Mock
|
|||
|
||||
public event PlacesQuery OnPlacesQuery;
|
||||
|
||||
public event FindAgentUpdate OnFindAgentEvent;
|
||||
public event TrackAgentUpdate OnTrackAgentEvent;
|
||||
public event NewUserReport OnUserReportEvent;
|
||||
public event SaveStateHandler OnSaveStateEvent;
|
||||
public event GroupAccountSummaryRequest OnGroupAccountSummaryRequest;
|
||||
public event GroupAccountDetailsRequest OnGroupAccountDetailsRequest;
|
||||
public event GroupAccountTransactionsRequest OnGroupAccountTransactionsRequest;
|
||||
public event FreezeUserUpdate OnParcelFreezeUserEvent;
|
||||
public event EjectUserUpdate OnParcelEjectUserEvent;
|
||||
public event ParcelBuyPass OnParcelBuyPass;
|
||||
public event ParcelGodMark OnParcelGodMark;
|
||||
public event GroupActiveProposalsRequest OnGroupActiveProposalsRequest;
|
||||
public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest;
|
||||
public event SimWideDeletesDelegate OnSimWideDeletes;
|
||||
public event SendPostcard OnSendPostcard;
|
||||
public event MuteListEntryUpdate OnUpdateMuteListEntryEvent;
|
||||
public event MuteListEntryRemove OnRemoveMuteListEntryEvent;
|
||||
public event GodlikeMessage onGodlikeMessageEvent;
|
||||
public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdateEvent;
|
||||
|
||||
#pragma warning restore 67
|
||||
|
||||
/// <value>
|
||||
|
@ -1163,5 +1183,17 @@ namespace OpenSim.Tests.Common.Mock
|
|||
public void SendAvatarInterestsReply(UUID avatarID, uint wantMask, string wantText, uint skillsMask, string skillsText, string languages)
|
||||
{
|
||||
}
|
||||
|
||||
public void SendGroupAccountingDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID, int amt)
|
||||
{
|
||||
}
|
||||
|
||||
public void SendGroupAccountingSummary(IClientAPI sender,UUID groupID, uint moneyAmt, int totalTier, int usedTier)
|
||||
{
|
||||
}
|
||||
|
||||
public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue