diff options
author | Dahlia Trimble | 2008-06-22 04:36:34 +0000 |
---|---|---|
committer | Dahlia Trimble | 2008-06-22 04:36:34 +0000 |
commit | 55e7e7fc744f645945d458829b32ee718943112c (patch) | |
tree | ba61f9433b9aff79b9faf796307821fc80762f65 /OpenSim/Region/Application/OpenSim.cs | |
parent | * archive each object as a separate xml file rather than put them all in one ... (diff) | |
download | opensim-SC_OLD-55e7e7fc744f645945d458829b32ee718943112c.zip opensim-SC_OLD-55e7e7fc744f645945d458829b32ee718943112c.tar.gz opensim-SC_OLD-55e7e7fc744f645945d458829b32ee718943112c.tar.bz2 opensim-SC_OLD-55e7e7fc744f645945d458829b32ee718943112c.tar.xz |
Added an experimental "kickuser" console command to log off a user by name.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Application/OpenSim.cs | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 4e69b9e..600566b 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs | |||
@@ -254,6 +254,7 @@ namespace OpenSim | |||
254 | m_console.Notice("edit-scale [prim name] [x] [y] [z] - resize given prim"); | 254 | m_console.Notice("edit-scale [prim name] [x] [y] [z] - resize given prim"); |
255 | m_console.Notice("export-map [filename] - save image of world map"); | 255 | m_console.Notice("export-map [filename] - save image of world map"); |
256 | m_console.Notice("force-update - force an update of prims in the scene"); | 256 | m_console.Notice("force-update - force an update of prims in the scene"); |
257 | m_console.Notice("kickuser [first] [last] - attempts to log off a user from any region we are serving"); | ||
257 | m_console.Notice("load-xml [filename] - load prims from XML (DEPRECATED)"); | 258 | m_console.Notice("load-xml [filename] - load prims from XML (DEPRECATED)"); |
258 | m_console.Notice("load-xml2 [filename] - load prims from XML using version 2 format"); | 259 | m_console.Notice("load-xml2 [filename] - load prims from XML using version 2 format"); |
259 | m_console.Notice("restart - disconnects all clients and restarts the sims in the instance."); | 260 | m_console.Notice("restart - disconnects all clients and restarts the sims in the instance."); |
@@ -534,6 +535,36 @@ namespace OpenSim | |||
534 | } | 535 | } |
535 | } | 536 | } |
536 | break; | 537 | break; |
538 | |||
539 | case "kickuser": // attempts to log off a user from any region we are serving | ||
540 | if (cmdparams.Length < 2 ) | ||
541 | break; | ||
542 | |||
543 | string firstName = cmdparams[0]; | ||
544 | string lastName = cmdparams[1]; | ||
545 | |||
546 | IList agents = m_sceneManager.GetCurrentSceneAvatars(); | ||
547 | |||
548 | foreach (ScenePresence presence in agents) | ||
549 | { | ||
550 | RegionInfo regionInfo = m_sceneManager.GetRegionInfo(presence.RegionHandle); | ||
551 | |||
552 | if ( presence.Firstname.ToLower().Equals(firstName) && presence.Lastname.ToLower().Equals(lastName)) | ||
553 | { | ||
554 | m_console.Notice( | ||
555 | String.Format( | ||
556 | "Found user: {0,-16}{1,-16}{2,-37} in region: {3,-16}", | ||
557 | presence.Firstname, | ||
558 | presence.Lastname, | ||
559 | presence.UUID, | ||
560 | regionInfo.RegionName)); | ||
561 | |||
562 | presence.Scene.CloseConnection(regionInfo.RegionHandle, presence.UUID); | ||
563 | } | ||
564 | } | ||
565 | m_console.Notice(""); | ||
566 | break; | ||
567 | |||
537 | case "modules": | 568 | case "modules": |
538 | if (cmdparams.Length > 0) | 569 | if (cmdparams.Length > 0) |
539 | { | 570 | { |