adding presence.ControllingClient.Kick(msg) to the brew.

0.6.5-rc1
Dr Scofield 2009-03-25 18:48:30 +00:00
parent 0419f29856
commit 09d2c6fe5d
1 changed files with 9 additions and 12 deletions

View File

@ -319,7 +319,7 @@ namespace OpenSim
string alert = null; string alert = null;
if (cmdparams.Length > 4) 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(); IList agents = m_sceneManager.GetCurrentSceneAvatars();
@ -330,21 +330,18 @@ namespace OpenSim
if (presence.Firstname.ToLower().Contains(cmdparams[2].ToLower()) && if (presence.Firstname.ToLower().Contains(cmdparams[2].ToLower()) &&
presence.Lastname.ToLower().Contains(cmdparams[3].ToLower())) presence.Lastname.ToLower().Contains(cmdparams[3].ToLower()))
{ {
if (alert != null && !presence.IsChildAgent)
{
IDialogModule dialogModule = presence.Scene.RequestModuleInterface<IDialogModule>();
if (dialogModule != null)
dialogModule.SendAlertToUser(presence.UUID, alert, true);
}
m_console.Notice( m_console.Notice(
String.Format( String.Format(
"Kicking user: {0,-16}{1,-16}{2,-37} in region: {3,-16}", "Kicking user: {0,-16}{1,-16}{2,-37} in region: {3,-16}",
presence.Firstname, presence.Firstname, presence.Lastname, presence.UUID, regionInfo.RegionName));
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); presence.Scene.IncomingCloseAgent(presence.UUID);
} }
} }