aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework')
-rw-r--r--OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs34
1 files changed, 34 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs
index 06f1712..48ec12f 100644
--- a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs
@@ -568,6 +568,13 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
568 protected void RegisterConsoleCmds() 568 protected void RegisterConsoleCmds()
569 { 569 {
570 MainConsole.Instance.Commands.AddCommand("Users", true, 570 MainConsole.Instance.Commands.AddCommand("Users", true,
571 "show name",
572 "show name <uuid>",
573 "Show the bindings between a single user UUID and a user name",
574 String.Empty,
575 HandleShowUser);
576
577 MainConsole.Instance.Commands.AddCommand("Users", true,
571 "show names", 578 "show names",
572 "show names", 579 "show names",
573 "Show the bindings between user UUIDs and user names", 580 "Show the bindings between user UUIDs and user names",
@@ -575,6 +582,33 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
575 HandleShowUsers); 582 HandleShowUsers);
576 } 583 }
577 584
585 private void HandleShowUser(string module, string[] cmd)
586 {
587 if (cmd.Length < 3)
588 {
589 MainConsole.Instance.OutputFormat("Usage: show name <uuid>");
590 return;
591 }
592
593 UUID userId;
594 if (!ConsoleUtil.TryParseConsoleUuid(MainConsole.Instance, cmd[2], out userId))
595 return;
596
597 string[] names;
598 if (!TryGetUserNames(userId, out names))
599 {
600 MainConsole.Instance.OutputFormat("No name known for user with id {0}", userId);
601 return;
602 }
603
604 ConsoleDisplayTable cdt = new ConsoleDisplayTable();
605 cdt.AddColumn("UUID", 36);
606 cdt.AddColumn("Name", 60);
607 cdt.AddRow(userId, string.Join(" ", names));
608
609 MainConsole.Instance.Output(cdt.ToString());
610 }
611
578 private void HandleShowUsers(string module, string[] cmd) 612 private void HandleShowUsers(string module, string[] cmd)
579 { 613 {
580 lock (m_UserCache) 614 lock (m_UserCache)