Possible my last ever OpenSim/OGS contribution (if I continue to feel like this):
Re-added a CLI "create user" command to the userserver, only currently works if using DB4o as the database provider. Added Xml config files to both the UserServer and Gridserver (UserServerConfig.xml and GridServerConfig.xml), so that the database provider can be set in it. (both currently default to DB4o , so maybe Adam will want to change it back to defaulting to MySQL)zircon^2
parent
eaf4b3f1a9
commit
b2d588ed1c
|
@ -1,5 +1,5 @@
|
||||||
Microsoft Visual Studio Solution File, Format Version 9.00
|
Microsoft Visual Studio Solution File, Format Version 9.00
|
||||||
# Visual Studio 2005
|
# Visual C# Express 2005
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenUser.Config.UserConfigDb4o", "OpenGridServices\OpenUser.Config\UserConfigDb4o\OpenUser.Config.UserConfigDb4o.csproj", "{7E494328-0000-0000-0000-000000000000}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenUser.Config.UserConfigDb4o", "OpenGridServices\OpenUser.Config\UserConfigDb4o\OpenUser.Config.UserConfigDb4o.csproj", "{7E494328-0000-0000-0000-000000000000}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenGridServices.AssetServer", "OpenGridServices\OpenGridServices.AssetServer\OpenGridServices.AssetServer.csproj", "{0021261B-0000-0000-0000-000000000000}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenGridServices.AssetServer", "OpenGridServices\OpenGridServices.AssetServer\OpenGridServices.AssetServer.csproj", "{0021261B-0000-0000-0000-000000000000}"
|
||||||
|
@ -25,70 +25,61 @@ EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenGrid.Framework.Data.MySQL", "OpenGridServices\OpenGrid.Framework.Data.MySQL\OpenGrid.Framework.Data.MySQL.csproj", "{0F3C3AC1-0000-0000-0000-000000000000}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenGrid.Framework.Data.MySQL", "OpenGridServices\OpenGrid.Framework.Data.MySQL\OpenGrid.Framework.Data.MySQL.csproj", "{0F3C3AC1-0000-0000-0000-000000000000}"
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
Release|Any CPU = Release|Any CPU
|
Release|Any CPU = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ProjectDependencies) = postSolution
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
({1E3F341A-0000-0000-0000-000000000000}).4 = ({62CDF671-0000-0000-0000-000000000000})
|
{7E494328-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
({39BD9497-0000-0000-0000-000000000000}).3 = ({62CDF671-0000-0000-0000-000000000000})
|
{7E494328-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
({21BFC8E2-0000-0000-0000-000000000000}).6 = ({62CDF671-0000-0000-0000-000000000000})
|
{7E494328-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
({21BFC8E2-0000-0000-0000-000000000000}).7 = ({7924FD35-0000-0000-0000-000000000000})
|
{7E494328-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
({0A563AC1-0000-0000-0000-000000000000}).3 = ({62CDF671-0000-0000-0000-000000000000})
|
{0021261B-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
({66591469-0000-0000-0000-000000000000}).5 = ({62CDF671-0000-0000-0000-000000000000})
|
{0021261B-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
({0F3C3AC1-0000-0000-0000-000000000000}).3 = ({62CDF671-0000-0000-0000-000000000000})
|
{0021261B-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
EndGlobalSection
|
{0021261B-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
{B0027747-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{7E494328-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{B0027747-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{7E494328-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{B0027747-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{7E494328-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{B0027747-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{7E494328-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
{1E3F341A-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{0021261B-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{1E3F341A-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{0021261B-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{1E3F341A-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{0021261B-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{1E3F341A-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{0021261B-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
{39BD9497-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{B0027747-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{39BD9497-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{B0027747-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{39BD9497-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{B0027747-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{39BD9497-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{B0027747-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
{E141F4EE-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{1E3F341A-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{E141F4EE-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{1E3F341A-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{E141F4EE-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{1E3F341A-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{E141F4EE-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{1E3F341A-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
{7924FD35-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{39BD9497-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{7924FD35-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{39BD9497-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{7924FD35-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{39BD9497-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{7924FD35-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{39BD9497-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
{21BFC8E2-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{E141F4EE-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{21BFC8E2-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{E141F4EE-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{21BFC8E2-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{E141F4EE-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{21BFC8E2-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{E141F4EE-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
{0A563AC1-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{7924FD35-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{0A563AC1-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{7924FD35-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{0A563AC1-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{7924FD35-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{0A563AC1-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{7924FD35-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
{62CDF671-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{21BFC8E2-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{62CDF671-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{21BFC8E2-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{62CDF671-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{21BFC8E2-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{62CDF671-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{21BFC8E2-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
{66591469-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{0A563AC1-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{66591469-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{0A563AC1-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{66591469-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{0A563AC1-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{66591469-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{0A563AC1-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
{0F3C3AC1-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{62CDF671-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{0F3C3AC1-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{62CDF671-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{0F3C3AC1-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{62CDF671-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{0F3C3AC1-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{62CDF671-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
EndGlobalSection
|
||||||
{66591469-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
{66591469-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
HideSolutionNode = FALSE
|
||||||
{66591469-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
EndGlobalSection
|
||||||
{66591469-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{0F3C3AC1-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{0F3C3AC1-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{0F3C3AC1-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{0F3C3AC1-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
|
||||||
HideSolutionNode = FALSE
|
|
||||||
EndGlobalSection
|
|
||||||
EndGlobal
|
EndGlobal
|
||||||
|
|
|
@ -24,8 +24,8 @@
|
||||||
<include name="System.Xml.dll" />
|
<include name="System.Xml.dll" />
|
||||||
<include name="../../../bin/libsecondlife.dll" />
|
<include name="../../../bin/libsecondlife.dll" />
|
||||||
<include name="../../../bin/Db4objects.Db4o.dll" />
|
<include name="../../../bin/Db4objects.Db4o.dll" />
|
||||||
<include name="OpenSim.Framework.dll" />
|
<include name="../../../bin/OpenSim.Framework.dll" />
|
||||||
<include name="OpenSim.Framework.Console.dll" />
|
<include name="../../../bin/OpenSim.Framework.Console.dll" />
|
||||||
</references>
|
</references>
|
||||||
</csc>
|
</csc>
|
||||||
<echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../../bin/" />
|
<echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../../bin/" />
|
||||||
|
|
|
@ -81,7 +81,7 @@ namespace OpenGrid.Framework.Data.DB4o
|
||||||
/// <param name="row">The profile to add</param>
|
/// <param name="row">The profile to add</param>
|
||||||
/// <returns>Successful?</returns>
|
/// <returns>Successful?</returns>
|
||||||
public bool AddRow(UserProfileData row)
|
public bool AddRow(UserProfileData row)
|
||||||
{
|
{
|
||||||
if (userProfiles.ContainsKey(row.UUID))
|
if (userProfiles.ContainsKey(row.UUID))
|
||||||
{
|
{
|
||||||
userProfiles[row.UUID] = row;
|
userProfiles[row.UUID] = row;
|
||||||
|
|
|
@ -66,6 +66,11 @@ namespace OpenGrid.Framework.Data.DB4o
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void addNewUserProfile(UserProfileData user)
|
||||||
|
{
|
||||||
|
manager.AddRow(user);
|
||||||
|
}
|
||||||
|
|
||||||
public bool moneyTransferRequest(LLUUID from, LLUUID to, uint amount)
|
public bool moneyTransferRequest(LLUUID from, LLUUID to, uint amount)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -121,6 +121,10 @@ namespace OpenGrid.Framework.Data.MySQL
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void addNewUserProfile(UserProfileData user)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public bool moneyTransferRequest(LLUUID from, LLUUID to, uint amount)
|
public bool moneyTransferRequest(LLUUID from, LLUUID to, uint amount)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -51,6 +51,12 @@ namespace OpenGrid.Framework.Data
|
||||||
/// <returns>The current agent session</returns>
|
/// <returns>The current agent session</returns>
|
||||||
UserAgentData getAgentByName(string fname, string lname);
|
UserAgentData getAgentByName(string fname, string lname);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Adds a new User profile to the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="user">UserProfile to add</param>
|
||||||
|
void addNewUserProfile(UserProfileData user);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Attempts to move currency units between accounts (NOT RELIABLE / TRUSTWORTHY. DONT TRY RUN YOUR OWN CURRENCY EXCHANGE WITH REAL VALUES)
|
/// Attempts to move currency units between accounts (NOT RELIABLE / TRUSTWORTHY. DONT TRY RUN YOUR OWN CURRENCY EXCHANGE WITH REAL VALUES)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -1,71 +1,76 @@
|
||||||
using Nwc.XmlRpc;
|
using Nwc.XmlRpc;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Servers;
|
using OpenSim.Servers;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using libsecondlife;
|
using libsecondlife;
|
||||||
|
|
||||||
namespace OpenGrid.Framework.Manager {
|
namespace OpenGrid.Framework.Manager
|
||||||
|
{
|
||||||
public delegate void GridManagerCallback(string param);
|
|
||||||
|
public delegate void GridManagerCallback(string param);
|
||||||
public class GridManagementAgent {
|
|
||||||
|
public class GridManagementAgent
|
||||||
private GridManagerCallback thecallback;
|
{
|
||||||
private string sendkey;
|
|
||||||
private string recvkey;
|
private GridManagerCallback thecallback;
|
||||||
private string component_type;
|
private string sendkey;
|
||||||
|
private string recvkey;
|
||||||
private static ArrayList Sessions;
|
private string component_type;
|
||||||
|
|
||||||
public GridManagementAgent(BaseHttpServer app_httpd, string component_type, string sendkey, string recvkey, GridManagerCallback thecallback)
|
private static ArrayList Sessions;
|
||||||
{
|
|
||||||
this.sendkey=sendkey;
|
public GridManagementAgent(BaseHttpServer app_httpd, string component_type, string sendkey, string recvkey, GridManagerCallback thecallback)
|
||||||
this.recvkey=recvkey;
|
{
|
||||||
this.component_type=component_type;
|
this.sendkey = sendkey;
|
||||||
this.thecallback=thecallback;
|
this.recvkey = recvkey;
|
||||||
Sessions = new ArrayList();
|
this.component_type = component_type;
|
||||||
|
this.thecallback = thecallback;
|
||||||
app_httpd.AddXmlRPCHandler("manager_login",XmlRpcLoginMethod);
|
Sessions = new ArrayList();
|
||||||
|
|
||||||
switch(component_type)
|
app_httpd.AddXmlRPCHandler("manager_login", XmlRpcLoginMethod);
|
||||||
{
|
|
||||||
case "gridserver":
|
switch (component_type)
|
||||||
GridServerManager.sendkey=this.sendkey;
|
{
|
||||||
GridServerManager.recvkey=this.recvkey;
|
case "gridserver":
|
||||||
GridServerManager.thecallback=thecallback;
|
GridServerManager.sendkey = this.sendkey;
|
||||||
app_httpd.AddXmlRPCHandler("shutdown", GridServerManager.XmlRpcShutdownMethod);
|
GridServerManager.recvkey = this.recvkey;
|
||||||
break;
|
GridServerManager.thecallback = thecallback;
|
||||||
}
|
app_httpd.AddXmlRPCHandler("shutdown", GridServerManager.XmlRpcShutdownMethod);
|
||||||
}
|
break;
|
||||||
|
}
|
||||||
public static bool SessionExists(LLUUID sessionID)
|
}
|
||||||
{
|
|
||||||
return Sessions.Contains(sessionID);
|
public static bool SessionExists(LLUUID sessionID)
|
||||||
}
|
{
|
||||||
|
return Sessions.Contains(sessionID);
|
||||||
public static XmlRpcResponse XmlRpcLoginMethod(XmlRpcRequest request)
|
}
|
||||||
{
|
|
||||||
XmlRpcResponse response = new XmlRpcResponse();
|
public static XmlRpcResponse XmlRpcLoginMethod(XmlRpcRequest request)
|
||||||
Hashtable requestData = (Hashtable)request.Params[0];
|
{
|
||||||
Hashtable responseData = new Hashtable();
|
XmlRpcResponse response = new XmlRpcResponse();
|
||||||
|
Hashtable requestData = (Hashtable)request.Params[0];
|
||||||
// TODO: Switch this over to using OpenGrid.Framework.Data
|
Hashtable responseData = new Hashtable();
|
||||||
if( requestData["username"].Equals("admin") && requestData["password"].Equals("supersecret")) {
|
|
||||||
response.IsFault=false;
|
// TODO: Switch this over to using OpenGrid.Framework.Data
|
||||||
LLUUID new_session=LLUUID.Random();
|
if (requestData["username"].Equals("admin") && requestData["password"].Equals("supersecret"))
|
||||||
Sessions.Add(new_session);
|
{
|
||||||
responseData["session_id"]=new_session.ToString();
|
response.IsFault = false;
|
||||||
responseData["msg"]="Login OK";
|
LLUUID new_session = LLUUID.Random();
|
||||||
} else {
|
Sessions.Add(new_session);
|
||||||
response.IsFault=true;
|
responseData["session_id"] = new_session.ToString();
|
||||||
responseData["error"]="Invalid username or password";
|
responseData["msg"] = "Login OK";
|
||||||
}
|
}
|
||||||
|
else
|
||||||
response.Value = responseData;
|
{
|
||||||
return response;
|
response.IsFault = true;
|
||||||
|
responseData["error"] = "Invalid username or password";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
response.Value = responseData;
|
||||||
}
|
return response;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -20,10 +20,10 @@
|
||||||
<include name="${project::get-base-directory()}/${build.dir}" />
|
<include name="${project::get-base-directory()}/${build.dir}" />
|
||||||
</lib>
|
</lib>
|
||||||
<include name="System.dll" />
|
<include name="System.dll" />
|
||||||
<include name="OpenSim.Framework.dll" />
|
<include name="../../bin/OpenSim.Framework.dll" />
|
||||||
<include name="OpenSim.Servers.dll" />
|
<include name="../../bin/OpenSim.Servers.dll" />
|
||||||
<include name="../../bin/libsecondlife.dll" />
|
<include name="../../bin/libsecondlife.dll" />
|
||||||
<include name="XMLRPC.dll" />
|
<include name="../../bin/XMLRPC.dll" />
|
||||||
</references>
|
</references>
|
||||||
</csc>
|
</csc>
|
||||||
<echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../bin/" />
|
<echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../bin/" />
|
||||||
|
|
|
@ -23,13 +23,13 @@
|
||||||
<include name="System.dll" />
|
<include name="System.dll" />
|
||||||
<include name="System.Data.dll" />
|
<include name="System.Data.dll" />
|
||||||
<include name="System.Xml.dll" />
|
<include name="System.Xml.dll" />
|
||||||
<include name="OpenSim.Framework.dll" />
|
<include name="../../bin/OpenSim.Framework.dll" />
|
||||||
<include name="OpenSim.Framework.Console.dll" />
|
<include name="../../bin/OpenSim.Framework.Console.dll" />
|
||||||
<include name="OpenSim.GridInterfaces.Local.dll" />
|
<include name="../../bin/OpenSim.GridInterfaces.Local.dll" />
|
||||||
<include name="OpenSim.Servers.dll" />
|
<include name="../../bin/OpenSim.Servers.dll" />
|
||||||
<include name="../../bin/libsecondlife.dll" />
|
<include name="../../bin/libsecondlife.dll" />
|
||||||
<include name="../../bin/Db4objects.Db4o.dll" />
|
<include name="../../bin/Db4objects.Db4o.dll" />
|
||||||
<include name="XMLRPC.dll" />
|
<include name="../../bin/XMLRPC.dll" />
|
||||||
</references>
|
</references>
|
||||||
</csc>
|
</csc>
|
||||||
<echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../bin/" />
|
<echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../bin/" />
|
||||||
|
|
|
@ -41,6 +41,7 @@ using OpenSim.Framework.Sims;
|
||||||
using OpenSim.Framework.Console;
|
using OpenSim.Framework.Console;
|
||||||
using OpenSim.Framework.Interfaces;
|
using OpenSim.Framework.Interfaces;
|
||||||
using OpenSim.Servers;
|
using OpenSim.Servers;
|
||||||
|
using OpenSim.GenericConfig;
|
||||||
|
|
||||||
namespace OpenGridServices.GridServer
|
namespace OpenGridServices.GridServer
|
||||||
{
|
{
|
||||||
|
@ -49,15 +50,17 @@ namespace OpenGridServices.GridServer
|
||||||
public class OpenGrid_Main : BaseServer, conscmd_callback
|
public class OpenGrid_Main : BaseServer, conscmd_callback
|
||||||
{
|
{
|
||||||
private string ConfigDll = "OpenGrid.Config.GridConfigDb4o.dll";
|
private string ConfigDll = "OpenGrid.Config.GridConfigDb4o.dll";
|
||||||
private string GridDll = "OpenGrid.Framework.Data.MySQL.dll";
|
private string GridDll = "OpenGrid.Framework.Data.DB4o.dll";
|
||||||
public GridConfig Cfg;
|
public GridConfig Cfg;
|
||||||
|
|
||||||
public static OpenGrid_Main thegrid;
|
public static OpenGrid_Main thegrid;
|
||||||
public static bool setuponly;
|
protected IGenericConfig localXMLConfig;
|
||||||
|
|
||||||
|
public static bool setuponly;
|
||||||
|
|
||||||
//public LLUUID highestUUID;
|
//public LLUUID highestUUID;
|
||||||
|
|
||||||
// private SimProfileManager m_simProfileManager;
|
// private SimProfileManager m_simProfileManager;
|
||||||
|
|
||||||
private GridManager m_gridManager;
|
private GridManager m_gridManager;
|
||||||
|
|
||||||
|
@ -70,7 +73,7 @@ namespace OpenGridServices.GridServer
|
||||||
{
|
{
|
||||||
if (args[0] == "-setuponly") setuponly = true;
|
if (args[0] == "-setuponly") setuponly = true;
|
||||||
}
|
}
|
||||||
Console.WriteLine("Starting...\n");
|
Console.WriteLine("Starting...\n");
|
||||||
|
|
||||||
thegrid = new OpenGrid_Main();
|
thegrid = new OpenGrid_Main();
|
||||||
thegrid.Startup();
|
thegrid.Startup();
|
||||||
|
@ -82,8 +85,8 @@ namespace OpenGridServices.GridServer
|
||||||
{
|
{
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
Thread.Sleep(5000);
|
Thread.Sleep(5000);
|
||||||
// should flush the DB etc here
|
// should flush the DB etc here
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -95,30 +98,37 @@ namespace OpenGridServices.GridServer
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void managercallback(string cmd) {
|
public void managercallback(string cmd)
|
||||||
switch(cmd) {
|
{
|
||||||
case "shutdown":
|
switch (cmd)
|
||||||
RunCmd("shutdown",new string[0]);
|
{
|
||||||
break;
|
case "shutdown":
|
||||||
}
|
RunCmd("shutdown", new string[0]);
|
||||||
}
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public void Startup()
|
public void Startup()
|
||||||
{
|
{
|
||||||
m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Main.cs:Startup() - Loading configuration");
|
this.localXMLConfig = new XmlConfig("GridServerConfig.xml");
|
||||||
|
this.localXMLConfig.LoadData();
|
||||||
|
this.ConfigDB(this.localXMLConfig);
|
||||||
|
this.localXMLConfig.Close();
|
||||||
|
|
||||||
|
m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Main.cs:Startup() - Loading configuration");
|
||||||
Cfg = this.LoadConfigDll(this.ConfigDll);
|
Cfg = this.LoadConfigDll(this.ConfigDll);
|
||||||
Cfg.InitConfig();
|
Cfg.InitConfig();
|
||||||
if(setuponly) Environment.Exit(0);
|
if (setuponly) Environment.Exit(0);
|
||||||
|
|
||||||
m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Main.cs:Startup() - Connecting to Storage Server");
|
m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Main.cs:Startup() - Connecting to Storage Server");
|
||||||
m_gridManager = new GridManager();
|
m_gridManager = new GridManager();
|
||||||
m_gridManager.AddPlugin(GridDll); // Made of win
|
m_gridManager.AddPlugin(GridDll); // Made of win
|
||||||
m_gridManager.config = Cfg;
|
m_gridManager.config = Cfg;
|
||||||
|
|
||||||
m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Main.cs:Startup() - Starting HTTP process");
|
m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Main.cs:Startup() - Starting HTTP process");
|
||||||
BaseHttpServer httpServer = new BaseHttpServer(8001);
|
BaseHttpServer httpServer = new BaseHttpServer(8001);
|
||||||
GridManagementAgent GridManagerAgent = new GridManagementAgent(httpServer,"gridserver",Cfg.SimSendKey,Cfg.SimRecvKey,managercallback);
|
GridManagementAgent GridManagerAgent = new GridManagementAgent(httpServer, "gridserver", Cfg.SimSendKey, Cfg.SimRecvKey, managercallback);
|
||||||
|
|
||||||
httpServer.AddXmlRPCHandler("simulator_login", m_gridManager.XmlRpcLoginToSimulatorMethod);
|
httpServer.AddXmlRPCHandler("simulator_login", m_gridManager.XmlRpcLoginToSimulatorMethod);
|
||||||
httpServer.AddXmlRPCHandler("map_block", m_gridManager.XmlRpcMapBlockMethod);
|
httpServer.AddXmlRPCHandler("map_block", m_gridManager.XmlRpcMapBlockMethod);
|
||||||
|
@ -127,7 +137,7 @@ namespace OpenGridServices.GridServer
|
||||||
httpServer.AddRestHandler("POST", "/sims/", m_gridManager.RestSetSimMethod);
|
httpServer.AddRestHandler("POST", "/sims/", m_gridManager.RestSetSimMethod);
|
||||||
httpServer.AddRestHandler("GET", "/regions/", m_gridManager.RestGetRegionMethod);
|
httpServer.AddRestHandler("GET", "/regions/", m_gridManager.RestGetRegionMethod);
|
||||||
httpServer.AddRestHandler("POST", "/regions/", m_gridManager.RestSetRegionMethod);
|
httpServer.AddRestHandler("POST", "/regions/", m_gridManager.RestSetRegionMethod);
|
||||||
|
|
||||||
|
|
||||||
// lbsa71 : This code snippet taken from old http server.
|
// lbsa71 : This code snippet taken from old http server.
|
||||||
// I have no idea what this was supposed to do - looks like an infinite recursion to me.
|
// I have no idea what this was supposed to do - looks like an infinite recursion to me.
|
||||||
|
@ -145,9 +155,9 @@ namespace OpenGridServices.GridServer
|
||||||
|
|
||||||
httpServer.Start();
|
httpServer.Start();
|
||||||
|
|
||||||
m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Main.cs:Startup() - Starting sim status checker");
|
m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Main.cs:Startup() - Starting sim status checker");
|
||||||
|
|
||||||
System.Timers.Timer simCheckTimer = new System.Timers.Timer( 300000 ); // 5 minutes
|
System.Timers.Timer simCheckTimer = new System.Timers.Timer(300000); // 5 minutes
|
||||||
simCheckTimer.Elapsed += new ElapsedEventHandler(CheckSims);
|
simCheckTimer.Elapsed += new ElapsedEventHandler(CheckSims);
|
||||||
simCheckTimer.Enabled = true;
|
simCheckTimer.Enabled = true;
|
||||||
}
|
}
|
||||||
|
@ -222,7 +232,7 @@ namespace OpenGridServices.GridServer
|
||||||
switch (cmd)
|
switch (cmd)
|
||||||
{
|
{
|
||||||
case "help":
|
case "help":
|
||||||
m_console.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH,"shutdown - shutdown the grid (USE CAUTION!)");
|
m_console.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH, "shutdown - shutdown the grid (USE CAUTION!)");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "shutdown":
|
case "shutdown":
|
||||||
|
@ -235,5 +245,28 @@ namespace OpenGridServices.GridServer
|
||||||
public void Show(string ShowWhat)
|
public void Show(string ShowWhat)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void ConfigDB(IGenericConfig configData)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
string attri = "";
|
||||||
|
attri = configData.GetAttribute("DataBaseProvider");
|
||||||
|
if (attri == "")
|
||||||
|
{
|
||||||
|
GridDll = "OpenGrid.Framework.Data.DB4o.dll";
|
||||||
|
configData.SetAttribute("DataBaseProvider", "OpenGrid.Framework.Data.DB4o.dll");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
GridDll = attri;
|
||||||
|
}
|
||||||
|
configData.Commit();
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,6 +82,10 @@
|
||||||
<HintPath>OpenSim.Servers.dll</HintPath>
|
<HintPath>OpenSim.Servers.dll</HintPath>
|
||||||
<Private>False</Private>
|
<Private>False</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="OpenSim.GenericConfig.Xml" >
|
||||||
|
<HintPath>OpenSim.GenericConfig.Xml.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
<Reference Include="libsecondlife.dll" >
|
<Reference Include="libsecondlife.dll" >
|
||||||
<HintPath>..\..\bin\libsecondlife.dll</HintPath>
|
<HintPath>..\..\bin\libsecondlife.dll</HintPath>
|
||||||
<Private>False</Private>
|
<Private>False</Private>
|
||||||
|
|
|
@ -23,14 +23,15 @@
|
||||||
<include name="System.dll" />
|
<include name="System.dll" />
|
||||||
<include name="System.Data.dll" />
|
<include name="System.Data.dll" />
|
||||||
<include name="System.Xml.dll" />
|
<include name="System.Xml.dll" />
|
||||||
<include name="OpenSim.Framework.dll" />
|
<include name="../../bin/OpenSim.Framework.dll" />
|
||||||
<include name="OpenSim.Framework.Console.dll" />
|
<include name="../../bin/OpenSim.Framework.Console.dll" />
|
||||||
<include name="OpenSim.Servers.dll" />
|
<include name="../../bin/OpenSim.Servers.dll" />
|
||||||
<include name="../../bin/OpenGrid.Framework.Data.dll" />
|
<include name="../../bin/OpenGrid.Framework.Data.dll" />
|
||||||
<include name="../../bin/OpenGrid.Framework.Manager.dll" />
|
<include name="../../bin/OpenGrid.Framework.Manager.dll" />
|
||||||
|
<include name="../../bin/OpenSim.GenericConfig.Xml.dll" />
|
||||||
<include name="../../bin/libsecondlife.dll" />
|
<include name="../../bin/libsecondlife.dll" />
|
||||||
<include name="../../bin/Db4objects.Db4o.dll" />
|
<include name="../../bin/Db4objects.Db4o.dll" />
|
||||||
<include name="XMLRPC.dll" />
|
<include name="../../bin/XMLRPC.dll" />
|
||||||
</references>
|
</references>
|
||||||
</csc>
|
</csc>
|
||||||
<echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../bin/" />
|
<echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../bin/" />
|
||||||
|
|
|
@ -40,6 +40,8 @@ using OpenSim.Framework.Inventory;
|
||||||
using OpenSim.Framework.Interfaces;
|
using OpenSim.Framework.Interfaces;
|
||||||
using OpenSim.Framework.Console;
|
using OpenSim.Framework.Console;
|
||||||
using OpenSim.Servers;
|
using OpenSim.Servers;
|
||||||
|
using OpenSim.Framework.Utilities;
|
||||||
|
using OpenSim.GenericConfig;
|
||||||
|
|
||||||
namespace OpenGridServices.UserServer
|
namespace OpenGridServices.UserServer
|
||||||
{
|
{
|
||||||
|
@ -48,8 +50,9 @@ namespace OpenGridServices.UserServer
|
||||||
public class OpenUser_Main : BaseServer, conscmd_callback
|
public class OpenUser_Main : BaseServer, conscmd_callback
|
||||||
{
|
{
|
||||||
private string ConfigDll = "OpenUser.Config.UserConfigDb4o.dll";
|
private string ConfigDll = "OpenUser.Config.UserConfigDb4o.dll";
|
||||||
private string StorageDll = "OpenGrid.Framework.Data.MySQL.dll";
|
private string StorageDll = "OpenGrid.Framework.Data.DB4o.dll";
|
||||||
private UserConfig Cfg;
|
private UserConfig Cfg;
|
||||||
|
protected IGenericConfig localXMLConfig;
|
||||||
|
|
||||||
public UserManager m_userManager; // Replaces below.
|
public UserManager m_userManager; // Replaces below.
|
||||||
|
|
||||||
|
@ -88,6 +91,11 @@ namespace OpenGridServices.UserServer
|
||||||
|
|
||||||
public void Startup()
|
public void Startup()
|
||||||
{
|
{
|
||||||
|
this.localXMLConfig = new XmlConfig("UserServerConfig.xml");
|
||||||
|
this.localXMLConfig.LoadData();
|
||||||
|
this.ConfigDB(this.localXMLConfig);
|
||||||
|
this.localXMLConfig.Close();
|
||||||
|
|
||||||
MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Main.cs:Startup() - Loading configuration");
|
MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Main.cs:Startup() - Loading configuration");
|
||||||
Cfg = this.LoadConfigDll(this.ConfigDll);
|
Cfg = this.LoadConfigDll(this.ConfigDll);
|
||||||
Cfg.InitConfig();
|
Cfg.InitConfig();
|
||||||
|
@ -112,33 +120,22 @@ namespace OpenGridServices.UserServer
|
||||||
switch (what)
|
switch (what)
|
||||||
{
|
{
|
||||||
case "user":
|
case "user":
|
||||||
m_console.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH,"Commandline user creation is currently disabled.");
|
|
||||||
break;
|
|
||||||
/*
|
|
||||||
string tempfirstname;
|
string tempfirstname;
|
||||||
string templastname;
|
string templastname;
|
||||||
string tempMD5Passwd;
|
string tempMD5Passwd;
|
||||||
|
uint regX = 997;
|
||||||
|
uint regY = 996;
|
||||||
|
|
||||||
tempfirstname = m_console.CmdPrompt("First name");
|
tempfirstname = m_console.CmdPrompt("First name");
|
||||||
templastname = m_console.CmdPrompt("Last name");
|
templastname = m_console.CmdPrompt("Last name");
|
||||||
tempMD5Passwd = m_console.PasswdPrompt("Password");
|
tempMD5Passwd = m_console.PasswdPrompt("Password");
|
||||||
|
regX = Convert.ToUInt32(m_console.CmdPrompt("Start Region X"));
|
||||||
|
regY = Convert.ToUInt32(m_console.CmdPrompt("Start Region Y"));
|
||||||
|
|
||||||
System.Security.Cryptography.MD5CryptoServiceProvider x = new System.Security.Cryptography.MD5CryptoServiceProvider();
|
tempMD5Passwd = Util.Md5Hash(Util.Md5Hash(tempMD5Passwd) + ":" + "");
|
||||||
byte[] bs = System.Text.Encoding.UTF8.GetBytes(tempMD5Passwd);
|
|
||||||
bs = x.ComputeHash(bs);
|
|
||||||
System.Text.StringBuilder s = new System.Text.StringBuilder();
|
|
||||||
foreach (byte b in bs)
|
|
||||||
{
|
|
||||||
s.Append(b.ToString("x2").ToLower());
|
|
||||||
}
|
|
||||||
tempMD5Passwd = s.ToString();
|
|
||||||
|
|
||||||
UserProfile newuser = m_userProfileManager.CreateNewProfile(tempfirstname, templastname, tempMD5Passwd);
|
m_userManager.AddUserProfile(tempfirstname, templastname, tempMD5Passwd, regX, regY);
|
||||||
newuser.homelookat = new LLVector3(-0.57343f, -0.819255f, 0f);
|
|
||||||
newuser.homepos = new LLVector3(128f, 128f, 150f);
|
|
||||||
m_userProfileManager.SaveUserProfiles();
|
|
||||||
break;
|
break;
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -162,6 +159,29 @@ namespace OpenGridServices.UserServer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void ConfigDB(IGenericConfig configData)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
string attri = "";
|
||||||
|
attri = configData.GetAttribute("DataBaseProvider");
|
||||||
|
if (attri == "")
|
||||||
|
{
|
||||||
|
StorageDll = "OpenGrid.Framework.Data.DB4o.dll";
|
||||||
|
configData.SetAttribute("DataBaseProvider", "OpenGrid.Framework.Data.DB4o.dll");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
StorageDll = attri;
|
||||||
|
}
|
||||||
|
configData.Commit();
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private UserConfig LoadConfigDll(string dllName)
|
private UserConfig LoadConfigDll(string dllName)
|
||||||
{
|
{
|
||||||
Assembly pluginAssembly = Assembly.LoadFrom(dllName);
|
Assembly pluginAssembly = Assembly.LoadFrom(dllName);
|
||||||
|
|
|
@ -78,6 +78,10 @@
|
||||||
<HintPath>OpenSim.Framework.Console.dll</HintPath>
|
<HintPath>OpenSim.Framework.Console.dll</HintPath>
|
||||||
<Private>False</Private>
|
<Private>False</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="OpenSim.GenericConfig.Xml" >
|
||||||
|
<HintPath>OpenSim.GenericConfig.Xml.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
<Reference Include="OpenSim.Servers" >
|
<Reference Include="OpenSim.Servers" >
|
||||||
<HintPath>OpenSim.Servers.dll</HintPath>
|
<HintPath>OpenSim.Servers.dll</HintPath>
|
||||||
<Private>False</Private>
|
<Private>False</Private>
|
||||||
|
|
|
@ -23,13 +23,14 @@
|
||||||
<include name="System.dll" />
|
<include name="System.dll" />
|
||||||
<include name="System.Data.dll" />
|
<include name="System.Data.dll" />
|
||||||
<include name="System.Xml.dll" />
|
<include name="System.Xml.dll" />
|
||||||
<include name="OpenSim.Framework.dll" />
|
<include name="../../bin/OpenSim.Framework.dll" />
|
||||||
<include name="OpenSim.Framework.Console.dll" />
|
<include name="../../bin/OpenSim.Framework.Console.dll" />
|
||||||
<include name="../../bin/OpenGrid.Framework.Data.dll" />
|
<include name="../../bin/OpenGrid.Framework.Data.dll" />
|
||||||
<include name="OpenSim.Servers.dll" />
|
<include name="../../bin/OpenSim.GenericConfig.Xml.dll" />
|
||||||
|
<include name="../../bin/OpenSim.Servers.dll" />
|
||||||
<include name="../../bin/libsecondlife.dll" />
|
<include name="../../bin/libsecondlife.dll" />
|
||||||
<include name="../../bin/Db4objects.Db4o.dll" />
|
<include name="../../bin/Db4objects.Db4o.dll" />
|
||||||
<include name="XMLRPC.dll" />
|
<include name="../../bin/XMLRPC.dll" />
|
||||||
</references>
|
</references>
|
||||||
</csc>
|
</csc>
|
||||||
<echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../bin/" />
|
<echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../bin/" />
|
||||||
|
|
|
@ -52,6 +52,37 @@ namespace OpenGridServices.UserServer
|
||||||
pluginAssembly = null;
|
pluginAssembly = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="user"></param>
|
||||||
|
public void AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY)
|
||||||
|
{
|
||||||
|
UserProfileData user = new UserProfileData();
|
||||||
|
user.homeLocation = new LLVector3(128, 128, 100);
|
||||||
|
user.UUID = LLUUID.Random();
|
||||||
|
user.username = firstName;
|
||||||
|
user.surname = lastName;
|
||||||
|
user.passwordHash = pass;
|
||||||
|
user.passwordSalt = "";
|
||||||
|
user.created = Util.UnixTimeSinceEpoch();
|
||||||
|
user.homeLookAt = new LLVector3(100, 100, 100);
|
||||||
|
user.homeRegion = Util.UIntsToLong((regX * 256), (regY * 256));
|
||||||
|
|
||||||
|
foreach (KeyValuePair<string, IUserData> plugin in _plugins)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
plugin.Value.addNewUserProfile(user);
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Loads a user profile from a database by UUID
|
/// Loads a user profile from a database by UUID
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -24,8 +24,8 @@
|
||||||
<include name="System.Xml.dll" />
|
<include name="System.Xml.dll" />
|
||||||
<include name="../../../bin/libsecondlife.dll" />
|
<include name="../../../bin/libsecondlife.dll" />
|
||||||
<include name="../../../bin/Db4objects.Db4o.dll" />
|
<include name="../../../bin/Db4objects.Db4o.dll" />
|
||||||
<include name="OpenSim.Framework.dll" />
|
<include name="../../../bin/OpenSim.Framework.dll" />
|
||||||
<include name="OpenSim.Framework.Console.dll" />
|
<include name="../../../bin/OpenSim.Framework.Console.dll" />
|
||||||
</references>
|
</references>
|
||||||
</csc>
|
</csc>
|
||||||
<echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../../bin/" />
|
<echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../../bin/" />
|
||||||
|
|
|
@ -702,6 +702,7 @@
|
||||||
<Reference name="OpenSim.Servers"/>
|
<Reference name="OpenSim.Servers"/>
|
||||||
<Reference name="OpenGrid.Framework.Data"/>
|
<Reference name="OpenGrid.Framework.Data"/>
|
||||||
<Reference name="OpenGrid.Framework.Manager"/>
|
<Reference name="OpenGrid.Framework.Manager"/>
|
||||||
|
<Reference name="OpenSim.GenericConfig.Xml"/>
|
||||||
<Reference name="libsecondlife.dll"/>
|
<Reference name="libsecondlife.dll"/>
|
||||||
<Reference name="Db4objects.Db4o.dll"/>
|
<Reference name="Db4objects.Db4o.dll"/>
|
||||||
<Reference name="XMLRPC"/>
|
<Reference name="XMLRPC"/>
|
||||||
|
@ -759,6 +760,7 @@
|
||||||
<Reference name="OpenSim.Framework"/>
|
<Reference name="OpenSim.Framework"/>
|
||||||
<Reference name="OpenSim.Framework.Console"/>
|
<Reference name="OpenSim.Framework.Console"/>
|
||||||
<Reference name="OpenGrid.Framework.Data"/>
|
<Reference name="OpenGrid.Framework.Data"/>
|
||||||
|
<Reference name="OpenSim.GenericConfig.Xml"/>
|
||||||
<Reference name="OpenSim.Servers"/>
|
<Reference name="OpenSim.Servers"/>
|
||||||
<Reference name="libsecondlife.dll"/>
|
<Reference name="libsecondlife.dll"/>
|
||||||
<Reference name="Db4objects.Db4o.dll"/>
|
<Reference name="Db4objects.Db4o.dll"/>
|
||||||
|
|
Loading…
Reference in New Issue