aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes
diff options
context:
space:
mode:
authorTeravus Ovares2008-01-01 06:12:04 +0000
committerTeravus Ovares2008-01-01 06:12:04 +0000
commitb4c9b6bd19c0725ae5bf60172db75ebc63ba72c6 (patch)
treed7e9e370371edbcbebb8436791ba8b1cd940ab69 /OpenSim/Region/Environment/Scenes
parentMake it possible for new inventory 'libraries' to be added without changing t... (diff)
downloadopensim-SC_OLD-b4c9b6bd19c0725ae5bf60172db75ebc63ba72c6.zip
opensim-SC_OLD-b4c9b6bd19c0725ae5bf60172db75ebc63ba72c6.tar.gz
opensim-SC_OLD-b4c9b6bd19c0725ae5bf60172db75ebc63ba72c6.tar.bz2
opensim-SC_OLD-b4c9b6bd19c0725ae5bf60172db75ebc63ba72c6.tar.xz
* 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...
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs41
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneEvents.cs36
2 files changed, 77 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index a0f19bd..ba99640 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -1625,6 +1625,8 @@ namespace OpenSim.Region.Environment.Scenes
1625 } 1625 }
1626 } 1626 }
1627 1627
1628
1629
1628 #endregion 1630 #endregion
1629 1631
1630 #region Other Methods 1632 #region Other Methods
@@ -1699,6 +1701,45 @@ namespace OpenSim.Region.Environment.Scenes
1699 } 1701 }
1700 } 1702 }
1701 1703
1704 /// <summary>
1705 /// This method is a way for the Friends Module to create an instant
1706 /// message to the avatar and for Instant Messages that travel across
1707 /// gridcomms to make it to the Instant Message Module.
1708 ///
1709 /// Friendship establishment and groups are unfortunately tied with instant messaging and
1710 /// there's no way to separate them completely.
1711 /// </summary>
1712 /// <param name="message">object containing the instant message data</param>
1713 /// <returns>void</returns>
1714 public void TriggerGridInstantMessage(GridInstantMessage message,InstantMessageReceiver options)
1715 {
1716 m_eventManager.TriggerGridInstantMessage(message,options);
1717 }
1718
1719
1720 public virtual void StoreAddFriendship(LLUUID ownerID, LLUUID friendID, uint perms)
1721 {
1722 // TODO: m_sceneGridService.DoStuff;
1723 CommsManager.AddNewUserFriend(ownerID, friendID, perms);
1724 }
1725
1726 public virtual void StoreUpdateFriendship(LLUUID ownerID, LLUUID friendID, uint perms)
1727 {
1728 // TODO: m_sceneGridService.DoStuff;
1729 CommsManager.UpdateUserFriendPerms(ownerID, friendID, perms);
1730 }
1731
1732 public virtual void StoreRemoveFriendship(LLUUID ownerID, LLUUID ExfriendID)
1733 {
1734 // TODO: m_sceneGridService.DoStuff;
1735 CommsManager.RemoveUserFriend(ownerID, ExfriendID);
1736 }
1737 public virtual List<FriendListItem> StoreGetFriendsForUser(LLUUID ownerID)
1738 {
1739 // TODO: m_sceneGridService.DoStuff;
1740 return CommsManager.GetUserFriendList(ownerID);
1741 }
1742
1702 #endregion 1743 #endregion
1703 1744
1704 #region Console Commands 1745 #region Console Commands
diff --git a/OpenSim/Region/Environment/Scenes/SceneEvents.cs b/OpenSim/Region/Environment/Scenes/SceneEvents.cs
index a6a8fb6..5bf23ac 100644
--- a/OpenSim/Region/Environment/Scenes/SceneEvents.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneEvents.cs
@@ -27,12 +27,14 @@
27*/ 27*/
28 28
29using libsecondlife; 29using libsecondlife;
30using System;
30using OpenSim.Framework; 31using OpenSim.Framework;
31using OpenSim.Region.Environment.Interfaces; 32using OpenSim.Region.Environment.Interfaces;
32using OpenSim.Region.Environment.LandManagement; 33using OpenSim.Region.Environment.LandManagement;
33 34
34namespace OpenSim.Region.Environment.Scenes 35namespace OpenSim.Region.Environment.Scenes
35{ 36{
37
36 /// <summary> 38 /// <summary>
37 /// A class for triggering remote scene events. 39 /// A class for triggering remote scene events.
38 /// </summary> 40 /// </summary>
@@ -115,6 +117,16 @@ namespace OpenSim.Region.Environment.Scenes
115 public event AvatarEnteringNewParcel OnAvatarEnteringNewParcel; 117 public event AvatarEnteringNewParcel OnAvatarEnteringNewParcel;
116 118
117 119
120 public delegate void NewGridInstantMessage(GridInstantMessage message);
121
122 public event NewGridInstantMessage OnGridInstantMessageToIMModule;
123
124 public event NewGridInstantMessage OnGridInstantMessageToFriendsModule;
125
126 public event NewGridInstantMessage OnGridInstantMessageToGroupsModule;
127
128
129
118 public void TriggerOnClientMovement(ScenePresence avatar) 130 public void TriggerOnClientMovement(ScenePresence avatar)
119 { 131 {
120 if (OnClientMovement != null) 132 if (OnClientMovement != null)
@@ -265,5 +277,29 @@ namespace OpenSim.Region.Environment.Scenes
265 OnAvatarEnteringNewParcel(avatar, localLandID, regionID); 277 OnAvatarEnteringNewParcel(avatar, localLandID, regionID);
266 } 278 }
267 } 279 }
280
281 ///<summary>Used to pass instnat messages around between the Scene, the Friends Module and the Instant Messsage Module</summary>
282 ///<param name="message">Object containing the Instant Message Data</param>
283 ///<param name="whichModule">A bit vector containing the modules to send the message to</param>
284 public void TriggerGridInstantMessage(GridInstantMessage message, InstantMessageReceiver whichModule)
285 {
286 if ((whichModule & InstantMessageReceiver.IMModule) != 0)
287 {
288
289 if (OnGridInstantMessageToIMModule != null)
290 {
291 OnGridInstantMessageToIMModule(message);
292 }
293 }
294 if ((whichModule & InstantMessageReceiver.FriendsModule) != 0)
295 {
296 if (OnGridInstantMessageToFriendsModule != null)
297 {
298 OnGridInstantMessageToFriendsModule(message);
299 }
300
301 }
302 }
303
268 } 304 }
269} \ No newline at end of file 305} \ No newline at end of file