aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application/OpenSim.cs
diff options
context:
space:
mode:
authorMelanie2012-08-23 01:41:47 +0100
committerMelanie2012-08-23 01:41:47 +0100
commitf8603a215d142f3b83a5ff1dc022b716b3e48f99 (patch)
tree49971f8e12efcfea18b4b2fdb6bd54c904d3f52c /OpenSim/Region/Application/OpenSim.cs
parentMerge branch 'avination' into careminster (diff)
parentthis should be an if-else block in case the non-phys min/max are smaller than... (diff)
downloadopensim-SC-f8603a215d142f3b83a5ff1dc022b716b3e48f99.zip
opensim-SC-f8603a215d142f3b83a5ff1dc022b716b3e48f99.tar.gz
opensim-SC-f8603a215d142f3b83a5ff1dc022b716b3e48f99.tar.bz2
opensim-SC-f8603a215d142f3b83a5ff1dc022b716b3e48f99.tar.xz
Merge branch 'master' into careminster
Conflicts: OpenSim/Framework/IClientAPI.cs OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs OpenSim/Region/Framework/Scenes/Scene.cs OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
Diffstat (limited to 'OpenSim/Region/Application/OpenSim.cs')
-rw-r--r--OpenSim/Region/Application/OpenSim.cs25
1 files changed, 18 insertions, 7 deletions
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index 6255515..9c7598a 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -35,6 +35,7 @@ using System.Text;
35using System.Text.RegularExpressions; 35using System.Text.RegularExpressions;
36using System.Timers; 36using System.Timers;
37using log4net; 37using log4net;
38using NDesk.Options;
38using Nini.Config; 39using Nini.Config;
39using OpenMetaverse; 40using OpenMetaverse;
40using OpenSim.Framework; 41using OpenSim.Framework;
@@ -310,8 +311,11 @@ namespace OpenSim
310 "Change the scale of a named prim", HandleEditScale); 311 "Change the scale of a named prim", HandleEditScale);
311 312
312 m_console.Commands.AddCommand("Users", false, "kick user", 313 m_console.Commands.AddCommand("Users", false, "kick user",
313 "kick user <first> <last> [message]", 314 "kick user <first> <last> [--force] [message]",
314 "Kick a user off the simulator", KickUserCommand); 315 "Kick a user off the simulator",
316 "The --force option will kick the user without any checks to see whether it's already in the process of closing\n"
317 + "Only use this option if you are sure the avatar is inactive and a normal kick user operation does not removed them",
318 KickUserCommand);
315 319
316 m_console.Commands.AddCommand("Users", false, "show users", 320 m_console.Commands.AddCommand("Users", false, "show users",
317 "show users [full]", 321 "show users [full]",
@@ -416,6 +420,7 @@ namespace OpenSim
416 { 420 {
417 RunCommandScript(m_shutdownCommandsFile); 421 RunCommandScript(m_shutdownCommandsFile);
418 } 422 }
423
419 base.ShutdownSpecific(); 424 base.ShutdownSpecific();
420 } 425 }
421 426
@@ -453,11 +458,17 @@ namespace OpenSim
453 /// <param name="cmdparams">name of avatar to kick</param> 458 /// <param name="cmdparams">name of avatar to kick</param>
454 private void KickUserCommand(string module, string[] cmdparams) 459 private void KickUserCommand(string module, string[] cmdparams)
455 { 460 {
456 if (cmdparams.Length < 4) 461 bool force = false;
462
463 OptionSet options = new OptionSet().Add("f|force", delegate (string v) { force = v != null; });
464
465 List<string> mainParams = options.Parse(cmdparams);
466
467 if (mainParams.Count < 4)
457 return; 468 return;
458 469
459 string alert = null; 470 string alert = null;
460 if (cmdparams.Length > 4) 471 if (mainParams.Count > 4)
461 alert = String.Format("\n{0}\n", String.Join(" ", cmdparams, 4, cmdparams.Length - 4)); 472 alert = String.Format("\n{0}\n", String.Join(" ", cmdparams, 4, cmdparams.Length - 4));
462 473
463 IList agents = SceneManager.GetCurrentSceneAvatars(); 474 IList agents = SceneManager.GetCurrentSceneAvatars();
@@ -466,8 +477,8 @@ namespace OpenSim
466 { 477 {
467 RegionInfo regionInfo = presence.Scene.RegionInfo; 478 RegionInfo regionInfo = presence.Scene.RegionInfo;
468 479
469 if (presence.Firstname.ToLower().Contains(cmdparams[2].ToLower()) && 480 if (presence.Firstname.ToLower().Contains(mainParams[2].ToLower()) &&
470 presence.Lastname.ToLower().Contains(cmdparams[3].ToLower())) 481 presence.Lastname.ToLower().Contains(mainParams[3].ToLower()))
471 { 482 {
472 MainConsole.Instance.Output( 483 MainConsole.Instance.Output(
473 String.Format( 484 String.Format(
@@ -480,7 +491,7 @@ namespace OpenSim
480 else 491 else
481 presence.ControllingClient.Kick("\nYou have been logged out by an administrator.\n"); 492 presence.ControllingClient.Kick("\nYou have been logged out by an administrator.\n");
482 493
483 presence.Scene.IncomingCloseAgent(presence.UUID); 494 presence.Scene.IncomingCloseAgent(presence.UUID, force);
484 } 495 }
485 } 496 }
486 497