Thank you, MarcelEdward, for a patch to add paying group join fees.

Applied with changes (original patch would not compile)
Whitespace changes removed
Fixes Mantis #3926
trunk
Melanie Thielker 2009-07-21 23:57:56 +00:00
parent c243ae43f2
commit 7c747035ff
1 changed files with 12 additions and 1 deletions

View File

@ -724,7 +724,17 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
remoteClient.SendCreateGroupReply(UUID.Zero, false, "A group with the same name already exists.");
return UUID.Zero;
}
// is there is a money module present ?
IMoneyModule money=remoteClient.Scene.RequestModuleInterface<IMoneyModule>();
if (money != null)
{
// do the transaction, that is if the agent has got sufficient funds
if (!money.GroupCreationCovered(remoteClient)) {
remoteClient.SendCreateGroupReply(UUID.Zero, false, "You have got issuficient funds to create a group.");
return UUID.Zero;
}
money.ApplyGroupCreationCharge(remoteClient.AgentId);
}
UUID groupID = m_groupData.CreateGroup(grID, name, charter, showInList, insigniaID, membershipFee, openEnrollment, allowPublish, maturePublish, remoteClient.AgentId);
remoteClient.SendCreateGroupReply(groupID, true, "Group created successfullly");
@ -733,6 +743,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
SendAgentGroupDataUpdate(remoteClient, remoteClient.AgentId);
return groupID;
}
public GroupNoticeData[] GroupNoticesListRequest(IClientAPI remoteClient, UUID groupID)