Groups V2: charge for group creation only after the group has been successfully created
parent
c738368846
commit
e377abcc35
|
@ -766,14 +766,17 @@ namespace OpenSim.Groups
|
||||||
remoteClient.SendCreateGroupReply(UUID.Zero, false, "Insufficient funds to create a group.");
|
remoteClient.SendCreateGroupReply(UUID.Zero, false, "Insufficient funds to create a group.");
|
||||||
return UUID.Zero;
|
return UUID.Zero;
|
||||||
}
|
}
|
||||||
money.ApplyCharge(remoteClient.AgentId, money.GroupCreationCharge, MoneyTransactionType.GroupCreate);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
string reason = string.Empty;
|
string reason = string.Empty;
|
||||||
UUID groupID = m_groupData.CreateGroup(remoteClient.AgentId, name, charter, showInList, insigniaID, membershipFee, openEnrollment,
|
UUID groupID = m_groupData.CreateGroup(remoteClient.AgentId, name, charter, showInList, insigniaID, membershipFee, openEnrollment,
|
||||||
allowPublish, maturePublish, remoteClient.AgentId, out reason);
|
allowPublish, maturePublish, remoteClient.AgentId, out reason);
|
||||||
|
|
||||||
if (groupID != UUID.Zero)
|
if (groupID != UUID.Zero)
|
||||||
{
|
{
|
||||||
|
if (money != null)
|
||||||
|
money.ApplyCharge(remoteClient.AgentId, money.GroupCreationCharge, MoneyTransactionType.GroupCreate);
|
||||||
|
|
||||||
remoteClient.SendCreateGroupReply(groupID, true, "Group created successfullly");
|
remoteClient.SendCreateGroupReply(groupID, true, "Group created successfullly");
|
||||||
|
|
||||||
// Update the founder with new group information.
|
// Update the founder with new group information.
|
||||||
|
|
Loading…
Reference in New Issue