aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules/Avatar/Groups/GroupsModule.cs
diff options
context:
space:
mode:
authorTeravus Ovares2008-05-14 06:58:32 +0000
committerTeravus Ovares2008-05-14 06:58:32 +0000
commit5b4d7922ea304f638b6a9bd0a324abefd1403ec1 (patch)
tree2f8be6c0b270ecc33b56e1d716d1977e9a3d9620 /OpenSim/Region/Environment/Modules/Avatar/Groups/GroupsModule.cs
parentMore formatting cleanup. Minor refactoring. (diff)
downloadopensim-SC_OLD-5b4d7922ea304f638b6a9bd0a324abefd1403ec1.zip
opensim-SC_OLD-5b4d7922ea304f638b6a9bd0a324abefd1403ec1.tar.gz
opensim-SC_OLD-5b4d7922ea304f638b6a9bd0a324abefd1403ec1.tar.bz2
opensim-SC_OLD-5b4d7922ea304f638b6a9bd0a324abefd1403ec1.tar.xz
* Adding the very bare minimum for the client to register user as having the group OpenSimulator Tester. This allows us to start examining and implementing the vary many unhandled group packets.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/Groups/GroupsModule.cs47
1 files changed, 9 insertions, 38 deletions
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Groups/GroupsModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Groups/GroupsModule.cs
index 0030350..5e87b49 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Groups/GroupsModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Groups/GroupsModule.cs
@@ -29,6 +29,7 @@ using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Reflection; 30using System.Reflection;
31using libsecondlife; 31using libsecondlife;
32using libsecondlife.Packets;
32using log4net; 33using log4net;
33using Nini.Config; 34using Nini.Config;
34using OpenSim.Framework; 35using OpenSim.Framework;
@@ -98,12 +99,6 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups
98 99
99 private void OnNewClient(IClientAPI client) 100 private void OnNewClient(IClientAPI client)
100 { 101 {
101 // All friends establishment protocol goes over instant message
102 // There's no way to send a message from the sim
103 // to a user to 'add a friend' without causing dialog box spam
104 //
105 // The base set of friends are added when the user signs on in their XMLRPC response
106 // Generated by LoginService. The friends are retreived from the database by the UserManager
107 102
108 // Subscribe to instant messages 103 // Subscribe to instant messages
109 client.OnInstantMessage += OnInstantMessage; 104 client.OnInstantMessage += OnInstantMessage;
@@ -140,6 +135,12 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups
140 } 135 }
141 } 136 }
142 m_log.Info("[GROUP]: Adding " + client.Name + " to OpenSimulator Tester group"); 137 m_log.Info("[GROUP]: Adding " + client.Name + " to OpenSimulator Tester group");
138 GroupData[] updateGroups = new GroupData[1];
139 updateGroups[0] = OpenSimulatorGroup;
140
141 client.SendGroupMembership(updateGroups);
142
143
143 } 144 }
144 145
145 private void OnAgentDataUpdateRequest(IClientAPI remoteClient, LLUUID AgentID, LLUUID SessionID) 146 private void OnAgentDataUpdateRequest(IClientAPI remoteClient, LLUUID AgentID, LLUUID SessionID)
@@ -150,8 +151,8 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups
150 151
151 LLUUID ActiveGroupID = LLUUID.Zero; 152 LLUUID ActiveGroupID = LLUUID.Zero;
152 uint ActiveGroupPowers = 0; 153 uint ActiveGroupPowers = 0;
153 string ActiveGroupName = ""; 154 string ActiveGroupName = "OpenSimulator Tester";
154 string ActiveGroupTitle = ""; 155 string ActiveGroupTitle = "I IZ N0T";
155 156
156 bool foundUser = false; 157 bool foundUser = false;
157 158
@@ -240,35 +241,5 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups
240 } 241 }
241 } 242 }
242 243
243 public class GroupData
244 {
245 public string ActiveGroupTitle;
246 public LLUUID GroupID;
247 public List<LLUUID> GroupMembers;
248 public string groupName;
249 public uint groupPowers = (uint) (GroupPowers.LandAllowLandmark | GroupPowers.LandAllowSetHome);
250 public List<string> GroupTitles;
251
252 public GroupData()
253 {
254 GroupTitles = new List<string>();
255 GroupMembers = new List<LLUUID>();
256 }
257 244
258 public GroupPowers ActiveGroupPowers
259 {
260 set { groupPowers = (uint) value; }
261 get { return (GroupPowers) groupPowers; }
262 }
263 }
264
265 public class GroupList
266 {
267 public List<LLUUID> m_GroupList;
268
269 public GroupList()
270 {
271 m_GroupList = new List<LLUUID>();
272 }
273 }
274} \ No newline at end of file 245} \ No newline at end of file