diff options
Diffstat (limited to 'OpenSim/Services/UserAccountService')
-rw-r--r-- | OpenSim/Services/UserAccountService/GridUserService.cs | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/OpenSim/Services/UserAccountService/GridUserService.cs b/OpenSim/Services/UserAccountService/GridUserService.cs index bef1691..bfc27b5 100644 --- a/OpenSim/Services/UserAccountService/GridUserService.cs +++ b/OpenSim/Services/UserAccountService/GridUserService.cs | |||
@@ -50,6 +50,14 @@ namespace OpenSim.Services.UserAccountService | |||
50 | 50 | ||
51 | MainConsole.Instance.Commands.AddCommand( | 51 | MainConsole.Instance.Commands.AddCommand( |
52 | "Users", false, | 52 | "Users", false, |
53 | "show grid user", | ||
54 | "show grid user <ID>", | ||
55 | "Show grid user entry or entries that match or start with the given ID. This will normally be a UUID.", | ||
56 | "This is for debug purposes to see what data is found for a particular user id.", | ||
57 | HandleShowGridUser); | ||
58 | |||
59 | MainConsole.Instance.Commands.AddCommand( | ||
60 | "Users", false, | ||
53 | "show grid users online", | 61 | "show grid users online", |
54 | "show grid users online", | 62 | "show grid users online", |
55 | "Show number of grid users registered as online.", | 63 | "Show number of grid users registered as online.", |
@@ -58,6 +66,31 @@ namespace OpenSim.Services.UserAccountService | |||
58 | HandleShowGridUsersOnline); | 66 | HandleShowGridUsersOnline); |
59 | } | 67 | } |
60 | 68 | ||
69 | protected void HandleShowGridUser(string module, string[] cmdparams) | ||
70 | { | ||
71 | if (cmdparams.Length != 4) | ||
72 | { | ||
73 | MainConsole.Instance.Output("Usage: show grid user <UUID>"); | ||
74 | return; | ||
75 | } | ||
76 | |||
77 | GridUserData[] data = m_Database.GetAll(cmdparams[3]); | ||
78 | |||
79 | foreach (GridUserData gu in data) | ||
80 | { | ||
81 | ConsoleDisplayList cdl = new ConsoleDisplayList(); | ||
82 | |||
83 | cdl.AddRow("User ID", gu.UserID); | ||
84 | |||
85 | foreach (KeyValuePair<string,string> kvp in gu.Data) | ||
86 | cdl.AddRow(kvp.Key, kvp.Value); | ||
87 | |||
88 | MainConsole.Instance.Output(cdl.ToString()); | ||
89 | } | ||
90 | |||
91 | MainConsole.Instance.OutputFormat("Entries: {0}", data.Length); | ||
92 | } | ||
93 | |||
61 | protected void HandleShowGridUsersOnline(string module, string[] cmdparams) | 94 | protected void HandleShowGridUsersOnline(string module, string[] cmdparams) |
62 | { | 95 | { |
63 | // if (cmdparams.Length != 4) | 96 | // if (cmdparams.Length != 4) |