aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Modules')
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/Groups/GroupsModule.cs54
-rw-r--r--OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs7
2 files changed, 52 insertions, 9 deletions
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Groups/GroupsModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Groups/GroupsModule.cs
index 8f3eb62..a83730e 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Groups/GroupsModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Groups/GroupsModule.cs
@@ -44,6 +44,9 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups
44 private Dictionary<LLUUID, GroupList> m_grouplistmap = new Dictionary<LLUUID, GroupList>(); 44 private Dictionary<LLUUID, GroupList> m_grouplistmap = new Dictionary<LLUUID, GroupList>();
45 private Dictionary<LLUUID, GroupData> m_groupmap = new Dictionary<LLUUID, GroupData>(); 45 private Dictionary<LLUUID, GroupData> m_groupmap = new Dictionary<LLUUID, GroupData>();
46 private Dictionary<LLUUID, IClientAPI> m_iclientmap = new Dictionary<LLUUID, IClientAPI>(); 46 private Dictionary<LLUUID, IClientAPI> m_iclientmap = new Dictionary<LLUUID, IClientAPI>();
47 private Dictionary<LLUUID, GroupData> m_groupUUIDGroup = new Dictionary<LLUUID, GroupData>();
48 private LLUUID opensimulatorGroupID = new LLUUID("00000000-68f9-1111-024e-222222111123");
49
47 private List<Scene> m_scene = new List<Scene>(); 50 private List<Scene> m_scene = new List<Scene>();
48 51
49 #region IRegionModule Members 52 #region IRegionModule Members
@@ -57,6 +60,18 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups
57 scene.EventManager.OnNewClient += OnNewClient; 60 scene.EventManager.OnNewClient += OnNewClient;
58 scene.EventManager.OnClientClosed += OnClientClosed; 61 scene.EventManager.OnClientClosed += OnClientClosed;
59 scene.EventManager.OnGridInstantMessageToGroupsModule += OnGridInstantMessage; 62 scene.EventManager.OnGridInstantMessageToGroupsModule += OnGridInstantMessage;
63 lock (m_groupUUIDGroup)
64 {
65
66 GroupData OpenSimulatorGroup = new GroupData();
67 OpenSimulatorGroup.ActiveGroupTitle = "OpenSimulator Tester";
68 OpenSimulatorGroup.GroupID = opensimulatorGroupID;
69 OpenSimulatorGroup.groupName = "OpenSimulator Testing";
70 OpenSimulatorGroup.ActiveGroupPowers = GroupPowers.LandAllowSetHome;
71 OpenSimulatorGroup.GroupTitles.Add("OpenSimulator Tester");
72 if (!m_groupUUIDGroup.ContainsKey(opensimulatorGroupID))
73 m_groupUUIDGroup.Add(opensimulatorGroupID, OpenSimulatorGroup);
74 }
60 //scene.EventManager. 75 //scene.EventManager.
61 } 76 }
62 77
@@ -102,6 +117,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups
102 // Subscribe to instant messages 117 // Subscribe to instant messages
103 client.OnInstantMessage += OnInstantMessage; 118 client.OnInstantMessage += OnInstantMessage;
104 client.OnAgentDataUpdateRequest += OnAgentDataUpdateRequest; 119 client.OnAgentDataUpdateRequest += OnAgentDataUpdateRequest;
120 client.OnUUIDGroupNameRequest += HandleUUIDGroupNameRequest;
105 lock (m_iclientmap) 121 lock (m_iclientmap)
106 { 122 {
107 if (!m_iclientmap.ContainsKey(client.AgentId)) 123 if (!m_iclientmap.ContainsKey(client.AgentId))
@@ -109,13 +125,18 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups
109 m_iclientmap.Add(client.AgentId, client); 125 m_iclientmap.Add(client.AgentId, client);
110 } 126 }
111 } 127 }
112 GroupData OpenSimulatorGroup = new GroupData(); 128 GroupData OpenSimulatorGroup = null;
113 OpenSimulatorGroup.ActiveGroupTitle = "OpenSimulator Tester"; 129 lock (m_groupUUIDGroup)
114 OpenSimulatorGroup.GroupID = new LLUUID("00000000-68f9-1111-024e-222222111120"); 130 {
115 OpenSimulatorGroup.GroupMembers.Add(client.AgentId); 131 OpenSimulatorGroup = m_groupUUIDGroup[opensimulatorGroupID];
116 OpenSimulatorGroup.groupName = "OpenSimulator Testing"; 132 if (!OpenSimulatorGroup.GroupMembers.Contains(client.AgentId))
117 OpenSimulatorGroup.ActiveGroupPowers = GroupPowers.LandAllowSetHome; 133 {
118 OpenSimulatorGroup.GroupTitles.Add("OpenSimulator Tester"); 134 OpenSimulatorGroup.GroupMembers.Add(client.AgentId);
135 m_groupUUIDGroup[opensimulatorGroupID] = OpenSimulatorGroup;
136 }
137
138 }
139
119 lock (m_groupmap) 140 lock (m_groupmap)
120 { 141 {
121 if (!m_groupmap.ContainsKey(client.AgentId)) 142 if (!m_groupmap.ContainsKey(client.AgentId))
@@ -124,7 +145,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups
124 } 145 }
125 } 146 }
126 GroupList testGroupList = new GroupList(); 147 GroupList testGroupList = new GroupList();
127 testGroupList.m_GroupList.Add(new LLUUID("00000000-68f9-1111-024e-222222111120")); 148 testGroupList.m_GroupList.Add(OpenSimulatorGroup.GroupID);
128 149
129 lock (m_grouplistmap) 150 lock (m_grouplistmap)
130 { 151 {
@@ -133,7 +154,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups
133 m_grouplistmap.Add(client.AgentId, testGroupList); 154 m_grouplistmap.Add(client.AgentId, testGroupList);
134 } 155 }
135 } 156 }
136 m_log.Info("[GROUP]: Adding " + client.Name + " to OpenSimulator Tester group"); 157 m_log.Info("[GROUP]: Adding " + client.Name + " to " + OpenSimulatorGroup.groupName + " ");
137 GroupData[] updateGroups = new GroupData[1]; 158 GroupData[] updateGroups = new GroupData[1];
138 updateGroups[0] = OpenSimulatorGroup; 159 updateGroups[0] = OpenSimulatorGroup;
139 160
@@ -201,7 +222,22 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups
201 new LLVector3(msg.Position.x, msg.Position.y, msg.Position.z), new LLUUID(msg.RegionID), 222 new LLVector3(msg.Position.x, msg.Position.y, msg.Position.z), new LLUUID(msg.RegionID),
202 msg.binaryBucket); 223 msg.binaryBucket);
203 } 224 }
225 private void HandleUUIDGroupNameRequest(LLUUID id,IClientAPI remote_client)
226 {
227 string groupnamereply = "Unknown";
228 LLUUID groupUUID = LLUUID.Zero;
204 229
230 lock (m_groupUUIDGroup)
231 {
232 if (m_groupUUIDGroup.ContainsKey(id))
233 {
234 GroupData grp = m_groupUUIDGroup[id];
235 groupnamereply = grp.groupName;
236 groupUUID = grp.GroupID;
237 }
238 }
239 remote_client.SendGroupNameReply(groupUUID, groupnamereply);
240 }
205 private void OnClientClosed(LLUUID agentID) 241 private void OnClientClosed(LLUUID agentID)
206 { 242 {
207 lock (m_iclientmap) 243 lock (m_iclientmap)
diff --git a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs
index 815a505..71ea0e4 100644
--- a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs
+++ b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs
@@ -236,6 +236,7 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
236 public event RequestAsset OnRequestAsset; 236 public event RequestAsset OnRequestAsset;
237 237
238 public event UUIDNameRequest OnNameFromUUIDRequest; 238 public event UUIDNameRequest OnNameFromUUIDRequest;
239 public event UUIDNameRequest OnUUIDGroupNameRequest;
239 240
240 public event ParcelPropertiesRequest OnParcelPropertiesRequest; 241 public event ParcelPropertiesRequest OnParcelPropertiesRequest;
241 public event ParcelDivideRequest OnParcelDivideRequest; 242 public event ParcelDivideRequest OnParcelDivideRequest;
@@ -270,6 +271,8 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
270 271
271 public event ForceReleaseControls OnForceReleaseControls; 272 public event ForceReleaseControls OnForceReleaseControls;
272 273
274 public event RequestObjectPropertiesFamily OnObjectGroupRequest;
275
273 public event DetailedEstateDataRequest OnDetailedEstateDataRequest; 276 public event DetailedEstateDataRequest OnDetailedEstateDataRequest;
274 public event SetEstateFlagsRequest OnSetEstateFlagsRequest; 277 public event SetEstateFlagsRequest OnSetEstateFlagsRequest;
275 public event SetEstateTerrainBaseTexture OnSetEstateTerrainBaseTexture; 278 public event SetEstateTerrainBaseTexture OnSetEstateTerrainBaseTexture;
@@ -756,6 +759,10 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
756 public void sendLandParcelOverlay(byte[] data, int sequence_id) 759 public void sendLandParcelOverlay(byte[] data, int sequence_id)
757 { 760 {
758 } 761 }
762
763 public void SendGroupNameReply(LLUUID groupLLUID, string GroupName)
764 {
765 }
759 #endregion 766 #endregion
760 } 767 }
761} 768}