* 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.
parent
b7a0855c3a
commit
5b4d7922ea
|
@ -973,6 +973,9 @@ namespace OpenSim.Framework
|
|||
LLVector3 CameraAtOffset, LLVector3 CameraEyeOffset, bool ForceMouseLook);
|
||||
|
||||
void SendAdminResponse(LLUUID Token, uint AdminLevel);
|
||||
|
||||
void SendGroupMembership(GroupData[] GroupMembership);
|
||||
|
||||
|
||||
byte[] GetThrottlesPacked(float multiplier);
|
||||
|
||||
|
|
|
@ -0,0 +1,52 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using libsecondlife;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace OpenSim.Framework
|
||||
{
|
||||
public class GroupData
|
||||
{
|
||||
public string ActiveGroupTitle;
|
||||
public LLUUID GroupID;
|
||||
public List<LLUUID> GroupMembers;
|
||||
public string groupName;
|
||||
public uint groupPowers = (uint)(GroupPowers.LandAllowLandmark | GroupPowers.LandAllowSetHome);
|
||||
public List<string> GroupTitles;
|
||||
public bool AcceptNotices = true;
|
||||
public bool AllowPublish = true;
|
||||
public string Charter = "Cool Group Yeah!";
|
||||
public int contribution = 0;
|
||||
public LLUUID FounderID = LLUUID.Zero;
|
||||
public int groupMembershipCost = 0;
|
||||
public int groupRollsCount = 1;
|
||||
public LLUUID GroupPicture = LLUUID.Zero;
|
||||
public bool MaturePublish = true;
|
||||
public int MembershipFee = 0;
|
||||
public bool OpenEnrollment = true;
|
||||
public bool ShowInList = true;
|
||||
|
||||
public GroupData()
|
||||
{
|
||||
GroupTitles = new List<string>();
|
||||
GroupMembers = new List<LLUUID>();
|
||||
}
|
||||
|
||||
public GroupPowers ActiveGroupPowers
|
||||
{
|
||||
set { groupPowers = (uint)value; }
|
||||
get { return (GroupPowers)groupPowers; }
|
||||
}
|
||||
}
|
||||
|
||||
public class GroupList
|
||||
{
|
||||
public List<LLUUID> m_GroupList;
|
||||
|
||||
public GroupList()
|
||||
{
|
||||
m_GroupList = new List<LLUUID>();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -5758,6 +5758,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
|
||||
OutPacket(avatarSitResponse, ThrottleOutPacketType.Task);
|
||||
}
|
||||
|
||||
public void SendAdminResponse(LLUUID Token, uint AdminLevel)
|
||||
{
|
||||
GrantGodlikePowersPacket respondPacket = new GrantGodlikePowersPacket();
|
||||
|
@ -5773,6 +5774,29 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
respondPacket.AgentData = adb;
|
||||
OutPacket(respondPacket, ThrottleOutPacketType.Task);
|
||||
}
|
||||
|
||||
public void SendGroupMembership(GroupData[] GroupMembership)
|
||||
{
|
||||
AgentGroupDataUpdatePacket Groupupdate = new AgentGroupDataUpdatePacket();
|
||||
AgentGroupDataUpdatePacket.GroupDataBlock[] Groups = new AgentGroupDataUpdatePacket.GroupDataBlock[GroupMembership.Length];
|
||||
for (int i = 0; i < GroupMembership.Length; i++)
|
||||
{
|
||||
AgentGroupDataUpdatePacket.GroupDataBlock Group = new AgentGroupDataUpdatePacket.GroupDataBlock();
|
||||
Group.AcceptNotices = GroupMembership[i].AcceptNotices;
|
||||
Group.Contribution = GroupMembership[i].contribution;
|
||||
Group.GroupID = GroupMembership[i].GroupID;
|
||||
Group.GroupInsigniaID = GroupMembership[i].GroupPicture;
|
||||
Group.GroupName = Helpers.StringToField(GroupMembership[i].groupName);
|
||||
Group.GroupPowers = GroupMembership[i].groupPowers;
|
||||
Groups[i] = Group;
|
||||
Groupupdate.GroupData = Groups;
|
||||
|
||||
}
|
||||
Groupupdate.AgentData.AgentID = AgentId;
|
||||
OutPacket(Groupupdate, ThrottleOutPacketType.Task);
|
||||
|
||||
}
|
||||
|
||||
public ClientInfo GetClientInfo()
|
||||
{
|
||||
//MainLog.Instance.Verbose("CLIENT", "GetClientInfo BGN");
|
||||
|
|
|
@ -29,6 +29,7 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using libsecondlife;
|
||||
using libsecondlife.Packets;
|
||||
using log4net;
|
||||
using Nini.Config;
|
||||
using OpenSim.Framework;
|
||||
|
@ -98,12 +99,6 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups
|
|||
|
||||
private void OnNewClient(IClientAPI client)
|
||||
{
|
||||
// All friends establishment protocol goes over instant message
|
||||
// There's no way to send a message from the sim
|
||||
// to a user to 'add a friend' without causing dialog box spam
|
||||
//
|
||||
// The base set of friends are added when the user signs on in their XMLRPC response
|
||||
// Generated by LoginService. The friends are retreived from the database by the UserManager
|
||||
|
||||
// Subscribe to instant messages
|
||||
client.OnInstantMessage += OnInstantMessage;
|
||||
|
@ -140,6 +135,12 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups
|
|||
}
|
||||
}
|
||||
m_log.Info("[GROUP]: Adding " + client.Name + " to OpenSimulator Tester group");
|
||||
GroupData[] updateGroups = new GroupData[1];
|
||||
updateGroups[0] = OpenSimulatorGroup;
|
||||
|
||||
client.SendGroupMembership(updateGroups);
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void OnAgentDataUpdateRequest(IClientAPI remoteClient, LLUUID AgentID, LLUUID SessionID)
|
||||
|
@ -150,8 +151,8 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups
|
|||
|
||||
LLUUID ActiveGroupID = LLUUID.Zero;
|
||||
uint ActiveGroupPowers = 0;
|
||||
string ActiveGroupName = "";
|
||||
string ActiveGroupTitle = "";
|
||||
string ActiveGroupName = "OpenSimulator Tester";
|
||||
string ActiveGroupTitle = "I IZ N0T";
|
||||
|
||||
bool foundUser = false;
|
||||
|
||||
|
@ -240,35 +241,5 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups
|
|||
}
|
||||
}
|
||||
|
||||
public class GroupData
|
||||
{
|
||||
public string ActiveGroupTitle;
|
||||
public LLUUID GroupID;
|
||||
public List<LLUUID> GroupMembers;
|
||||
public string groupName;
|
||||
public uint groupPowers = (uint) (GroupPowers.LandAllowLandmark | GroupPowers.LandAllowSetHome);
|
||||
public List<string> GroupTitles;
|
||||
|
||||
public GroupData()
|
||||
{
|
||||
GroupTitles = new List<string>();
|
||||
GroupMembers = new List<LLUUID>();
|
||||
}
|
||||
|
||||
public GroupPowers ActiveGroupPowers
|
||||
{
|
||||
set { groupPowers = (uint) value; }
|
||||
get { return (GroupPowers) groupPowers; }
|
||||
}
|
||||
}
|
||||
|
||||
public class GroupList
|
||||
{
|
||||
public List<LLUUID> m_GroupList;
|
||||
|
||||
public GroupList()
|
||||
{
|
||||
m_GroupList = new List<LLUUID>();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -102,6 +102,12 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
|
|||
{
|
||||
|
||||
}
|
||||
|
||||
public void SendGroupMembership(GroupData[] GroupMembership)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public LLUUID GetDefaultAnimation(string name)
|
||||
{
|
||||
return LLUUID.Zero;
|
||||
|
|
|
@ -583,6 +583,11 @@ namespace OpenSim.Region.Examples.SimpleModule
|
|||
|
||||
}
|
||||
|
||||
public void SendGroupMembership(GroupData[] GroupMembership)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
frame++;
|
||||
|
|
Loading…
Reference in New Issue