More plumbing and some wires

0.6.0-stable
Melanie Thielker 2008-10-25 01:42:43 +00:00
parent f85be9b39a
commit 26643c4a9d
3 changed files with 65 additions and 1 deletions

View File

@ -113,4 +113,14 @@ namespace OpenSim.Framework
public UUID RoleID;
public UUID MemberID;
}
public struct GroupNoticeData
{
public UUID NoticeID;
public uint Timestamp;
public string FromName;
public string Subject;
public bool HasAttachment;
public byte AssetType;
}
}

View File

@ -6809,6 +6809,58 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
break;
case PacketType.GroupNoticesListRequest:
GroupNoticesListRequestPacket groupNoticesListRequest =
(GroupNoticesListRequestPacket)Pack;
if (m_GroupsModule != null)
{
GroupNoticeData[] gn =
m_GroupsModule.GroupNoticesListRequest(this,
groupNoticesListRequest.Data.GroupID);
GroupNoticesListReplyPacket groupNoticesListReply = (GroupNoticesListReplyPacket)PacketPool.Instance.GetPacket(PacketType.GroupNoticesListReply);
groupNoticesListReply.AgentData =
new GroupNoticesListReplyPacket.AgentDataBlock();
groupNoticesListReply.AgentData.AgentID = AgentId;
groupNoticesListReply.AgentData.GroupID = groupNoticesListRequest.Data.GroupID;
groupNoticesListReply.Data = new GroupNoticesListReplyPacket.DataBlock[gn.Length];
int i = 0;
foreach (GroupNoticeData g in gn)
{
groupNoticesListReply.Data[i] = new GroupNoticesListReplyPacket.DataBlock();
groupNoticesListReply.Data[i].NoticeID =
g.NoticeID;
groupNoticesListReply.Data[i].Timestamp =
g.Timestamp;
groupNoticesListReply.Data[i].FromName =
Utils.StringToBytes(g.FromName);
groupNoticesListReply.Data[i].Subject =
Utils.StringToBytes(g.Subject);
groupNoticesListReply.Data[i].HasAttachment =
g.HasAttachment;
groupNoticesListReply.Data[i].AssetType =
g.AssetType;
i++;
}
OutPacket(groupNoticesListReply, ThrottleOutPacketType.Task);
}
break;
case PacketType.GroupNoticeRequest:
GroupNoticeRequestPacket groupNoticeRequest =
(GroupNoticeRequestPacket)Pack;
if (m_GroupsModule != null)
{
m_GroupsModule.GroupNoticeRequest(this,
groupNoticeRequest.Data.GroupNoticeID);
}
break;
default:
m_log.Warn("[CLIENT]: unhandled packet " + Pack.ToString());
break;

View File

@ -49,6 +49,8 @@ namespace OpenSim.Region.Interfaces
void GroupTitleUpdate(IClientAPI remoteClient, UUID GroupID, UUID TitleRoleID);
UUID CreateGroup(IClientAPI remoteClient, string name, string charter, bool showInList, UUID insigniaID, int membershipFee, bool openEnrollment, bool allowPublish, bool maturePublish);
GroupNoticeData[] GroupNoticesListRequest(IClientAPI remoteClient, UUID GroupID);
void GroupNoticeRequest(IClientAPI remoteClient, UUID groupNoticeID);
void SendAgentGroupDataUpdate(IClientAPI remoteClient);
}
}