Let stuff be broken!

zircon^2
Adam Frisby 2007-05-16 21:10:45 +00:00
parent 3435e0cb3a
commit dc2acaa8a8
12 changed files with 349 additions and 59 deletions

View File

@ -8,7 +8,12 @@ namespace OpenGrid.Framework.Data.DB4o
{
public class DB4oUserData : IUserData
{
DB4oUserManager manager = new DB4oUserManager("userprofiles.yap");
DB4oUserManager manager;
public void Initialise()
{
manager = new DB4oUserManager("userprofiles.yap");
}
public UserProfileData getUserByUUID(LLUUID uuid)
{
@ -33,7 +38,7 @@ namespace OpenGrid.Framework.Data.DB4o
}
public UserAgentData getAgentByUUID(LLUUID uuid)
{
{
try
{
return getUserByUUID(uuid).currentAgent;
@ -71,5 +76,15 @@ namespace OpenGrid.Framework.Data.DB4o
return true;
}
public string getName()
{
return "DB4o Userdata";
}
public string getVersion()
{
return "0.1";
}
}
}

View File

@ -1,4 +1,4 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectType>Local</ProjectType>
<ProductVersion>8.0.50727</ProductVersion>
@ -6,7 +6,8 @@
<ProjectGuid>{0A563AC1-0000-0000-0000-000000000000}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ApplicationIcon></ApplicationIcon>
<ApplicationIcon>
</ApplicationIcon>
<AssemblyKeyContainerName>
</AssemblyKeyContainerName>
<AssemblyName>OpenGrid.Framework.Data.MSSQL</AssemblyName>
@ -15,9 +16,11 @@
<DefaultTargetSchema>IE50</DefaultTargetSchema>
<DelaySign>false</DelaySign>
<OutputType>Library</OutputType>
<AppDesignerFolder></AppDesignerFolder>
<AppDesignerFolder>
</AppDesignerFolder>
<RootNamespace>OpenGrid.Framework.Data.MSSQL</RootNamespace>
<StartupObject></StartupObject>
<StartupObject>
</StartupObject>
<FileUpgradeFlags>
</FileUpgradeFlags>
</PropertyGroup>
@ -28,7 +31,8 @@
<ConfigurationOverrideFile>
</ConfigurationOverrideFile>
<DefineConstants>TRACE;DEBUG</DefineConstants>
<DocumentationFile></DocumentationFile>
<DocumentationFile>
</DocumentationFile>
<DebugSymbols>True</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<Optimize>False</Optimize>
@ -37,7 +41,8 @@
<RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel>
<NoWarn></NoWarn>
<NoWarn>
</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
@ -46,7 +51,8 @@
<ConfigurationOverrideFile>
</ConfigurationOverrideFile>
<DefineConstants>TRACE</DefineConstants>
<DocumentationFile></DocumentationFile>
<DocumentationFile>
</DocumentationFile>
<DebugSymbols>False</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<Optimize>True</Optimize>
@ -55,22 +61,23 @@
<RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel>
<NoWarn></NoWarn>
<NoWarn>
</NoWarn>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" >
<Reference Include="System">
<HintPath>System.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System.Xml" >
<Reference Include="System.Xml">
<HintPath>System.Xml.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System.Data" >
<Reference Include="System.Data">
<HintPath>System.Data.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="libsecondlife.dll" >
<Reference Include="libsecondlife.dll">
<HintPath>..\bin\libsecondlife.dll</HintPath>
<Private>False</Private>
</Reference>
@ -80,7 +87,7 @@
<Name>OpenGrid.Framework.Data</Name>
<Project>{62CDF671-0000-0000-0000-000000000000}</Project>
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
<Private>False</Private>
<Private>False</Private>
</ProjectReference>
</ItemGroup>
<ItemGroup>
@ -101,4 +108,4 @@
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
</Project>
</Project>

View File

@ -0,0 +1,68 @@
using System;
using System.Collections.Generic;
using System.Text;
using OpenGrid.Framework.Data;
using libsecondlife;
namespace OpenGrid.Framework.Data.MySQL
{
class MySQLUserData : IUserData
{
public MySQLManager manager;
public void Initialise()
{
manager = new MySQLManager("host", "database", "user", "password", "false");
}
public UserProfileData getUserByName(string name)
{
return getUserByName(name.Split(' ')[0], name.Split(' ')[1]);
}
public UserProfileData getUserByName(string user, string last)
{
return new UserProfileData();
}
public UserProfileData getUserByUUID(LLUUID uuid)
{
return new UserProfileData();
}
public UserAgentData getAgentByName(string name)
{
return getAgentByName(name.Split(' ')[0], name.Split(' ')[1]);
}
public UserAgentData getAgentByName(string user, string last)
{
return new UserAgentData();
}
public UserAgentData getAgentByUUID(LLUUID uuid)
{
return new UserAgentData();
}
public bool moneyTransferRequest(LLUUID from, LLUUID to, uint amount)
{
return false;
}
public bool inventoryTransferRequest(LLUUID from, LLUUID to, LLUUID item)
{
return false;
}
public string getName()
{
return "MySQL Userdata Interface";
}
public string getVersion()
{
return "0.1";
}
}
}

View File

@ -1,4 +1,4 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectType>Local</ProjectType>
<ProductVersion>8.0.50727</ProductVersion>
@ -6,7 +6,8 @@
<ProjectGuid>{0F3C3AC1-0000-0000-0000-000000000000}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ApplicationIcon></ApplicationIcon>
<ApplicationIcon>
</ApplicationIcon>
<AssemblyKeyContainerName>
</AssemblyKeyContainerName>
<AssemblyName>OpenGrid.Framework.Data.MySQL</AssemblyName>
@ -15,9 +16,11 @@
<DefaultTargetSchema>IE50</DefaultTargetSchema>
<DelaySign>false</DelaySign>
<OutputType>Library</OutputType>
<AppDesignerFolder></AppDesignerFolder>
<AppDesignerFolder>
</AppDesignerFolder>
<RootNamespace>OpenGrid.Framework.Data.MySQL</RootNamespace>
<StartupObject></StartupObject>
<StartupObject>
</StartupObject>
<FileUpgradeFlags>
</FileUpgradeFlags>
</PropertyGroup>
@ -28,7 +31,8 @@
<ConfigurationOverrideFile>
</ConfigurationOverrideFile>
<DefineConstants>TRACE;DEBUG</DefineConstants>
<DocumentationFile></DocumentationFile>
<DocumentationFile>
</DocumentationFile>
<DebugSymbols>True</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<Optimize>False</Optimize>
@ -37,7 +41,8 @@
<RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel>
<NoWarn></NoWarn>
<NoWarn>
</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
@ -46,7 +51,8 @@
<ConfigurationOverrideFile>
</ConfigurationOverrideFile>
<DefineConstants>TRACE</DefineConstants>
<DocumentationFile></DocumentationFile>
<DocumentationFile>
</DocumentationFile>
<DebugSymbols>False</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<Optimize>True</Optimize>
@ -55,26 +61,27 @@
<RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel>
<NoWarn></NoWarn>
<NoWarn>
</NoWarn>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" >
<Reference Include="System">
<HintPath>System.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System.Xml" >
<Reference Include="System.Xml">
<HintPath>System.Xml.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System.Data" >
<Reference Include="System.Data">
<HintPath>System.Data.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="libsecondlife.dll" >
<Reference Include="libsecondlife.dll">
<HintPath>..\bin\libsecondlife.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="MySql.Data.dll" >
<Reference Include="MySql.Data.dll">
<HintPath>..\bin\MySql.Data.dll</HintPath>
<Private>False</Private>
</Reference>
@ -84,7 +91,7 @@
<Name>OpenGrid.Framework.Data</Name>
<Project>{62CDF671-0000-0000-0000-000000000000}</Project>
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
<Private>False</Private>
<Private>False</Private>
</ProjectReference>
</ItemGroup>
<ItemGroup>
@ -94,6 +101,7 @@
<Compile Include="MySQLManager.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="MySQLUserData.cs" />
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
@ -105,4 +113,4 @@
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
</Project>
</Project>

View File

@ -7,18 +7,83 @@ namespace OpenGrid.Framework.Data
{
public interface IUserData
{
// Retrieval
// User Profiles
/// <summary>
/// Returns a user profile from a database via their UUID
/// </summary>
/// <param name="user">The accounts UUID</param>
/// <returns>The user data profile</returns>
UserProfileData getUserByUUID(LLUUID user);
/// <summary>
/// Returns a users profile by searching their username
/// </summary>
/// <param name="name">The users username</param>
/// <returns>The user data profile</returns>
UserProfileData getUserByName(string name);
/// <summary>
/// Returns a users profile by searching their username parts
/// </summary>
/// <param name="fname">Account firstname</param>
/// <param name="lname">Account lastname</param>
/// <returns>The user data profile</returns>
UserProfileData getUserByName(string fname, string lname);
// User Agents
/// <summary>
/// Returns the current agent for a user searching by it's UUID
/// </summary>
/// <param name="user">The users UUID</param>
/// <returns>The current agent session</returns>
UserAgentData getAgentByUUID(LLUUID user);
/// <summary>
/// Returns the current session agent for a user searching by username
/// </summary>
/// <param name="name">The users account name</param>
/// <returns>The current agent session</returns>
UserAgentData getAgentByName(string name);
/// <summary>
/// Returns the current session agent for a user searching by username parts
/// </summary>
/// <param name="fname">The users first account name</param>
/// <param name="lname">The users account surname</param>
/// <returns>The current agent session</returns>
UserAgentData getAgentByName(string fname, string lname);
// Transactional
/// <summary>
/// Attempts to move currency units between accounts (NOT RELIABLE / TRUSTWORTHY. DONT TRY RUN YOUR OWN CURRENCY EXCHANGE WITH REAL VALUES)
/// </summary>
/// <param name="from">The account to transfer from</param>
/// <param name="to">The account to transfer to</param>
/// <param name="amount">The amount to transfer</param>
/// <returns>Successful?</returns>
bool moneyTransferRequest(LLUUID from, LLUUID to, uint amount);
/// <summary>
/// Attempts to move inventory between accounts, if inventory is copyable it will be copied into the target account.
/// </summary>
/// <param name="from">User to transfer from</param>
/// <param name="to">User to transfer to</param>
/// <param name="inventory">Specified inventory item</param>
/// <returns>Successful?</returns>
bool inventoryTransferRequest(LLUUID from, LLUUID to, LLUUID inventory);
/// <summary>
/// Returns the plugin version
/// </summary>
/// <returns>Plugin version in MAJOR.MINOR.REVISION.BUILD format</returns>
string getVersion();
/// <summary>
/// Returns the plugin name
/// </summary>
/// <returns>Plugin name, eg MySQL User Provider</returns>
string getName();
/// <summary>
/// Initialises the plugin (artificial constructor)
/// </summary>
void Initialise();
}
}

View File

@ -12,6 +12,7 @@ namespace OpenGrid.Framework.Data
public string surname; // The users surname (can be used to indicate user class - eg 'Test User' or 'Test Admin')
public string passwordHash; // Hash of the users password
public string passwordSalt; // Salt for the users password
public ulong homeRegion; // RegionHandle of home
public LLVector3 homeLocation; // Home Location inside the sim

View File

@ -383,6 +383,11 @@ namespace OpenGridServices.GridServer
TheSim.serverURI = "http://" + TheSim.serverIP + ":" + TheSim.serverPort + "/";
if (TheSim.serverIP.StartsWith("172.16") || TheSim.serverIP.StartsWith("192.168") || TheSim.serverIP.StartsWith("10.") || TheSim.serverIP.StartsWith("0.") || TheSim.serverIP.StartsWith("255."))
{
return "ERROR! Servers must register with public addresses.";
}
try
{
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Attempting to add a new region to the grid - " + _plugins.Count + " storage provider(s) registered.");
@ -402,7 +407,7 @@ namespace OpenGridServices.GridServer
}
catch (Exception e)
{
return "ERROR! could not save to database! (" + e.ToString() + ")";
return "ERROR! Could not save to database! (" + e.ToString() + ")";
}
}

View File

@ -50,6 +50,8 @@ namespace OpenGridServices.UserServer
private string ConfigDll = "OpenUser.Config.UserConfigDb4o.dll";
private UserConfig Cfg;
public UserManager m_userManager; // Replaces below.
private UserProfileManager m_userProfileManager;
public Dictionary<LLUUID, UserProfile> UserSessions = new Dictionary<LLUUID, UserProfile>();
@ -62,6 +64,7 @@ namespace OpenGridServices.UserServer
Console.WriteLine("Starting...\n");
OpenUser_Main userserver = new OpenUser_Main();
userserver.Startup();
userserver.Work();
}
@ -88,6 +91,9 @@ namespace OpenGridServices.UserServer
Cfg = this.LoadConfigDll(this.ConfigDll);
Cfg.InitConfig();
MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Main.cs:Startup() - Establishing data connection");
m_userManager = new UserManager();
MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Main.cs:Startup() - Creating user profile manager");
m_userProfileManager = new UserProfileManager();
m_userProfileManager.InitUserProfiles();

View File

@ -1,4 +1,4 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectType>Local</ProjectType>
<ProductVersion>8.0.50727</ProductVersion>
@ -6,7 +6,8 @@
<ProjectGuid>{66591469-0000-0000-0000-000000000000}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ApplicationIcon></ApplicationIcon>
<ApplicationIcon>
</ApplicationIcon>
<AssemblyKeyContainerName>
</AssemblyKeyContainerName>
<AssemblyName>OpenGridServices.UserServer</AssemblyName>
@ -15,9 +16,11 @@
<DefaultTargetSchema>IE50</DefaultTargetSchema>
<DelaySign>false</DelaySign>
<OutputType>Exe</OutputType>
<AppDesignerFolder></AppDesignerFolder>
<AppDesignerFolder>
</AppDesignerFolder>
<RootNamespace>OpenGridServices.UserServer</RootNamespace>
<StartupObject></StartupObject>
<StartupObject>
</StartupObject>
<FileUpgradeFlags>
</FileUpgradeFlags>
</PropertyGroup>
@ -28,7 +31,8 @@
<ConfigurationOverrideFile>
</ConfigurationOverrideFile>
<DefineConstants>TRACE;DEBUG</DefineConstants>
<DocumentationFile></DocumentationFile>
<DocumentationFile>
</DocumentationFile>
<DebugSymbols>True</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<Optimize>False</Optimize>
@ -37,7 +41,8 @@
<RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel>
<NoWarn></NoWarn>
<NoWarn>
</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
@ -46,7 +51,8 @@
<ConfigurationOverrideFile>
</ConfigurationOverrideFile>
<DefineConstants>TRACE</DefineConstants>
<DocumentationFile></DocumentationFile>
<DocumentationFile>
</DocumentationFile>
<DebugSymbols>False</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<Optimize>True</Optimize>
@ -55,54 +61,59 @@
<RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel>
<NoWarn></NoWarn>
<NoWarn>
</NoWarn>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" >
<Reference Include="System">
<HintPath>System.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System.Data" >
<Reference Include="System.Data">
<HintPath>System.Data.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System.Xml" >
<Reference Include="System.Xml">
<HintPath>System.Xml.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="libsecondlife.dll" >
<Reference Include="libsecondlife.dll">
<HintPath>..\bin\libsecondlife.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Db4objects.Db4o.dll" >
<Reference Include="Db4objects.Db4o.dll">
<HintPath>..\bin\Db4objects.Db4o.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\OpenGrid.Framework.Data\OpenGrid.Framework.Data.csproj">
<Project>{62CDF671-0000-0000-0000-000000000000}</Project>
<Name>OpenGrid.Framework.Data</Name>
</ProjectReference>
<ProjectReference Include="..\OpenSim.Framework\OpenSim.Framework.csproj">
<Name>OpenSim.Framework</Name>
<Project>{8ACA2445-0000-0000-0000-000000000000}</Project>
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
<Private>False</Private>
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\OpenSim.Framework.Console\OpenSim.Framework.Console.csproj">
<Name>OpenSim.Framework.Console</Name>
<Project>{A7CD0630-0000-0000-0000-000000000000}</Project>
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
<Private>False</Private>
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\OpenSim.Servers\OpenSim.Servers.csproj">
<Name>OpenSim.Servers</Name>
<Project>{8BB20F0A-0000-0000-0000-000000000000}</Project>
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
<Private>False</Private>
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\XmlRpcCS\XMLRPC.csproj">
<Name>XMLRPC</Name>
<Project>{8E81D43C-0000-0000-0000-000000000000}</Project>
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
<Private>False</Private>
<Private>False</Private>
</ProjectReference>
</ItemGroup>
<ItemGroup>
@ -112,6 +123,7 @@
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="UserManager.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
<PropertyGroup>
@ -120,4 +132,4 @@
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
</Project>
</Project>

View File

@ -0,0 +1,102 @@
using System;
using System.Collections.Generic;
using System.Text;
using OpenGrid.Framework.Data;
using libsecondlife;
using System.Reflection;
using System.Xml;
using Nwc.XmlRpc;
using OpenSim.Framework.Sims;
using OpenSim.Framework.Inventory;
using OpenSim.Framework.Utilities;
namespace OpenGridServices.UserServer
{
public class UserManager
{
Dictionary<string, IUserData> _plugins = new Dictionary<string, IUserData>();
/// <summary>
/// Adds a new user server plugin - user servers will be requested in the order they were loaded.
/// </summary>
/// <param name="FileName">The filename to the user server plugin DLL</param>
public void AddPlugin(string FileName)
{
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Storage: Attempting to load " + FileName);
Assembly pluginAssembly = Assembly.LoadFrom(FileName);
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Storage: Found " + pluginAssembly.GetTypes().Length + " interfaces.");
foreach (Type pluginType in pluginAssembly.GetTypes())
{
if (!pluginType.IsAbstract)
{
Type typeInterface = pluginType.GetInterface("IUserData", true);
if (typeInterface != null)
{
IUserData plug = (IUserData)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
plug.Initialise();
this._plugins.Add(plug.getName(), plug);
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Storage: Added IUserData Interface");
}
typeInterface = null;
}
}
pluginAssembly = null;
}
public UserProfileData getUserProfile(LLUUID uuid)
{
foreach (KeyValuePair<string, IUserData> plugin in _plugins)
{
try
{
return plugin.Value.getUserByUUID(uuid);
}
catch (Exception e)
{
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
}
}
return null;
}
public UserProfileData getUserProfile(string name)
{
foreach (KeyValuePair<string, IUserData> plugin in _plugins)
{
try
{
return plugin.Value.getUserByName(name);
}
catch (Exception e)
{
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
}
}
return null;
}
public UserProfileData getUserProfile(string fname, string lname)
{
foreach (KeyValuePair<string, IUserData> plugin in _plugins)
{
try
{
return plugin.Value.getUserByName(fname,lname);
}
catch (Exception e)
{
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
}
}
return null;
}
}
}

View File

@ -259,9 +259,9 @@ namespace OpenSim.Framework.User
SimParams["lastname"] = theUser.lastname;
SimParams["agent_id"] = theUser.UUID.ToString();
SimParams["circuit_code"] = (Int32)circode;
SimParams["startpos_x"] = theUser.homepos.X.ToString();
SimParams["startpos_y"] = theUser.homepos.Y.ToString();
SimParams["startpos_z"] = theUser.homepos.Z.ToString();
SimParams["startpos_x"] = theUser.homepos.X.ToString();
SimParams["startpos_y"] = theUser.homepos.Y.ToString();
SimParams["startpos_z"] = theUser.homepos.Z.ToString();
ArrayList SendParams = new ArrayList();
SendParams.Add(SimParams);

View File

@ -494,8 +494,9 @@
<Reference name="System.Xml" localCopy="false"/>
<Reference name="OpenSim.Framework"/>
<Reference name="OpenSim.Framework.Console"/>
<Reference name="OpenSim.Servers"/>
<Reference name="libsecondlife.dll"/>
<Reference name="OpenGrid.Framework.Data"/>
<Reference name="OpenSim.Servers"/>
<Reference name="libsecondlife.dll"/>
<Reference name="Db4objects.Db4o.dll"/>
<Reference name="XMLRPC"/>