After hours of searching for a bug, it works - User accounts in sandbox mode, currently they are not persistent between restarts (ie restarting opensim.exe) but should be persistent between sessions (login/ logout).

Use the -account command line arg to enable them and then create new accounts through the web interface
This commit is contained in:
MW
2007-03-28 18:10:52 +00:00
parent c3ae2a721b
commit 35fa85069e
15 changed files with 216 additions and 33 deletions

View File

@@ -66,11 +66,12 @@ namespace OpenSim.UserServer
private int m_simPort;
private string m_simAddr;
public LoginServer(IGridServer gridServer, string simAddr, int simPort)
public LoginServer(IGridServer gridServer, string simAddr, int simPort , bool useAccounts)
{
m_gridServer = gridServer;
m_simPort = simPort;
m_simAddr = simAddr;
this.userAccounts = useAccounts;
}
// InitializeLogin: initialize the login
@@ -395,6 +396,15 @@ namespace OpenSim.UserServer
return Regex.Replace(BitConverter.ToString(encodedBytes), "-", "").ToLower();
}
public bool CreateUserAccount(string firstName, string lastName, string password)
{
Console.WriteLine("creating new user account");
string mdPassword = EncodePassword(password);
Console.WriteLine("with password: " + mdPassword);
this.userManager.CreateNewProfile(firstName, lastName, mdPassword);
return true;
}
//IUserServer implementation
public AgentInventory RequestAgentsInventory(LLUUID agentID)
{
@@ -407,6 +417,11 @@ namespace OpenSim.UserServer
return aInventory;
}
public bool UpdateAgentsInventory(LLUUID agentID, AgentInventory inventory)
{
return true;
}
public void SetServerInfo(string ServerUrl, string SendKey, string RecvKey)
{