* You can add and remove a friend in standalone now within the same simulator. It saves.

* You can add and remove a friend in grid mode now within the same simulator.  It doesn't save yet.
* I got rid of Mr. OpenSim as a friend..   he bothers me /:b...
This commit is contained in:
Teravus Ovares
2008-01-01 06:12:04 +00:00
parent b8975ecbd9
commit b4c9b6bd19
17 changed files with 590 additions and 51 deletions

View File

@@ -1625,6 +1625,8 @@ namespace OpenSim.Region.Environment.Scenes
}
}
#endregion
#region Other Methods
@@ -1699,6 +1701,45 @@ namespace OpenSim.Region.Environment.Scenes
}
}
/// <summary>
/// This method is a way for the Friends Module to create an instant
/// message to the avatar and for Instant Messages that travel across
/// gridcomms to make it to the Instant Message Module.
///
/// Friendship establishment and groups are unfortunately tied with instant messaging and
/// there's no way to separate them completely.
/// </summary>
/// <param name="message">object containing the instant message data</param>
/// <returns>void</returns>
public void TriggerGridInstantMessage(GridInstantMessage message,InstantMessageReceiver options)
{
m_eventManager.TriggerGridInstantMessage(message,options);
}
public virtual void StoreAddFriendship(LLUUID ownerID, LLUUID friendID, uint perms)
{
// TODO: m_sceneGridService.DoStuff;
CommsManager.AddNewUserFriend(ownerID, friendID, perms);
}
public virtual void StoreUpdateFriendship(LLUUID ownerID, LLUUID friendID, uint perms)
{
// TODO: m_sceneGridService.DoStuff;
CommsManager.UpdateUserFriendPerms(ownerID, friendID, perms);
}
public virtual void StoreRemoveFriendship(LLUUID ownerID, LLUUID ExfriendID)
{
// TODO: m_sceneGridService.DoStuff;
CommsManager.RemoveUserFriend(ownerID, ExfriendID);
}
public virtual List<FriendListItem> StoreGetFriendsForUser(LLUUID ownerID)
{
// TODO: m_sceneGridService.DoStuff;
return CommsManager.GetUserFriendList(ownerID);
}
#endregion
#region Console Commands

View File

@@ -27,12 +27,14 @@
*/
using libsecondlife;
using System;
using OpenSim.Framework;
using OpenSim.Region.Environment.Interfaces;
using OpenSim.Region.Environment.LandManagement;
namespace OpenSim.Region.Environment.Scenes
{
/// <summary>
/// A class for triggering remote scene events.
/// </summary>
@@ -115,6 +117,16 @@ namespace OpenSim.Region.Environment.Scenes
public event AvatarEnteringNewParcel OnAvatarEnteringNewParcel;
public delegate void NewGridInstantMessage(GridInstantMessage message);
public event NewGridInstantMessage OnGridInstantMessageToIMModule;
public event NewGridInstantMessage OnGridInstantMessageToFriendsModule;
public event NewGridInstantMessage OnGridInstantMessageToGroupsModule;
public void TriggerOnClientMovement(ScenePresence avatar)
{
if (OnClientMovement != null)
@@ -265,5 +277,29 @@ namespace OpenSim.Region.Environment.Scenes
OnAvatarEnteringNewParcel(avatar, localLandID, regionID);
}
}
///<summary>Used to pass instnat messages around between the Scene, the Friends Module and the Instant Messsage Module</summary>
///<param name="message">Object containing the Instant Message Data</param>
///<param name="whichModule">A bit vector containing the modules to send the message to</param>
public void TriggerGridInstantMessage(GridInstantMessage message, InstantMessageReceiver whichModule)
{
if ((whichModule & InstantMessageReceiver.IMModule) != 0)
{
if (OnGridInstantMessageToIMModule != null)
{
OnGridInstantMessageToIMModule(message);
}
}
if ((whichModule & InstantMessageReceiver.FriendsModule) != 0)
{
if (OnGridInstantMessageToFriendsModule != null)
{
OnGridInstantMessageToFriendsModule(message);
}
}
}
}
}