From 5b4d7922ea304f638b6a9bd0a324abefd1403ec1 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Wed, 14 May 2008 06:58:32 +0000 Subject: * 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. --- .../Modules/Avatar/Groups/GroupsModule.cs | 47 +++++----------------- 1 file changed, 9 insertions(+), 38 deletions(-) (limited to 'OpenSim/Region/Environment/Modules/Avatar/Groups/GroupsModule.cs') 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; 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 GroupMembers; - public string groupName; - public uint groupPowers = (uint) (GroupPowers.LandAllowLandmark | GroupPowers.LandAllowSetHome); - public List GroupTitles; - - public GroupData() - { - GroupTitles = new List(); - GroupMembers = new List(); - } - public GroupPowers ActiveGroupPowers - { - set { groupPowers = (uint) value; } - get { return (GroupPowers) groupPowers; } - } - } - - public class GroupList - { - public List m_GroupList; - - public GroupList() - { - m_GroupList = new List(); - } - } } \ No newline at end of file -- cgit v1.1