From 09d2c6fe5d86b56d58d18d74821762953fff5ce4 Mon Sep 17 00:00:00 2001 From: Dr Scofield Date: Wed, 25 Mar 2009 18:48:30 +0000 Subject: adding presence.ControllingClient.Kick(msg) to the brew. --- OpenSim/Region/Application/OpenSim.cs | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 0a79bc6..d27beff 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -319,7 +319,7 @@ namespace OpenSim string alert = null; if (cmdparams.Length > 4) - alert = String.Join(" ", cmdparams, 4, cmdparams.Length - 4); + alert = String.Format("\n{0}\n", String.Join(" ", cmdparams, 4, cmdparams.Length - 4)); IList agents = m_sceneManager.GetCurrentSceneAvatars(); @@ -330,21 +330,18 @@ namespace OpenSim if (presence.Firstname.ToLower().Contains(cmdparams[2].ToLower()) && presence.Lastname.ToLower().Contains(cmdparams[3].ToLower())) { - if (alert != null && !presence.IsChildAgent) - { - IDialogModule dialogModule = presence.Scene.RequestModuleInterface(); - if (dialogModule != null) - dialogModule.SendAlertToUser(presence.UUID, alert, true); - } - 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.Firstname, presence.Lastname, presence.UUID, regionInfo.RegionName)); + + // kick client... + if (alert != null) + presence.ControllingClient.Kick(alert); + else + presence.ControllingClient.Kick("\nThe OpenSim manager kicked you out.\n"); + // ...and close on our side presence.Scene.IncomingCloseAgent(presence.UUID); } } -- cgit v1.1