From e377abcc35c5fb4d47418524ae68364705995915 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 30 Jun 2013 08:39:35 -0700 Subject: Groups V2: charge for group creation only after the group has been successfully created --- OpenSim/Addons/Groups/GroupsModule.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'OpenSim/Addons/Groups') diff --git a/OpenSim/Addons/Groups/GroupsModule.cs b/OpenSim/Addons/Groups/GroupsModule.cs index 5b3b9f6..5959bac 100644 --- a/OpenSim/Addons/Groups/GroupsModule.cs +++ b/OpenSim/Addons/Groups/GroupsModule.cs @@ -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. -- cgit v1.1