From cbc3501246d5250788634f6d1b6fbd1f60661c85 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 5 Jan 2017 18:02:59 +0000 Subject: a few changes to Gods ( ie administrators) control --- .../Region/ClientStack/Linden/UDP/LLClientView.cs | 48 ++++++++++++---------- 1 file changed, 26 insertions(+), 22 deletions(-) (limited to 'OpenSim/Region/ClientStack/Linden/UDP') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 55050d9..27ca740 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -10455,6 +10455,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP private bool HandleRequestGodlikePowers(IClientAPI sender, Packet Pack) { RequestGodlikePowersPacket rglpPack = (RequestGodlikePowersPacket)Pack; + + if (rglpPack.AgentData.SessionID != SessionId || + rglpPack.AgentData.AgentID != AgentId) + return true; + RequestGodlikePowersPacket.RequestBlockBlock rblock = rglpPack.RequestBlock; UUID token = rblock.Token; @@ -10464,7 +10469,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (handlerReqGodlikePowers != null) { - handlerReqGodlikePowers(ablock.AgentID, ablock.SessionID, token, rblock.Godlike, this); + handlerReqGodlikePowers(ablock.AgentID, ablock.SessionID, token, rblock.Godlike); } return true; @@ -10475,6 +10480,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP GodUpdateRegionInfoPacket GodUpdateRegionInfo = (GodUpdateRegionInfoPacket)Packet; + if (GodUpdateRegionInfo.AgentData.SessionID != SessionId || + GodUpdateRegionInfo.AgentData.AgentID != AgentId) + return true; + GodUpdateRegionInfoUpdate handlerGodUpdateRegionInfo = OnGodUpdateRegionInfoUpdate; if (handlerGodUpdateRegionInfo != null) { @@ -10508,6 +10517,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP GodlikeMessagePacket GodlikeMessage = (GodlikeMessagePacket)Packet; + if (GodlikeMessage.AgentData.SessionID != SessionId || + GodlikeMessage.AgentData.AgentID != AgentId) + return true; + GodlikeMessage handlerGodlikeMessage = onGodlikeMessage; if (handlerGodlikeMessage != null) { @@ -10524,6 +10537,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP { StateSavePacket SaveStateMessage = (StateSavePacket)Packet; + + if (SaveStateMessage.AgentData.SessionID != SessionId || + SaveStateMessage.AgentData.AgentID != AgentId) + return true; + SaveStateHandler handlerSaveStatePacket = OnSaveState; if (handlerSaveStatePacket != null) { @@ -10537,30 +10555,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP { GodKickUserPacket gkupack = (GodKickUserPacket)Pack; - if (gkupack.UserInfo.GodSessionID == SessionId && AgentId == gkupack.UserInfo.GodID) - { - GodKickUser handlerGodKickUser = OnGodKickUser; - if (handlerGodKickUser != null) - { - handlerGodKickUser(gkupack.UserInfo.GodID, gkupack.UserInfo.GodSessionID, - gkupack.UserInfo.AgentID, gkupack.UserInfo.KickFlags, gkupack.UserInfo.Reason); - } - } - else + if (gkupack.UserInfo.GodSessionID != SessionId || + gkupack.UserInfo.GodID != AgentId) + return true; + + GodKickUser handlerGodKickUser = OnGodKickUser; + if (handlerGodKickUser != null) { - SendAgentAlertMessage("Kick request denied", false); + handlerGodKickUser(gkupack.UserInfo.GodID, gkupack.UserInfo.AgentID, gkupack.UserInfo.KickFlags, gkupack.UserInfo.Reason); } - //KickUserPacket kupack = new KickUserPacket(); - //KickUserPacket.UserInfoBlock kupackib = kupack.UserInfo; - - //kupack.UserInfo.AgentID = gkupack.UserInfo.AgentID; - //kupack.UserInfo.SessionID = gkupack.UserInfo.GodSessionID; - - //kupack.TargetBlock.TargetIP = (uint)0; - //kupack.TargetBlock.TargetPort = (ushort)0; - //kupack.UserInfo.Reason = gkupack.UserInfo.Reason; - //OutPacket(kupack, ThrottleOutPacketType.Task); return true; } #endregion GodPackets -- cgit v1.1