More groups plumbing

0.6.1-post-fixes
Melanie Thielker 2008-11-14 05:18:39 +00:00
parent c79a11cbd1
commit 4f91da2488
5 changed files with 132 additions and 0 deletions

View File

@ -972,6 +972,12 @@ namespace OpenSim.Framework
void SendGroupNameReply(UUID groupLLUID, string GroupName);
void SendJoinGroupReply(UUID groupID, bool success);
void SendEjectGroupMemberReply(UUID agentID, UUID groupID, bool success);
void SendLeaveGroupReply(UUID agentID, UUID groupID, bool success);
void SendLandStatReply(uint reportType, uint requestFlags, uint resultCount, LandStatReportItem[] lsrpia);
void SendScriptRunningReply(UUID objectID, UUID itemID, bool running);

View File

@ -6867,6 +6867,60 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
break;
case PacketType.JoinGroupRequest:
JoinGroupRequestPacket joinGroupRequest =
(JoinGroupRequestPacket)Pack;
if (m_GroupsModule != null)
{
m_GroupsModule.JoinGroupRequest(this,
joinGroupRequest.GroupData.GroupID);
}
break;
case PacketType.LeaveGroupRequest:
LeaveGroupRequestPacket leaveGroupRequest =
(LeaveGroupRequestPacket)Pack;
if (m_GroupsModule != null)
{
m_GroupsModule.LeaveGroupRequest(this,
leaveGroupRequest.GroupData.GroupID);
}
break;
case PacketType.EjectGroupMemberRequest:
EjectGroupMemberRequestPacket ejectGroupMemberRequest =
(EjectGroupMemberRequestPacket)Pack;
if (m_GroupsModule != null)
{
foreach (EjectGroupMemberRequestPacket.EjectDataBlock e
in ejectGroupMemberRequest.EjectData)
{
m_GroupsModule.EjectGroupMemberRequest(this,
ejectGroupMemberRequest.GroupData.GroupID,
e.EjecteeID);
}
}
break;
case PacketType.InviteGroupRequest:
InviteGroupRequestPacket inviteGroupRequest =
(InviteGroupRequestPacket)Pack;
if (m_GroupsModule != null)
{
foreach (InviteGroupRequestPacket.InviteDataBlock b in
inviteGroupRequest.InviteData)
{
m_GroupsModule.InviteGroupRequest(this,
inviteGroupRequest.GroupData.GroupID,
b.InviteeID,
b.RoleID);
}
}
break;
default:
m_log.Warn("[CLIENT]: unhandled packet " + Pack);
break;
@ -7648,6 +7702,50 @@ namespace OpenSim.Region.ClientStack.LindenUDP
OutPacket(p, ThrottleOutPacketType.Task);
}
public void SendJoinGroupReply(UUID groupID, bool success)
{
JoinGroupReplyPacket p = (JoinGroupReplyPacket)PacketPool.Instance.GetPacket(PacketType.JoinGroupReply);
p.AgentData = new JoinGroupReplyPacket.AgentDataBlock();
p.AgentData.AgentID = AgentId;
p.GroupData = new JoinGroupReplyPacket.GroupDataBlock();
p.GroupData.GroupID = groupID;
p.GroupData.Success = success;
OutPacket(p, ThrottleOutPacketType.Task);
}
public void SendEjectGroupMemberReply(UUID agentID, UUID groupID, bool success)
{
EjectGroupMemberReplyPacket p = (EjectGroupMemberReplyPacket)PacketPool.Instance.GetPacket(PacketType.EjectGroupMemberReply);
p.AgentData = new EjectGroupMemberReplyPacket.AgentDataBlock();
p.AgentData.AgentID = agentID;
p.GroupData = new EjectGroupMemberReplyPacket.GroupDataBlock();
p.GroupData.GroupID = groupID;
p.EjectData = new EjectGroupMemberReplyPacket.EjectDataBlock();
p.EjectData.Success = success;
OutPacket(p, ThrottleOutPacketType.Task);
}
public void SendLeaveGroupReply(UUID agentID, UUID groupID, bool success)
{
LeaveGroupReplyPacket p = (LeaveGroupReplyPacket)PacketPool.Instance.GetPacket(PacketType.LeaveGroupReply);
p.AgentData = new LeaveGroupReplyPacket.AgentDataBlock();
p.AgentData.AgentID = agentID;
p.GroupData = new LeaveGroupReplyPacket.GroupDataBlock();
p.GroupData.GroupID = groupID;
p.GroupData.Success = success;
OutPacket(p, ThrottleOutPacketType.Task);
}
public void KillEndDone()
{
KillPacket kp = new KillPacket();

View File

@ -963,6 +963,18 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
{
}
public void SendJoinGroupReply(UUID groupID, bool success)
{
}
public void SendEjectGroupMemberReply(UUID agentID, UUID groupID, bool success)
{
}
public void SendLeaveGroupReply(UUID agentID, UUID groupID, bool success)
{
}
public void SendAvatarGroupsReply(UUID avatarID, GroupMembershipData[] data)
{
}

View File

@ -968,6 +968,18 @@ namespace OpenSim.Region.Examples.SimpleModule
{
}
public void SendJoinGroupReply(UUID groupID, bool success)
{
}
public void SendEjectGroupMemberReply(UUID agentID, UUID groupID, bool succss)
{
}
public void SendLeaveGroupReply(UUID agentID, UUID groupID, bool success)
{
}
public void SendTerminateFriend(UUID exFriendID)
{
}

View File

@ -55,5 +55,9 @@ namespace OpenSim.Region.Interfaces
void GroupRoleChanges(IClientAPI remoteClient, UUID GroupID, UUID RoleID, UUID MemberID, uint changes);
void GroupNoticeRequest(IClientAPI remoteClient, UUID groupNoticeID);
void SendAgentGroupDataUpdate(IClientAPI remoteClient);
void JoinGroupRequest(IClientAPI remoteClient, UUID GroupID);
void LeaveGroupRequest(IClientAPI remoteClient, UUID GroupID);
void EjectGroupMemberRequest(IClientAPI remoteClient, UUID GroupID, UUID EjecteeID);
void InviteGroupRequest(IClientAPI remoteClient, UUID GroupID, UUID InviteeID, UUID RoleID);
}
}