aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDr Scofield2009-03-25 18:48:30 +0000
committerDr Scofield2009-03-25 18:48:30 +0000
commit09d2c6fe5d86b56d58d18d74821762953fff5ce4 (patch)
treed2caf8219e4c3f4dac33fb3afd88715280ce9aa3
parent enhances the console command "kick user" with an optional alert (diff)
downloadopensim-SC_OLD-09d2c6fe5d86b56d58d18d74821762953fff5ce4.zip
opensim-SC_OLD-09d2c6fe5d86b56d58d18d74821762953fff5ce4.tar.gz
opensim-SC_OLD-09d2c6fe5d86b56d58d18d74821762953fff5ce4.tar.bz2
opensim-SC_OLD-09d2c6fe5d86b56d58d18d74821762953fff5ce4.tar.xz
adding presence.ControllingClient.Kick(msg) to the brew.
-rw-r--r--OpenSim/Region/Application/OpenSim.cs21
1 files changed, 9 insertions, 12 deletions
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
319 319
320 string alert = null; 320 string alert = null;
321 if (cmdparams.Length > 4) 321 if (cmdparams.Length > 4)
322 alert = String.Join(" ", cmdparams, 4, cmdparams.Length - 4); 322 alert = String.Format("\n{0}\n", String.Join(" ", cmdparams, 4, cmdparams.Length - 4));
323 323
324 IList agents = m_sceneManager.GetCurrentSceneAvatars(); 324 IList agents = m_sceneManager.GetCurrentSceneAvatars();
325 325
@@ -330,21 +330,18 @@ namespace OpenSim
330 if (presence.Firstname.ToLower().Contains(cmdparams[2].ToLower()) && 330 if (presence.Firstname.ToLower().Contains(cmdparams[2].ToLower()) &&
331 presence.Lastname.ToLower().Contains(cmdparams[3].ToLower())) 331 presence.Lastname.ToLower().Contains(cmdparams[3].ToLower()))
332 { 332 {
333 if (alert != null && !presence.IsChildAgent)
334 {
335 IDialogModule dialogModule = presence.Scene.RequestModuleInterface<IDialogModule>();
336 if (dialogModule != null)
337 dialogModule.SendAlertToUser(presence.UUID, alert, true);
338 }
339
340 m_console.Notice( 333 m_console.Notice(
341 String.Format( 334 String.Format(
342 "Kicking user: {0,-16}{1,-16}{2,-37} in region: {3,-16}", 335 "Kicking user: {0,-16}{1,-16}{2,-37} in region: {3,-16}",
343 presence.Firstname, 336 presence.Firstname, presence.Lastname, presence.UUID, regionInfo.RegionName));
344 presence.Lastname, 337
345 presence.UUID, 338 // kick client...
346 regionInfo.RegionName)); 339 if (alert != null)
340 presence.ControllingClient.Kick(alert);
341 else
342 presence.ControllingClient.Kick("\nThe OpenSim manager kicked you out.\n");
347 343
344 // ...and close on our side
348 presence.Scene.IncomingCloseAgent(presence.UUID); 345 presence.Scene.IncomingCloseAgent(presence.UUID);
349 } 346 }
350 } 347 }