mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 20:05:33 +08:00
* Apply a modified version of http://opensimulator.org/mantis/view.php?id=2290
* This allows multiple user profile providers to be specified in OpenSim.ini separated by commas * If multiple providers are specified then a request for a user profile will query each in turn until the profile is either found or all have been queried * Unfortunately I don't believe this order can currently be specified, which if true is something that will need to be fixed. * Thanks to smeans for the original patch.
This commit is contained in:
@@ -56,11 +56,11 @@ namespace OpenSim.Framework.Communications
|
||||
public void AddPlugin(string provider, string connect)
|
||||
{
|
||||
PluginLoader<IUserDataPlugin> loader =
|
||||
new PluginLoader<IUserDataPlugin> (new UserDataInitialiser (connect));
|
||||
new PluginLoader<IUserDataPlugin>(new UserDataInitialiser(connect));
|
||||
|
||||
// loader will try to load all providers (MySQL, MSSQL, etc)
|
||||
// unless it is constrainted to the correct "Provider" entry in the addin.xml
|
||||
loader.Add ("/OpenSim/UserData", new PluginProviderFilter (provider));
|
||||
loader.Add("/OpenSim/UserData", new PluginProviderFilter(provider));
|
||||
loader.Load();
|
||||
|
||||
_plugins = loader.Plugins;
|
||||
@@ -178,7 +178,12 @@ namespace OpenSim.Framework.Communications
|
||||
{
|
||||
try
|
||||
{
|
||||
return plugin.GetAgentByUUID(uuid);
|
||||
UserAgentData result = plugin.GetAgentByUUID(uuid);
|
||||
|
||||
if (result != null)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -260,7 +265,12 @@ namespace OpenSim.Framework.Communications
|
||||
{
|
||||
try
|
||||
{
|
||||
return plugin.GetUserFriendList(ownerID);
|
||||
List<FriendListItem> result = plugin.GetUserFriendList(ownerID);
|
||||
|
||||
if (result != null)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -331,7 +341,6 @@ namespace OpenSim.Framework.Communications
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Resets the currentAgent in the user profile
|
||||
/// </summary>
|
||||
@@ -344,6 +353,7 @@ namespace OpenSim.Framework.Communications
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
profile.CurrentAgent = null;
|
||||
|
||||
UpdateUserProfile(profile);
|
||||
|
||||
Reference in New Issue
Block a user