Implement god mode user freezing and unfreezing

See http://opensimulator.org/mantis/view.php?id=4356
Thanks Revolution
I performed a subsequent probable bug fix in this patch
mysql-performance
Justin Clark-Casey (justincc) 2009-11-27 19:23:51 +00:00
parent eaa424778b
commit e078fb2e71
2 changed files with 48 additions and 31 deletions

View File

@ -13610,7 +13610,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
if (handlerGodKickUser != null) if (handlerGodKickUser != null)
{ {
handlerGodKickUser(gkupack.UserInfo.GodID, gkupack.UserInfo.GodSessionID, handlerGodKickUser(gkupack.UserInfo.GodID, gkupack.UserInfo.GodSessionID,
gkupack.UserInfo.AgentID, (uint)0, gkupack.UserInfo.Reason); gkupack.UserInfo.AgentID, gkupack.UserInfo.KickFlags, gkupack.UserInfo.Reason,gkupack.UserInfo);
} }
} }
else else

View File

@ -98,7 +98,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Gods
/// <param name="godID">The person doing the kicking</param> /// <param name="godID">The person doing the kicking</param>
/// <param name="sessionID">The session of the person doing the kicking</param> /// <param name="sessionID">The session of the person doing the kicking</param>
/// <param name="agentID">the person that is being kicked</param> /// <param name="agentID">the person that is being kicked</param>
/// <param name="kickflags">This isn't used apparently</param> /// <param name="kickflags">Tells what to do to the user</param>
/// <param name="reason">The message to send to the user after it's been turned into a field</param> /// <param name="reason">The message to send to the user after it's been turned into a field</param>
public void KickUser(UUID godID, UUID sessionID, UUID agentID, uint kickflags, byte[] reason) public void KickUser(UUID godID, UUID sessionID, UUID agentID, uint kickflags, byte[] reason)
{ {
@ -109,6 +109,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Gods
if (sp != null || agentID == kickUserID) if (sp != null || agentID == kickUserID)
{ {
if (m_scene.Permissions.IsGod(godID)) if (m_scene.Permissions.IsGod(godID))
{
if (kickflags == 0)
{ {
if (agentID == kickUserID) if (agentID == kickUserID)
{ {
@ -145,6 +147,21 @@ namespace OpenSim.Region.CoreModules.Avatar.Gods
sp.ControllingClient.Close(); sp.ControllingClient.Close();
} }
} }
if (kickflags == 1)
{
sp.AllowMovement = false;
m_dialogModule.SendAlertToUser(agentID, Utils.BytesToString(reason));
m_dialogModule.SendAlertToUser(godID, "User Frozen");
}
if (kickflags == 2)
{
sp.AllowMovement = true;
m_dialogModule.SendAlertToUser(agentID, Utils.BytesToString(reason));
m_dialogModule.SendAlertToUser(godID, "User Unfrozen");
}
}
else else
{ {
m_dialogModule.SendAlertToUser(godID, "Kick request denied"); m_dialogModule.SendAlertToUser(godID, "Kick request denied");