mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
Groups V2: charge for group creation only after the group has been successfully created
This commit is contained in:
@@ -766,14 +766,17 @@ namespace OpenSim.Groups
|
||||
remoteClient.SendCreateGroupReply(UUID.Zero, false, "Insufficient funds to create a group.");
|
||||
return UUID.Zero;
|
||||
}
|
||||
money.ApplyCharge(remoteClient.AgentId, money.GroupCreationCharge, MoneyTransactionType.GroupCreate);
|
||||
}
|
||||
|
||||
string reason = string.Empty;
|
||||
UUID groupID = m_groupData.CreateGroup(remoteClient.AgentId, name, charter, showInList, insigniaID, membershipFee, openEnrollment,
|
||||
allowPublish, maturePublish, remoteClient.AgentId, out reason);
|
||||
|
||||
if (groupID != UUID.Zero)
|
||||
{
|
||||
if (money != null)
|
||||
money.ApplyCharge(remoteClient.AgentId, money.GroupCreationCharge, MoneyTransactionType.GroupCreate);
|
||||
|
||||
remoteClient.SendCreateGroupReply(groupID, true, "Group created successfullly");
|
||||
|
||||
// Update the founder with new group information.
|
||||
|
||||
Reference in New Issue
Block a user