From b67470af9106da24ed67db75cfe4787e58759385 Mon Sep 17 00:00:00 2001 From: Revolution Date: Wed, 6 Jan 2010 19:52:10 -0600 Subject: Fixes the newly added packets as per Melanie's request. Provisionally applied to fix the naming. Signatures are still subject to change. Signed-off-by: Melanie --- .../Region/ClientStack/LindenUDP/LLClientView.cs | 126 +++++++++++---------- 1 file changed, 65 insertions(+), 61 deletions(-) (limited to 'OpenSim/Region/ClientStack') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 9944852..5eaaf12 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -298,25 +298,25 @@ 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 FindAgentUpdate OnFindAgent; + public event TrackAgentUpdate OnTrackAgent; + public event NewUserReport OnUserReport; + public event SaveStateHandler OnSaveState; public event GroupAccountSummaryRequest OnGroupAccountSummaryRequest; public event GroupAccountDetailsRequest OnGroupAccountDetailsRequest; public event GroupAccountTransactionsRequest OnGroupAccountTransactionsRequest; - public event FreezeUserUpdate OnParcelFreezeUserEvent; - public event EjectUserUpdate OnParcelEjectUserEvent; + public event FreezeUserUpdate OnParcelFreezeUser; + public event EjectUserUpdate OnParcelEjectUser; 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 MuteListEntryUpdate OnUpdateMuteListEntry; + public event MuteListEntryRemove OnRemoveMuteListEntry; + public event GodlikeMessage onGodlikeMessage; + public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdate; #endregion Events @@ -826,32 +826,34 @@ namespace OpenSim.Region.ClientStack.LindenUDP OutPacket(gmp, ThrottleOutPacketType.Task); } - public void SendGroupActiveProposals(IClientAPI sender,UUID agentID, UUID sessionID, UUID groupID, UUID transactionID, Dictionary VoteID, Dictionary VoteInitiator, Dictionary Majority, Dictionary Quorum, Dictionary TerseDateID, Dictionary StartDateTime, Dictionary EndDateTime, Dictionary ProposalText) - { - foreach (KeyValuePair Blank in VoteID) + public void SendGroupActiveProposals(IClientAPI sender,UUID agentID, UUID sessionID, UUID groupID, UUID transactionID, string[] VoteID, string[] VoteInitiator, string[] Majority, string[] Quorum, string[] TerseDateID, string[] StartDateTime, string[] EndDateTime, string[] ProposalText) + { + int i = 0; + foreach (string voteID in VoteID) { GroupActiveProposalItemReplyPacket GAPIRP = new GroupActiveProposalItemReplyPacket(); GAPIRP.AgentData.AgentID = agentID; GAPIRP.AgentData.GroupID = groupID; GAPIRP.TransactionData.TransactionID = transactionID; - GAPIRP.TransactionData.TotalNumItems = 1; + GAPIRP.TransactionData.TotalNumItems = ((uint)i+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.VoteID = new UUID(VoteID[i]); + ProposalData.VoteInitiator = new UUID(VoteInitiator[i]); + ProposalData.Majority = (float)Convert.ToInt32(Majority[i]); + ProposalData.Quorum = Convert.ToInt32(Quorum[i]); + ProposalData.TerseDateID = Utils.StringToBytes(TerseDateID[i]); + ProposalData.StartDateTime = Utils.StringToBytes(StartDateTime[i]); + ProposalData.EndDateTime = Utils.StringToBytes(EndDateTime[i]); + ProposalData.ProposalText = Utils.StringToBytes(ProposalText[i]); ProposalData.AlreadyVoted = false; - GAPIRP.ProposalData[0] = ProposalData; + GAPIRP.ProposalData[i] = ProposalData; OutPacket(GAPIRP, ThrottleOutPacketType.Task); + i++; } - if (VoteID.Count == 0) + if (VoteID.Length == 0) { GroupActiveProposalItemReplyPacket GAPIRP = new GroupActiveProposalItemReplyPacket(); @@ -876,35 +878,37 @@ namespace OpenSim.Region.ClientStack.LindenUDP } } - public void SendGroupVoteHistory(IClientAPI sender,UUID agentID, UUID sessionID, UUID groupID, UUID transactionID, Dictionary VoteID, Dictionary VoteInitiator, Dictionary Majority, Dictionary Quorum, Dictionary TerseDateID, Dictionary StartDateTime, Dictionary EndDateTime, Dictionary VoteType, Dictionary VoteResult, Dictionary ProposalText) - { - foreach (KeyValuePair Blank in VoteID) + public void SendGroupVoteHistory(IClientAPI sender,UUID agentID, UUID sessionID, UUID groupID, UUID transactionID, string[] VoteID, string[] VoteInitiator, string[] Majority, string[] Quorum, string[] TerseDateID, string[] StartDateTime, string[] EndDateTime, string[] VoteType, string[] VoteResult, string[] ProposalText) + { + int i = 0; + foreach (string voteID in VoteID) { - GroupVoteHistoryItemReplyPacket GVHIRP = new GroupVoteHistoryItemReplyPacket(); + 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) + GVHIRP.AgentData.AgentID = agentID; + GVHIRP.AgentData.GroupID = groupID; + GVHIRP.TransactionData.TransactionID = transactionID; + GVHIRP.TransactionData.TotalNumItems = ((uint)i+1); + GVHIRP.HistoryItemData.VoteID = new UUID(VoteID[i]); + GVHIRP.HistoryItemData.VoteInitiator = new UUID(VoteInitiator[i]); + GVHIRP.HistoryItemData.Majority = (float)Convert.ToInt32(Majority[i]); + GVHIRP.HistoryItemData.Quorum = Convert.ToInt32(Quorum[i]); + GVHIRP.HistoryItemData.TerseDateID = Utils.StringToBytes(TerseDateID[i]); + GVHIRP.HistoryItemData.StartDateTime = Utils.StringToBytes(StartDateTime[i]); + GVHIRP.HistoryItemData.EndDateTime = Utils.StringToBytes(EndDateTime[i]); + GVHIRP.HistoryItemData.VoteType = Utils.StringToBytes(VoteType[i]); + GVHIRP.HistoryItemData.VoteResult = Utils.StringToBytes(VoteResult[i]); + GVHIRP.HistoryItemData.ProposalText = Utils.StringToBytes(ProposalText[i]); + 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[i] = VoteItem; + OutPacket(GVHIRP, ThrottleOutPacketType.Task); + i++; + } + if (VoteID.Length == 0) { GroupVoteHistoryItemReplyPacket GVHIRP = new GroupVoteHistoryItemReplyPacket(); @@ -4892,7 +4896,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP { FreezeUserPacket FreezeUser = (FreezeUserPacket)Packet; - FreezeUserUpdate FreezeUserHandler = OnParcelFreezeUserEvent; + FreezeUserUpdate FreezeUserHandler = OnParcelFreezeUser; if (FreezeUserHandler != null) { FreezeUserHandler(this, @@ -4909,7 +4913,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP EjectUserPacket EjectUser = (EjectUserPacket)Packet; - EjectUserUpdate EjectUserHandler = OnParcelEjectUserEvent; + EjectUserUpdate EjectUserHandler = OnParcelEjectUser; if (EjectUserHandler != null) { EjectUserHandler(this, @@ -5308,7 +5312,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP FindAgentPacket FindAgent = (FindAgentPacket)Packet; - FindAgentUpdate FindAgentHandler = OnFindAgentEvent; + FindAgentUpdate FindAgentHandler = OnFindAgent; if (FindAgentHandler != null) { FindAgentHandler(this,FindAgent.AgentBlock.Hunter,FindAgent.AgentBlock.Prey); @@ -5322,7 +5326,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP TrackAgentPacket TrackAgent = (TrackAgentPacket)Packet; - TrackAgentUpdate TrackAgentHandler = OnTrackAgentEvent; + TrackAgentUpdate TrackAgentHandler = OnTrackAgent; if (TrackAgentHandler != null) { TrackAgentHandler(this, @@ -8608,7 +8612,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP GodUpdateRegionInfoPacket GodUpdateRegionInfo = (GodUpdateRegionInfoPacket)Packet; - GodUpdateRegionInfoUpdate handlerGodUpdateRegionInfo = OnGodUpdateRegionInfoUpdateEvent; + GodUpdateRegionInfoUpdate handlerGodUpdateRegionInfo = OnGodUpdateRegionInfoUpdate; if (handlerGodUpdateRegionInfo != null) { handlerGodUpdateRegionInfo(this, @@ -8641,7 +8645,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP GodlikeMessagePacket GodlikeMessage = (GodlikeMessagePacket)Packet; - GodlikeMessage handlerGodlikeMessage = onGodlikeMessageEvent; + GodlikeMessage handlerGodlikeMessage = onGodlikeMessage; if (handlerGodlikeMessage != null) { handlerGodlikeMessage(this, @@ -8657,7 +8661,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP { StateSavePacket SaveStateMessage = (StateSavePacket)Packet; - SaveStateHandler handlerSaveStatePacket = OnSaveStateEvent; + SaveStateHandler handlerSaveStatePacket = OnSaveState; if (handlerSaveStatePacket != null) { handlerSaveStatePacket(this,SaveStateMessage.AgentData.AgentID); @@ -9021,7 +9025,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP { UpdateMuteListEntryPacket UpdateMuteListEntry = (UpdateMuteListEntryPacket)Packet; - MuteListEntryUpdate handlerUpdateMuteListEntry = OnUpdateMuteListEntryEvent; + MuteListEntryUpdate handlerUpdateMuteListEntry = OnUpdateMuteListEntry; if (handlerUpdateMuteListEntry != null) { handlerUpdateMuteListEntry(this, UpdateMuteListEntry.MuteData.MuteID, @@ -9037,7 +9041,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP { RemoveMuteListEntryPacket RemoveMuteListEntry = (RemoveMuteListEntryPacket)Packet; - MuteListEntryRemove handlerRemoveMuteListEntry = OnRemoveMuteListEntryEvent; + MuteListEntryRemove handlerRemoveMuteListEntry = OnRemoveMuteListEntry; if (handlerRemoveMuteListEntry != null) { handlerRemoveMuteListEntry(this, @@ -9054,7 +9058,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP UserReportPacket UserReport = (UserReportPacket)Packet; - NewUserReport handlerUserReport = OnUserReportEvent; + NewUserReport handlerUserReport = OnUserReport; if (handlerUserReport != null) { handlerUserReport(this, -- cgit v1.1 From 452be5e54616f6e43acb08588d04d34f809bcd25 Mon Sep 17 00:00:00 2001 From: Revolution Date: Thu, 7 Jan 2010 23:14:26 -0600 Subject: Second Fix to the new Packets as per Melanie's request. Signed-off-by: Melanie --- .../Region/ClientStack/LindenUDP/LLClientView.cs | 100 +++++++++++++-------- 1 file changed, 61 insertions(+), 39 deletions(-) (limited to 'OpenSim/Region/ClientStack') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 5eaaf12..195e9aa 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -824,40 +824,50 @@ namespace OpenSim.Region.ClientStack.LindenUDP gmp.ParamList[i++].Parameter = Util.StringToBytes256(val); } OutPacket(gmp, ThrottleOutPacketType.Task); - } - - public void SendGroupActiveProposals(IClientAPI sender,UUID agentID, UUID sessionID, UUID groupID, UUID transactionID, string[] VoteID, string[] VoteInitiator, string[] Majority, string[] Quorum, string[] TerseDateID, string[] StartDateTime, string[] EndDateTime, string[] ProposalText) + } + public struct GroupActiveProposals { - int i = 0; - foreach (string voteID in VoteID) + public string VoteID; + public string VoteInitiator; + public string Majority; + public string Quorum; + public string TerseDateID; + public string StartDateTime; + public string EndDateTime; + public string ProposalText; + } + public void SendGroupActiveProposals(UUID groupID, UUID transactionID, GroupActiveProposals[] Proposals) + { + int i = 0; + foreach (GroupActiveProposals Proposal in Proposals) { GroupActiveProposalItemReplyPacket GAPIRP = new GroupActiveProposalItemReplyPacket(); - GAPIRP.AgentData.AgentID = agentID; + GAPIRP.AgentData.AgentID = AgentId; GAPIRP.AgentData.GroupID = groupID; GAPIRP.TransactionData.TransactionID = transactionID; GAPIRP.TransactionData.TotalNumItems = ((uint)i+1); GroupActiveProposalItemReplyPacket.ProposalDataBlock ProposalData = new GroupActiveProposalItemReplyPacket.ProposalDataBlock(); GAPIRP.ProposalData = new GroupActiveProposalItemReplyPacket.ProposalDataBlock[1]; - ProposalData.VoteCast = Utils.StringToBytes("false"); - ProposalData.VoteID = new UUID(VoteID[i]); - ProposalData.VoteInitiator = new UUID(VoteInitiator[i]); - ProposalData.Majority = (float)Convert.ToInt32(Majority[i]); - ProposalData.Quorum = Convert.ToInt32(Quorum[i]); - ProposalData.TerseDateID = Utils.StringToBytes(TerseDateID[i]); - ProposalData.StartDateTime = Utils.StringToBytes(StartDateTime[i]); - ProposalData.EndDateTime = Utils.StringToBytes(EndDateTime[i]); - ProposalData.ProposalText = Utils.StringToBytes(ProposalText[i]); + ProposalData.VoteCast = Utils.StringToBytes("false"); + ProposalData.VoteID = new UUID(Proposal.VoteID); + ProposalData.VoteInitiator = new UUID(Proposal.VoteInitiator); + ProposalData.Majority = (float)Convert.ToInt32(Proposal.Majority); + ProposalData.Quorum = Convert.ToInt32(Proposal.Quorum); + ProposalData.TerseDateID = Utils.StringToBytes(Proposal.TerseDateID); + ProposalData.StartDateTime = Utils.StringToBytes(Proposal.StartDateTime); + ProposalData.EndDateTime = Utils.StringToBytes(Proposal.EndDateTime); + ProposalData.ProposalText = Utils.StringToBytes(Proposal.ProposalText); ProposalData.AlreadyVoted = false; GAPIRP.ProposalData[i] = ProposalData; OutPacket(GAPIRP, ThrottleOutPacketType.Task); i++; - } - if (VoteID.Length == 0) + } + if (Proposals.Length == 0) { GroupActiveProposalItemReplyPacket GAPIRP = new GroupActiveProposalItemReplyPacket(); - GAPIRP.AgentData.AgentID = agentID; + GAPIRP.AgentData.AgentID = AgentId; GAPIRP.AgentData.GroupID = groupID; GAPIRP.TransactionData.TransactionID = transactionID; GAPIRP.TransactionData.TotalNumItems = 1; @@ -876,29 +886,41 @@ namespace OpenSim.Region.ClientStack.LindenUDP GAPIRP.ProposalData[0] = ProposalData; OutPacket(GAPIRP, ThrottleOutPacketType.Task); } - } - - public void SendGroupVoteHistory(IClientAPI sender,UUID agentID, UUID sessionID, UUID groupID, UUID transactionID, string[] VoteID, string[] VoteInitiator, string[] Majority, string[] Quorum, string[] TerseDateID, string[] StartDateTime, string[] EndDateTime, string[] VoteType, string[] VoteResult, string[] ProposalText) + } + public struct GroupVoteHistory { - int i = 0; - foreach (string voteID in VoteID) + public string VoteID; + public string VoteInitiator; + public string Majority; + public string Quorum; + public string TerseDateID; + public string StartDateTime; + public string EndDateTime; + public string VoteType; + public string VoteResult; + public string ProposalText; + } + public void SendGroupVoteHistory(UUID groupID, UUID transactionID, GroupVoteHistory[] Votes) + { + int i = 0; + foreach (GroupVoteHistory Vote in Votes) { - GroupVoteHistoryItemReplyPacket GVHIRP = new GroupVoteHistoryItemReplyPacket(); - - GVHIRP.AgentData.AgentID = agentID; + GroupVoteHistoryItemReplyPacket GVHIRP = new GroupVoteHistoryItemReplyPacket(); + + GVHIRP.AgentData.AgentID = AgentId; GVHIRP.AgentData.GroupID = groupID; GVHIRP.TransactionData.TransactionID = transactionID; - GVHIRP.TransactionData.TotalNumItems = ((uint)i+1); - GVHIRP.HistoryItemData.VoteID = new UUID(VoteID[i]); - GVHIRP.HistoryItemData.VoteInitiator = new UUID(VoteInitiator[i]); - GVHIRP.HistoryItemData.Majority = (float)Convert.ToInt32(Majority[i]); - GVHIRP.HistoryItemData.Quorum = Convert.ToInt32(Quorum[i]); - GVHIRP.HistoryItemData.TerseDateID = Utils.StringToBytes(TerseDateID[i]); - GVHIRP.HistoryItemData.StartDateTime = Utils.StringToBytes(StartDateTime[i]); - GVHIRP.HistoryItemData.EndDateTime = Utils.StringToBytes(EndDateTime[i]); - GVHIRP.HistoryItemData.VoteType = Utils.StringToBytes(VoteType[i]); - GVHIRP.HistoryItemData.VoteResult = Utils.StringToBytes(VoteResult[i]); - GVHIRP.HistoryItemData.ProposalText = Utils.StringToBytes(ProposalText[i]); + GVHIRP.TransactionData.TotalNumItems = ((uint)i+1); + GVHIRP.HistoryItemData.VoteID = new UUID(Vote.VoteID); + GVHIRP.HistoryItemData.VoteInitiator = new UUID(Vote.VoteInitiator); + GVHIRP.HistoryItemData.Majority = (float)Convert.ToInt32(Vote.Majority); + GVHIRP.HistoryItemData.Quorum = Convert.ToInt32(Vote.Quorum); + GVHIRP.HistoryItemData.TerseDateID = Utils.StringToBytes(Vote.TerseDateID); + GVHIRP.HistoryItemData.StartDateTime = Utils.StringToBytes(Vote.StartDateTime); + GVHIRP.HistoryItemData.EndDateTime = Utils.StringToBytes(Vote.EndDateTime); + GVHIRP.HistoryItemData.VoteType = Utils.StringToBytes(Vote.VoteType); + GVHIRP.HistoryItemData.VoteResult = Utils.StringToBytes(Vote.VoteResult); + GVHIRP.HistoryItemData.ProposalText = Utils.StringToBytes(Vote.ProposalText); GroupVoteHistoryItemReplyPacket.VoteItemBlock VoteItem = new GroupVoteHistoryItemReplyPacket.VoteItemBlock(); GVHIRP.VoteItem = new GroupVoteHistoryItemReplyPacket.VoteItemBlock[1]; VoteItem.CandidateID = UUID.Zero; @@ -908,11 +930,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP OutPacket(GVHIRP, ThrottleOutPacketType.Task); i++; } - if (VoteID.Length == 0) + if (Votes.Length == 0) { GroupVoteHistoryItemReplyPacket GVHIRP = new GroupVoteHistoryItemReplyPacket(); - GVHIRP.AgentData.AgentID = agentID; + GVHIRP.AgentData.AgentID = AgentId; GVHIRP.AgentData.GroupID = groupID; GVHIRP.TransactionData.TransactionID = transactionID; GVHIRP.TransactionData.TotalNumItems = 0; -- cgit v1.1 From 17efecd6c57c7abf6cc67bd9e347ec6176caab27 Mon Sep 17 00:00:00 2001 From: Melanie Date: Fri, 8 Jan 2010 05:29:29 +0000 Subject: Moving the new group data structures out of LLClientView into GroupData. The new methods are still not in IClientAPI, so some work remains to be done. --- .../Region/ClientStack/LindenUDP/LLClientView.cs | 78 ++++++++-------------- 1 file changed, 28 insertions(+), 50 deletions(-) (limited to 'OpenSim/Region/ClientStack') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 195e9aa..7d90a68 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -824,21 +824,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP gmp.ParamList[i++].Parameter = Util.StringToBytes256(val); } OutPacket(gmp, ThrottleOutPacketType.Task); - } - public struct GroupActiveProposals - { - public string VoteID; - public string VoteInitiator; - public string Majority; - public string Quorum; - public string TerseDateID; - public string StartDateTime; - public string EndDateTime; - public string ProposalText; } + public void SendGroupActiveProposals(UUID groupID, UUID transactionID, GroupActiveProposals[] Proposals) - { - int i = 0; + { + int i = 0; foreach (GroupActiveProposals Proposal in Proposals) { GroupActiveProposalItemReplyPacket GAPIRP = new GroupActiveProposalItemReplyPacket(); @@ -849,20 +839,20 @@ namespace OpenSim.Region.ClientStack.LindenUDP GAPIRP.TransactionData.TotalNumItems = ((uint)i+1); GroupActiveProposalItemReplyPacket.ProposalDataBlock ProposalData = new GroupActiveProposalItemReplyPacket.ProposalDataBlock(); GAPIRP.ProposalData = new GroupActiveProposalItemReplyPacket.ProposalDataBlock[1]; - ProposalData.VoteCast = Utils.StringToBytes("false"); - ProposalData.VoteID = new UUID(Proposal.VoteID); - ProposalData.VoteInitiator = new UUID(Proposal.VoteInitiator); - ProposalData.Majority = (float)Convert.ToInt32(Proposal.Majority); - ProposalData.Quorum = Convert.ToInt32(Proposal.Quorum); - ProposalData.TerseDateID = Utils.StringToBytes(Proposal.TerseDateID); - ProposalData.StartDateTime = Utils.StringToBytes(Proposal.StartDateTime); - ProposalData.EndDateTime = Utils.StringToBytes(Proposal.EndDateTime); + ProposalData.VoteCast = Utils.StringToBytes("false"); + ProposalData.VoteID = new UUID(Proposal.VoteID); + ProposalData.VoteInitiator = new UUID(Proposal.VoteInitiator); + ProposalData.Majority = (float)Convert.ToInt32(Proposal.Majority); + ProposalData.Quorum = Convert.ToInt32(Proposal.Quorum); + ProposalData.TerseDateID = Utils.StringToBytes(Proposal.TerseDateID); + ProposalData.StartDateTime = Utils.StringToBytes(Proposal.StartDateTime); + ProposalData.EndDateTime = Utils.StringToBytes(Proposal.EndDateTime); ProposalData.ProposalText = Utils.StringToBytes(Proposal.ProposalText); ProposalData.AlreadyVoted = false; GAPIRP.ProposalData[i] = ProposalData; OutPacket(GAPIRP, ThrottleOutPacketType.Task); i++; - } + } if (Proposals.Length == 0) { GroupActiveProposalItemReplyPacket GAPIRP = new GroupActiveProposalItemReplyPacket(); @@ -886,40 +876,28 @@ namespace OpenSim.Region.ClientStack.LindenUDP GAPIRP.ProposalData[0] = ProposalData; OutPacket(GAPIRP, ThrottleOutPacketType.Task); } - } - public struct GroupVoteHistory - { - public string VoteID; - public string VoteInitiator; - public string Majority; - public string Quorum; - public string TerseDateID; - public string StartDateTime; - public string EndDateTime; - public string VoteType; - public string VoteResult; - public string ProposalText; } + public void SendGroupVoteHistory(UUID groupID, UUID transactionID, GroupVoteHistory[] Votes) - { - int i = 0; + { + int i = 0; foreach (GroupVoteHistory Vote in Votes) { - GroupVoteHistoryItemReplyPacket GVHIRP = new GroupVoteHistoryItemReplyPacket(); - + GroupVoteHistoryItemReplyPacket GVHIRP = new GroupVoteHistoryItemReplyPacket(); + GVHIRP.AgentData.AgentID = AgentId; GVHIRP.AgentData.GroupID = groupID; GVHIRP.TransactionData.TransactionID = transactionID; - GVHIRP.TransactionData.TotalNumItems = ((uint)i+1); - GVHIRP.HistoryItemData.VoteID = new UUID(Vote.VoteID); - GVHIRP.HistoryItemData.VoteInitiator = new UUID(Vote.VoteInitiator); - GVHIRP.HistoryItemData.Majority = (float)Convert.ToInt32(Vote.Majority); - GVHIRP.HistoryItemData.Quorum = Convert.ToInt32(Vote.Quorum); - GVHIRP.HistoryItemData.TerseDateID = Utils.StringToBytes(Vote.TerseDateID); - GVHIRP.HistoryItemData.StartDateTime = Utils.StringToBytes(Vote.StartDateTime); - GVHIRP.HistoryItemData.EndDateTime = Utils.StringToBytes(Vote.EndDateTime); - GVHIRP.HistoryItemData.VoteType = Utils.StringToBytes(Vote.VoteType); - GVHIRP.HistoryItemData.VoteResult = Utils.StringToBytes(Vote.VoteResult); + GVHIRP.TransactionData.TotalNumItems = ((uint)i+1); + GVHIRP.HistoryItemData.VoteID = new UUID(Vote.VoteID); + GVHIRP.HistoryItemData.VoteInitiator = new UUID(Vote.VoteInitiator); + GVHIRP.HistoryItemData.Majority = (float)Convert.ToInt32(Vote.Majority); + GVHIRP.HistoryItemData.Quorum = Convert.ToInt32(Vote.Quorum); + GVHIRP.HistoryItemData.TerseDateID = Utils.StringToBytes(Vote.TerseDateID); + GVHIRP.HistoryItemData.StartDateTime = Utils.StringToBytes(Vote.StartDateTime); + GVHIRP.HistoryItemData.EndDateTime = Utils.StringToBytes(Vote.EndDateTime); + GVHIRP.HistoryItemData.VoteType = Utils.StringToBytes(Vote.VoteType); + GVHIRP.HistoryItemData.VoteResult = Utils.StringToBytes(Vote.VoteResult); GVHIRP.HistoryItemData.ProposalText = Utils.StringToBytes(Vote.ProposalText); GroupVoteHistoryItemReplyPacket.VoteItemBlock VoteItem = new GroupVoteHistoryItemReplyPacket.VoteItemBlock(); GVHIRP.VoteItem = new GroupVoteHistoryItemReplyPacket.VoteItemBlock[1]; @@ -927,7 +905,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP VoteItem.NumVotes = 0; //TODO: FIX THIS!!! VoteItem.VoteCast = Utils.StringToBytes("Yes"); GVHIRP.VoteItem[i] = VoteItem; - OutPacket(GVHIRP, ThrottleOutPacketType.Task); + OutPacket(GVHIRP, ThrottleOutPacketType.Task); i++; } if (Votes.Length == 0) -- cgit v1.1 From 063f106cbbc2a805dc210fe16c30741ab24876cb Mon Sep 17 00:00:00 2001 From: Melanie Date: Sat, 9 Jan 2010 14:17:44 +0000 Subject: Add functionality to estate "Allowed Users" and "Allowed Groups". Allowed users will be honored now, while allowed groups will not. This requires additional groups module integration work --- OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'OpenSim/Region/ClientStack') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 7d90a68..3d3c324 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -3912,7 +3912,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP return false; } - public void SendEstateManagersList(UUID invoice, UUID[] EstateManagers, uint estateID) + public void SendEstateList(UUID invoice, int code, UUID[] Data, uint estateID) + { EstateOwnerMessagePacket packet = new EstateOwnerMessagePacket(); packet.AgentData.TransactionID = UUID.Random(); @@ -3921,26 +3922,26 @@ namespace OpenSim.Region.ClientStack.LindenUDP packet.MethodData.Invoice = invoice; packet.MethodData.Method = Utils.StringToBytes("setaccess"); - EstateOwnerMessagePacket.ParamListBlock[] returnblock = new EstateOwnerMessagePacket.ParamListBlock[6 + EstateManagers.Length]; + EstateOwnerMessagePacket.ParamListBlock[] returnblock = new EstateOwnerMessagePacket.ParamListBlock[6 + Data.Length]; - for (int i = 0; i < (6 + EstateManagers.Length); i++) + for (int i = 0; i < (6 + Data.Length); i++) { returnblock[i] = new EstateOwnerMessagePacket.ParamListBlock(); } int j = 0; returnblock[j].Parameter = Utils.StringToBytes(estateID.ToString()); j++; - returnblock[j].Parameter = Utils.StringToBytes(((int)Constants.EstateAccessCodex.EstateManagers).ToString()); j++; + returnblock[j].Parameter = Utils.StringToBytes(code.ToString()); j++; returnblock[j].Parameter = Utils.StringToBytes("0"); j++; returnblock[j].Parameter = Utils.StringToBytes("0"); j++; returnblock[j].Parameter = Utils.StringToBytes("0"); j++; - returnblock[j].Parameter = Utils.StringToBytes(EstateManagers.Length.ToString()); j++; - for (int i = 0; i < EstateManagers.Length; i++) + returnblock[j].Parameter = Utils.StringToBytes(Data.Length.ToString()); j++; + for (int i = 0; i < Data.Length; i++) { - returnblock[j].Parameter = EstateManagers[i].GetBytes(); j++; + returnblock[j].Parameter = Data[i].GetBytes(); j++; } packet.ParamList = returnblock; - packet.Header.Reliable = false; + packet.Header.Reliable = true; OutPacket(packet, ThrottleOutPacketType.Task); } -- cgit v1.1 From 332463ca94c24bf6706cd40d4c2fa89b1cd13199 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sat, 9 Jan 2010 15:28:52 +0000 Subject: Fix up the weird Lindenish "setaccess" message. Talk about strange.... --- OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/ClientStack') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 3d3c324..515d0ea 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -3935,7 +3935,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP returnblock[j].Parameter = Utils.StringToBytes("0"); j++; returnblock[j].Parameter = Utils.StringToBytes("0"); j++; returnblock[j].Parameter = Utils.StringToBytes("0"); j++; - returnblock[j].Parameter = Utils.StringToBytes(Data.Length.ToString()); j++; + returnblock[j].Parameter = Utils.StringToBytes("0"); j++; + + j = 2; // Agents + if ((code & 2) != 0) + j = 3; // Groups + if ((code & 8) != 0) + j = 5; // Managers + + returnblock[j].Parameter = Utils.StringToBytes(Data.Length.ToString()); + j = 6; + for (int i = 0; i < Data.Length; i++) { returnblock[j].Parameter = Data[i].GetBytes(); j++; -- cgit v1.1