From a5860ad438885cbf76a36dc7958947355522b8cf Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Sat, 21 Jun 2008 03:29:08 +0000 Subject: * Adds Region ban capability to Regions. You access this by going to World->Region/Estate. Then on the Estate tab, at the lower right hand corner, clicking the 'Add' button and picking an avatar. * It only persists across reboots for the mySQL datastore currently. * Currently have stubs in the other datastores. --- .../Region/ClientStack/LindenUDP/LLClientView.cs | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) (limited to 'OpenSim/Region/ClientStack') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 3b3ec3d..facee5c 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -2570,6 +2570,51 @@ namespace OpenSim.Region.ClientStack.LindenUDP this.OutPacket(packet, ThrottleOutPacketType.Task); } + public void sendBannedUserList(LLUUID invoice, List banlist, uint estateID) + { + RegionBanListItem[] bl = banlist.ToArray(); + + LLUUID[] BannedUsers = new LLUUID[bl.Length]; + + + for (int i = 0; i < bl.Length; i++) + { + if (bl[i] == null) + continue; + BannedUsers[i] = bl[i].bannedUUID; + } + + EstateOwnerMessagePacket packet = new EstateOwnerMessagePacket(); + packet.AgentData.TransactionID = LLUUID.Random(); + packet.AgentData.AgentID = this.AgentId; + packet.AgentData.SessionID = this.SessionId; + packet.MethodData.Invoice = invoice; + packet.MethodData.Method = Helpers.StringToField("setaccess"); + + EstateOwnerMessagePacket.ParamListBlock[] returnblock = new EstateOwnerMessagePacket.ParamListBlock[6 + BannedUsers.Length]; + + for (int i = 0; i < (6 + BannedUsers.Length); i++) + { + returnblock[i] = new EstateOwnerMessagePacket.ParamListBlock(); + } + int j = 0; + + returnblock[j].Parameter = Helpers.StringToField(estateID.ToString()); j++; + returnblock[j].Parameter = Helpers.StringToField(((int)Constants.EstateAccessCodex.EstateBans).ToString()); j++; + returnblock[j].Parameter = Helpers.StringToField("0"); j++; + returnblock[j].Parameter = Helpers.StringToField("0"); j++; + returnblock[j].Parameter = Helpers.StringToField(BannedUsers.Length.ToString()); j++; + returnblock[j].Parameter = Helpers.StringToField("0"); j++; + + for (int i = 0; i < BannedUsers.Length; i++) + { + returnblock[j].Parameter = BannedUsers[i].GetBytes(); j++; + } + packet.ParamList = returnblock; + packet.Header.Reliable = false; + this.OutPacket(packet, ThrottleOutPacketType.Task); + } + public void sendRegionInfoToEstateMenu(RegionInfoForEstateMenuArgs args) { RegionInfoPacket rinfopack = new RegionInfoPacket(); -- cgit v1.1