mirror of
https://github.com/opensim/opensim.git
synced 2026-08-10 03:06:05 +08:00
* Added database and UserManagerBase glue for FriendsList management
* Don't forget to run prebuild
This commit is contained in:
@@ -196,6 +196,80 @@ namespace OpenSim.Framework.UserManagement
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Loads a user's friend list
|
||||
/// </summary>
|
||||
/// <param name="name">the UUID of the friend list owner</param>
|
||||
/// <returns>A List of FriendListItems that contains info about the user's friends</returns>
|
||||
public List<FriendListItem> GetUserFriendList(LLUUID ownerID)
|
||||
{
|
||||
|
||||
foreach (KeyValuePair<string, IUserData> plugin in _plugins)
|
||||
{
|
||||
try
|
||||
{
|
||||
return plugin.Value.GetUserFriendList(ownerID);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Verbose("USERSTORAGE",
|
||||
"Unable to GetUserFriendList via " + plugin.Key + "(" + e.ToString() + ")");
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
public void AddNewUserFriend(LLUUID friendlistowner, LLUUID friend, uint perms)
|
||||
{
|
||||
foreach (KeyValuePair<string, IUserData> plugin in _plugins)
|
||||
{
|
||||
try
|
||||
{
|
||||
plugin.Value.AddNewUserFriend(friendlistowner,friend,perms);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Verbose("USERSTORAGE",
|
||||
"Unable to AddNewUserFriend via " + plugin.Key + "(" + e.ToString() + ")");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void RemoveUserFriend(LLUUID friendlistowner, LLUUID friend)
|
||||
{
|
||||
foreach (KeyValuePair<string, IUserData> plugin in _plugins)
|
||||
{
|
||||
try
|
||||
{
|
||||
plugin.Value.RemoveUserFriend(friendlistowner, friend);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Verbose("USERSTORAGE",
|
||||
"Unable to RemoveUserFriend via " + plugin.Key + "(" + e.ToString() + ")");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void UpdateUserFriendPerms(LLUUID friendlistowner, LLUUID friend, uint perms)
|
||||
{
|
||||
foreach (KeyValuePair<string, IUserData> plugin in _plugins)
|
||||
{
|
||||
try
|
||||
{
|
||||
plugin.Value.UpdateUserFriendPerms(friendlistowner, friend, perms);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Verbose("USERSTORAGE",
|
||||
"Unable to UpdateUserFriendPerms via " + plugin.Key + "(" + e.ToString() + ")");
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Loads a user agent by name (not called directly)
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user