From 944b118c622159c87e7f89c05892458d88797d58 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Sat, 24 Nov 2007 03:28:42 +0000 Subject: * Added a way for the Region master user to kick individual users from their sim with a custom message. Their client says, "You've been logged off of secondlife, and logs them off. * Added a way for the Region master user to kick *ALL* users from *ALL* their regions in the estate with a custom message. --- OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs') diff --git a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs index ca7ba7f..f46c199 100644 --- a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs +++ b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs @@ -1075,11 +1075,18 @@ namespace OpenSim.Region.ClientStack break; case PacketType.GodKickUser: - //GodKickUserPacket gkupack = (GodKickUserPacket) Pack; - //gkupack.UserInfo.GodID; - //gkupack.UserInfo.AgentID; - //gkupack.UserInfo.KickFlags; - //gkupack.UserInfo.Reason; + OpenSim.Framework.Console.MainLog.Instance.Verbose("CLIENT", "unhandled packet " + Pack.ToString()); + + GodKickUserPacket gkupack = (GodKickUserPacket) Pack; + + if (gkupack.UserInfo.GodSessionID == SessionId && this.AgentId == gkupack.UserInfo.GodID) + { + OnGodKickUser(gkupack.UserInfo.GodID, gkupack.UserInfo.GodSessionID, gkupack.UserInfo.AgentID, (uint) 0, gkupack.UserInfo.Reason); + } + else + { + SendAgentAlertMessage("Kick request denied", false); + } //KickUserPacket kupack = new KickUserPacket(); //KickUserPacket.UserInfoBlock kupackib = kupack.UserInfo; -- cgit v1.1