From 7319ba62dd1791a3dade5b5453e369d955de48a2 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 5 Jan 2012 20:51:49 +0000 Subject: Move simulator asset info commands to an optional module from the connector. Make them conform with service side commands. This stops them appearing twice when Hypergrid is enabled. --- .../Connectors/Asset/AssetServiceConnector.cs | 45 +--------------------- 1 file changed, 2 insertions(+), 43 deletions(-) (limited to 'OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs') diff --git a/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs b/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs index d7b2ff8..e4c3eaf 100644 --- a/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs +++ b/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs @@ -86,11 +86,8 @@ namespace OpenSim.Services.Connectors m_log.Error("[ASSET CONNECTOR]: No Server URI named in section AssetService"); throw new Exception("Asset connector init error"); } - m_ServerURI = serviceURI; - MainConsole.Instance.Commands.AddCommand("asset", false, "dump asset", - "dump asset ", - "dump one cached asset", HandleDumpAsset); + m_ServerURI = serviceURI; } protected void SetCache(IImprovedAssetCache cache) @@ -328,43 +325,5 @@ namespace OpenSim.Services.Connectors } return false; } - - private void HandleDumpAsset(string module, string[] args) - { - if (args.Length != 4) - { - MainConsole.Instance.Output("Syntax: dump asset "); - return; - } - - UUID assetID; - - if (!UUID.TryParse(args[2], out assetID)) - { - MainConsole.Instance.Output("Invalid asset ID"); - return; - } - - if (m_Cache == null) - { - MainConsole.Instance.Output("Instance uses no cache"); - return; - } - - AssetBase asset = m_Cache.Get(assetID.ToString()); - - if (asset == null) - { - MainConsole.Instance.Output("Asset not found in cache"); - return; - } - - string fileName = args[3]; - - FileStream fs = File.Create(fileName); - fs.Write(asset.Data, 0, asset.Data.Length); - - fs.Close(); - } } -} +} \ No newline at end of file -- cgit v1.1