From 2fe9915951f19c0209b8e6e6a1e14f9e3d7b8028 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Mon, 9 Feb 2009 16:34:21 +0000 Subject: Reinstate the KickUserCommand handler, which was commented out by another dev whiel I was putting the reference to it back in --- OpenSim/Region/Application/OpenSim.cs | 52 +++++++++++++++++------------------ 1 file changed, 26 insertions(+), 26 deletions(-) (limited to 'OpenSim/Region/Application') diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index fff8a81..4d3dcbb 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -321,32 +321,32 @@ namespace OpenSim #region Console Commands - // private void KickUserCommand(string module, string[] cmdparams) - // { - // if (cmdparams.Length < 4) - // return; - - // IList agents = m_sceneManager.GetCurrentSceneAvatars(); - - // foreach (ScenePresence presence in agents) - // { - // RegionInfo regionInfo = m_sceneManager.GetRegionInfo(presence.RegionHandle); - - // if (presence.Firstname.ToLower().Contains(cmdparams[2].ToLower()) && presence.Lastname.ToLower().Contains(cmdparams[3].ToLower())) - // { - // m_console.Notice( - // String.Format( - // "Kicking user: {0,-16}{1,-16}{2,-37} in region: {3,-16}", - // presence.Firstname, - // presence.Lastname, - // presence.UUID, - // regionInfo.RegionName)); - - // presence.Scene.IncomingCloseAgent(presence.UUID); - // } - // } - // m_console.Notice(""); - // } + private void KickUserCommand(string module, string[] cmdparams) + { + if (cmdparams.Length < 4) + return; + + IList agents = m_sceneManager.GetCurrentSceneAvatars(); + + foreach (ScenePresence presence in agents) + { + RegionInfo regionInfo = m_sceneManager.GetRegionInfo(presence.RegionHandle); + + if (presence.Firstname.ToLower().Contains(cmdparams[2].ToLower()) && presence.Lastname.ToLower().Contains(cmdparams[3].ToLower())) + { + m_console.Notice( + String.Format( + "Kicking user: {0,-16}{1,-16}{2,-37} in region: {3,-16}", + presence.Firstname, + presence.Lastname, + presence.UUID, + regionInfo.RegionName)); + + presence.Scene.IncomingCloseAgent(presence.UUID); + } + } + m_console.Notice(""); + } /// /// Run an optional startup list of commands -- cgit v1.1