From 7c747035ff6940a165de5c74105cfbd20d18a566 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Tue, 21 Jul 2009 23:57:56 +0000 Subject: 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 --- .../Avatar/XmlRpcGroups/XmlRpcGroupsModule.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsModule.cs index b43a6ac..4a46949 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsModule.cs @@ -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(); + 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) -- cgit v1.1