Merge branch 'justincc-master'
commit
7807b19a89
|
@ -48,6 +48,14 @@ namespace OpenSim.Services.UserAccountService
|
|||
{
|
||||
m_log.Debug("[GRID USER SERVICE]: Starting user grid service");
|
||||
|
||||
MainConsole.Instance.Commands.AddCommand(
|
||||
"Users", false,
|
||||
"show grid user",
|
||||
"show grid user <ID>",
|
||||
"Show grid user entry or entries that match or start with the given ID. This will normally be a UUID.",
|
||||
"This is for debug purposes to see what data is found for a particular user id.",
|
||||
HandleShowGridUser);
|
||||
|
||||
MainConsole.Instance.Commands.AddCommand(
|
||||
"Users", false,
|
||||
"show grid users online",
|
||||
|
@ -58,6 +66,31 @@ namespace OpenSim.Services.UserAccountService
|
|||
HandleShowGridUsersOnline);
|
||||
}
|
||||
|
||||
protected void HandleShowGridUser(string module, string[] cmdparams)
|
||||
{
|
||||
if (cmdparams.Length != 4)
|
||||
{
|
||||
MainConsole.Instance.Output("Usage: show grid user <UUID>");
|
||||
return;
|
||||
}
|
||||
|
||||
GridUserData[] data = m_Database.GetAll(cmdparams[3]);
|
||||
|
||||
foreach (GridUserData gu in data)
|
||||
{
|
||||
ConsoleDisplayList cdl = new ConsoleDisplayList();
|
||||
|
||||
cdl.AddRow("User ID", gu.UserID);
|
||||
|
||||
foreach (KeyValuePair<string,string> kvp in gu.Data)
|
||||
cdl.AddRow(kvp.Key, kvp.Value);
|
||||
|
||||
MainConsole.Instance.Output(cdl.ToString());
|
||||
}
|
||||
|
||||
MainConsole.Instance.OutputFormat("Entries: {0}", data.Length);
|
||||
}
|
||||
|
||||
protected void HandleShowGridUsersOnline(string module, string[] cmdparams)
|
||||
{
|
||||
// if (cmdparams.Length != 4)
|
||||
|
|
Loading…
Reference in New Issue