From 37e81c7d54db5b775550db9455bcd9cdce046bc7 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Fri, 27 Mar 2009 18:51:45 +0000 Subject: Remove a hardcoded flow/dependency on the money module from LLCLientView --- .../Region/ClientStack/LindenUDP/LLClientView.cs | 56 +++++++--------------- .../Region/Examples/SimpleModule/MyNpcCharacter.cs | 4 ++ .../Region/OptionalModules/World/NPC/NPCAvatar.cs | 4 ++ 3 files changed, 25 insertions(+), 39 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index e69f373..84a32ff 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -7194,25 +7194,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (m_GroupsModule != null) { - CreateGroupReplyPacket createGroupReply = (CreateGroupReplyPacket)PacketPool.Instance.GetPacket(PacketType.CreateGroupReply); - - createGroupReply.AgentData = - new CreateGroupReplyPacket.AgentDataBlock(); - createGroupReply.ReplyData = - new CreateGroupReplyPacket.ReplyDataBlock(); - - createGroupReply.AgentData.AgentID = AgentId; - createGroupReply.ReplyData.GroupID = UUID.Zero; - - IMoneyModule money = m_scene.RequestModuleInterface(); - if (money != null && !money.GroupCreationCovered(this)) - { - createGroupReply.ReplyData.Success = false; - createGroupReply.ReplyData.Message = Utils.StringToBytes("You do not have sufficient funds to create a group"); - OutPacket(createGroupReply, ThrottleOutPacketType.Task); - break; - } - UUID groupID = m_GroupsModule.CreateGroup(this, Utils.BytesToString(createGroupRequest.GroupData.Name), Utils.BytesToString(createGroupRequest.GroupData.Charter), @@ -7222,26 +7203,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP createGroupRequest.GroupData.OpenEnrollment, createGroupRequest.GroupData.AllowPublish, createGroupRequest.GroupData.MaturePublish); - if (groupID == UUID.Zero) - { - createGroupReply.ReplyData.Success = false; - createGroupReply.ReplyData.Message = Utils.StringToBytes("We're sorry, but we could not create the requested group. Please try another name"); - OutPacket(createGroupReply, ThrottleOutPacketType.Task); - break; - } - - if (money != null) - money.ApplyGroupCreationCharge(AgentId); - - createGroupReply.ReplyData.Success = true; - createGroupReply.ReplyData.GroupID = groupID; - createGroupReply.ReplyData.Message = Utils.StringToBytes("Group created"); - OutPacket(createGroupReply, ThrottleOutPacketType.Task); - - // Sync with event queue - Thread.Sleep(1000); - - m_GroupsModule.SendAgentGroupDataUpdate(this); } break; @@ -8638,6 +8599,23 @@ namespace OpenSim.Region.ClientStack.LindenUDP } } + public void SendCreateGroupReply(UUID groupID, bool success, string message) + { + CreateGroupReplyPacket createGroupReply = (CreateGroupReplyPacket)PacketPool.Instance.GetPacket(PacketType.CreateGroupReply); + + createGroupReply.AgentData = + new CreateGroupReplyPacket.AgentDataBlock(); + createGroupReply.ReplyData = + new CreateGroupReplyPacket.ReplyDataBlock(); + + createGroupReply.AgentData.AgentID = AgentId; + createGroupReply.ReplyData.GroupID = groupID; + + createGroupReply.ReplyData.Success = success; + createGroupReply.ReplyData.Message = Utils.StringToBytes(message); + OutPacket(createGroupReply, ThrottleOutPacketType.Task); + } + public string Report() { LLPacketHandler handler = (LLPacketHandler) m_PacketHandler; diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs index 9828d68..803eeb4 100644 --- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs +++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs @@ -1053,6 +1053,10 @@ namespace OpenSim.Region.Examples.SimpleModule { } + public void SendCreateGroupReply(UUID groupID, bool success, string message) + { + } + #endregion } } diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index da2d781..71f7cc0 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs @@ -1053,6 +1053,10 @@ namespace OpenSim.Region.OptionalModules.World.NPC { } + public void SendCreateGroupReply(UUID groupID, bool success, string message) + { + } + #endregion } } -- cgit v1.1