From a8913141c081202eb1f988901a4ac0988bbd72a2 Mon Sep 17 00:00:00 2001 From: BlueWall Date: Tue, 24 May 2011 16:03:01 -0400 Subject: Make client event handlers for money only work on root agents --- .../World/MoneyModule/SampleMoneyModule.cs | 36 ++++++++++++++++++---- 1 file changed, 30 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region/OptionalModules') diff --git a/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs index b84a34d..952e797 100644 --- a/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs +++ b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs @@ -177,9 +177,37 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule scene.EventManager.OnClientClosed += ClientLoggedOut; scene.EventManager.OnValidateLandBuy += ValidateLandBuy; scene.EventManager.OnLandBuy += processLandBuy; + scene.EventManager.OnMakeRootAgent += OnMakeRootAgent; } } + void OnMakeRootAgent(ScenePresence presence) + { + // Do this only for root agents + // Some implementations register $$ for + // child agents, then that never goes away + // We will send a zero balance when they are + // made root. + // + // Modules overriding this should only deal with + // root agents as well. + // + IClientAPI client = presence.ControllingClient; + + client.OnEconomyDataRequest += EconomyDataRequestHandler; + client.OnMoneyBalanceRequest += SendMoneyBalance; + client.OnRequestPayPrice += requestPayPrice; + client.OnObjectBuy += ObjectBuy; + client.OnLogout += ClientClosed; + + client.SendMoneyBalance (UUID.Random(), true, new byte[0], 0); + } + + void HandleSceneEventManagerOnMakeRootAgent (ScenePresence presence) + { + + } + public void RemoveRegion(Scene scene) { } @@ -277,13 +305,9 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule private void OnNewClient(IClientAPI client) { GetClientFunds(client); + // Moved the event registrations to fire them when + // the agent becomes root - // Subscribe to Money messages - client.OnEconomyDataRequest += EconomyDataRequestHandler; - client.OnMoneyBalanceRequest += SendMoneyBalance; - client.OnRequestPayPrice += requestPayPrice; - client.OnObjectBuy += ObjectBuy; - client.OnLogout += ClientClosed; } /// -- cgit v1.1 From ef3f6b4e63a49430bebbc929cb61d018a0a0d37c Mon Sep 17 00:00:00 2001 From: BlueWall Date: Tue, 24 May 2011 16:33:51 -0400 Subject: Revert "Make client event handlers for money only work on root agents" This reverts commit a8913141c081202eb1f988901a4ac0988bbd72a2. Pulling this back until some testing under various money modules can be done. Need to be able to make purchases as a child agent. --- .../World/MoneyModule/SampleMoneyModule.cs | 36 ++++------------------ 1 file changed, 6 insertions(+), 30 deletions(-) (limited to 'OpenSim/Region/OptionalModules') diff --git a/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs index 952e797..b84a34d 100644 --- a/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs +++ b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs @@ -177,37 +177,9 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule scene.EventManager.OnClientClosed += ClientLoggedOut; scene.EventManager.OnValidateLandBuy += ValidateLandBuy; scene.EventManager.OnLandBuy += processLandBuy; - scene.EventManager.OnMakeRootAgent += OnMakeRootAgent; } } - void OnMakeRootAgent(ScenePresence presence) - { - // Do this only for root agents - // Some implementations register $$ for - // child agents, then that never goes away - // We will send a zero balance when they are - // made root. - // - // Modules overriding this should only deal with - // root agents as well. - // - IClientAPI client = presence.ControllingClient; - - client.OnEconomyDataRequest += EconomyDataRequestHandler; - client.OnMoneyBalanceRequest += SendMoneyBalance; - client.OnRequestPayPrice += requestPayPrice; - client.OnObjectBuy += ObjectBuy; - client.OnLogout += ClientClosed; - - client.SendMoneyBalance (UUID.Random(), true, new byte[0], 0); - } - - void HandleSceneEventManagerOnMakeRootAgent (ScenePresence presence) - { - - } - public void RemoveRegion(Scene scene) { } @@ -305,9 +277,13 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule private void OnNewClient(IClientAPI client) { GetClientFunds(client); - // Moved the event registrations to fire them when - // the agent becomes root + // Subscribe to Money messages + client.OnEconomyDataRequest += EconomyDataRequestHandler; + client.OnMoneyBalanceRequest += SendMoneyBalance; + client.OnRequestPayPrice += requestPayPrice; + client.OnObjectBuy += ObjectBuy; + client.OnLogout += ClientClosed; } /// -- cgit v1.1 From 91ec1a572ab82b67a3e3090bb9d90009c294ef99 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 26 May 2011 02:48:47 +0100 Subject: improve help information for "appearance show" at the moment, this just performs a baked avatar check for everybody in the region. If the check returns 'corrupt' then a baked texture is missing and other avatars will continue to see the gas ball. --- .../Region/OptionalModules/Avatar/Appearance/AppearanceInfoModule.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/OptionalModules') diff --git a/OpenSim/Region/OptionalModules/Avatar/Appearance/AppearanceInfoModule.cs b/OpenSim/Region/OptionalModules/Avatar/Appearance/AppearanceInfoModule.cs index 8589901..7304145 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Appearance/AppearanceInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Appearance/AppearanceInfoModule.cs @@ -95,8 +95,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance scene.AddCommand( this, "appearance show", "appearance show", - "Show appearance information for each avatar in the simulator. At the moment, ", - ShowAppearanceInfo); + "Show appearance information for each avatar in the simulator.", + "At the moment this actually just checks that we have all the required baked textures. If not, then appearance is 'corrupt' and other avatars will continue to see a cloud.", + ShowAppearanceInfo); } protected void ShowAppearanceInfo(string module, string[] cmd) -- cgit v1.1