aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Framework/IClientAPI.cs3
-rw-r--r--OpenSim/Framework/LLGroup.cs52
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs24
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/Groups/GroupsModule.cs47
-rw-r--r--OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs6
-rw-r--r--OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs5
6 files changed, 99 insertions, 38 deletions
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index 690b04e..098e721 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -973,6 +973,9 @@ namespace OpenSim.Framework
973 LLVector3 CameraAtOffset, LLVector3 CameraEyeOffset, bool ForceMouseLook); 973 LLVector3 CameraAtOffset, LLVector3 CameraEyeOffset, bool ForceMouseLook);
974 974
975 void SendAdminResponse(LLUUID Token, uint AdminLevel); 975 void SendAdminResponse(LLUUID Token, uint AdminLevel);
976
977 void SendGroupMembership(GroupData[] GroupMembership);
978
976 979
977 byte[] GetThrottlesPacked(float multiplier); 980 byte[] GetThrottlesPacked(float multiplier);
978 981
diff --git a/OpenSim/Framework/LLGroup.cs b/OpenSim/Framework/LLGroup.cs
new file mode 100644
index 0000000..73d009a
--- /dev/null
+++ b/OpenSim/Framework/LLGroup.cs
@@ -0,0 +1,52 @@
1using System;
2using System.Collections;
3using libsecondlife;
4using System.Collections.Generic;
5using System.Text;
6
7namespace OpenSim.Framework
8{
9 public class GroupData
10 {
11 public string ActiveGroupTitle;
12 public LLUUID GroupID;
13 public List<LLUUID> GroupMembers;
14 public string groupName;
15 public uint groupPowers = (uint)(GroupPowers.LandAllowLandmark | GroupPowers.LandAllowSetHome);
16 public List<string> GroupTitles;
17 public bool AcceptNotices = true;
18 public bool AllowPublish = true;
19 public string Charter = "Cool Group Yeah!";
20 public int contribution = 0;
21 public LLUUID FounderID = LLUUID.Zero;
22 public int groupMembershipCost = 0;
23 public int groupRollsCount = 1;
24 public LLUUID GroupPicture = LLUUID.Zero;
25 public bool MaturePublish = true;
26 public int MembershipFee = 0;
27 public bool OpenEnrollment = true;
28 public bool ShowInList = true;
29
30 public GroupData()
31 {
32 GroupTitles = new List<string>();
33 GroupMembers = new List<LLUUID>();
34 }
35
36 public GroupPowers ActiveGroupPowers
37 {
38 set { groupPowers = (uint)value; }
39 get { return (GroupPowers)groupPowers; }
40 }
41 }
42
43 public class GroupList
44 {
45 public List<LLUUID> m_GroupList;
46
47 public GroupList()
48 {
49 m_GroupList = new List<LLUUID>();
50 }
51 }
52}
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 32432b4..395d555 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -5758,6 +5758,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5758 5758
5759 OutPacket(avatarSitResponse, ThrottleOutPacketType.Task); 5759 OutPacket(avatarSitResponse, ThrottleOutPacketType.Task);
5760 } 5760 }
5761
5761 public void SendAdminResponse(LLUUID Token, uint AdminLevel) 5762 public void SendAdminResponse(LLUUID Token, uint AdminLevel)
5762 { 5763 {
5763 GrantGodlikePowersPacket respondPacket = new GrantGodlikePowersPacket(); 5764 GrantGodlikePowersPacket respondPacket = new GrantGodlikePowersPacket();
@@ -5773,6 +5774,29 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5773 respondPacket.AgentData = adb; 5774 respondPacket.AgentData = adb;
5774 OutPacket(respondPacket, ThrottleOutPacketType.Task); 5775 OutPacket(respondPacket, ThrottleOutPacketType.Task);
5775 } 5776 }
5777
5778 public void SendGroupMembership(GroupData[] GroupMembership)
5779 {
5780 AgentGroupDataUpdatePacket Groupupdate = new AgentGroupDataUpdatePacket();
5781 AgentGroupDataUpdatePacket.GroupDataBlock[] Groups = new AgentGroupDataUpdatePacket.GroupDataBlock[GroupMembership.Length];
5782 for (int i = 0; i < GroupMembership.Length; i++)
5783 {
5784 AgentGroupDataUpdatePacket.GroupDataBlock Group = new AgentGroupDataUpdatePacket.GroupDataBlock();
5785 Group.AcceptNotices = GroupMembership[i].AcceptNotices;
5786 Group.Contribution = GroupMembership[i].contribution;
5787 Group.GroupID = GroupMembership[i].GroupID;
5788 Group.GroupInsigniaID = GroupMembership[i].GroupPicture;
5789 Group.GroupName = Helpers.StringToField(GroupMembership[i].groupName);
5790 Group.GroupPowers = GroupMembership[i].groupPowers;
5791 Groups[i] = Group;
5792 Groupupdate.GroupData = Groups;
5793
5794 }
5795 Groupupdate.AgentData.AgentID = AgentId;
5796 OutPacket(Groupupdate, ThrottleOutPacketType.Task);
5797
5798 }
5799
5776 public ClientInfo GetClientInfo() 5800 public ClientInfo GetClientInfo()
5777 { 5801 {
5778 //MainLog.Instance.Verbose("CLIENT", "GetClientInfo BGN"); 5802 //MainLog.Instance.Verbose("CLIENT", "GetClientInfo BGN");
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
diff --git a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs
index 3126f1c..f37e12a 100644
--- a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs
+++ b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs
@@ -102,6 +102,12 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
102 { 102 {
103 103
104 } 104 }
105
106 public void SendGroupMembership(GroupData[] GroupMembership)
107 {
108
109 }
110
105 public LLUUID GetDefaultAnimation(string name) 111 public LLUUID GetDefaultAnimation(string name)
106 { 112 {
107 return LLUUID.Zero; 113 return LLUUID.Zero;
diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
index 68f3ecb..6087857 100644
--- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
+++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
@@ -583,6 +583,11 @@ namespace OpenSim.Region.Examples.SimpleModule
583 583
584 } 584 }
585 585
586 public void SendGroupMembership(GroupData[] GroupMembership)
587 {
588
589 }
590
586 private void Update() 591 private void Update()
587 { 592 {
588 frame++; 593 frame++;