From 47180080f0f4b93c60232b47ca4e093bd7c73a1d Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Tue, 18 Mar 2008 05:16:43 +0000 Subject: Formatting cleanup. --- .../Environment/Modules/BetaGridLikeMoneyModule.cs | 66 +++++++++------------- 1 file changed, 27 insertions(+), 39 deletions(-) (limited to 'OpenSim/Region/Environment/Modules/BetaGridLikeMoneyModule.cs') diff --git a/OpenSim/Region/Environment/Modules/BetaGridLikeMoneyModule.cs b/OpenSim/Region/Environment/Modules/BetaGridLikeMoneyModule.cs index d53083f..6e16eb3 100644 --- a/OpenSim/Region/Environment/Modules/BetaGridLikeMoneyModule.cs +++ b/OpenSim/Region/Environment/Modules/BetaGridLikeMoneyModule.cs @@ -1,30 +1,29 @@ /* -* Copyright (c) Contributors, http://opensimulator.org/ -* See CONTRIBUTORS.TXT for a full list of copyright holders. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in the -* documentation and/or other materials provided with the distribution. -* * Neither the name of the OpenSim Project nor the -* names of its contributors may be used to endorse or promote products -* derived from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY -* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -*/ + * Copyright (c) Contributors, http://opensimulator.org/ + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSim Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ using System; using System.Collections.Generic; @@ -53,12 +52,8 @@ namespace OpenSim.Region.Environment.Modules private bool m_enabled = true; - - private Dictionary m_KnownClientFunds = new Dictionary(); - - private bool gridmode = false; public void Initialise(Scene scene, IConfigSource config) @@ -86,12 +81,12 @@ namespace OpenSim.Region.Environment.Modules scene.EventManager.OnClientClosed += ClientClosed; } } + private void ReadConfigAndPopulate() { IConfig startupConfig = m_gConfig.Configs["Startup"]; gridmode = startupConfig.GetBoolean("gridmode", false); m_enabled = (startupConfig.GetString("moneymodule", "BetaGridLikeMoneyModule") == "BetaGridLikeMoneyModule"); - } private void OnNewClient(IClientAPI client) @@ -112,7 +107,6 @@ namespace OpenSim.Region.Environment.Modules // Subscribe to Money messages client.OnMoneyBalanceRequest += SendMoneyBalance; client.OnLogout += ClientClosed; - } public void ClientClosed(LLUUID AgentID) @@ -122,7 +116,6 @@ namespace OpenSim.Region.Environment.Modules if (!m_keepMoneyAcrossLogins) m_KnownClientFunds.Remove(AgentID); } - } private void MoneyTransferAction (Object osender, MoneyTransferArgs e) @@ -133,8 +126,6 @@ namespace OpenSim.Region.Environment.Modules sender = LocateClientObject(e.sender); if (sender != null) { - - receiver = LocateClientObject(e.reciever); bool transactionresult = doMoneyTranfer(e.sender, e.reciever, e.amount); @@ -238,7 +229,6 @@ namespace OpenSim.Region.Environment.Modules { if (client.AgentId == agentID && client.SessionId == SessionID) { - int returnfunds = 0; try @@ -275,6 +265,7 @@ namespace OpenSim.Region.Environment.Modules } } } + private int GetFundsForAgentID(LLUUID AgentID) { int returnfunds = 0; @@ -296,8 +287,6 @@ namespace OpenSim.Region.Environment.Modules { } - - public void Close() { } @@ -312,5 +301,4 @@ namespace OpenSim.Region.Environment.Modules get { return true; } } } - } -- cgit v1.1