aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server
diff options
context:
space:
mode:
authorMelanie2019-08-20 23:28:59 +0100
committerMelanie2019-08-20 23:28:59 +0100
commit0fd17c08ae642fac17b24dfad06c61cfe5739483 (patch)
tree4871c96eab2f5b118cb09d670a3a4ba024cf1210 /OpenSim/Server
parentchange PGSQL migration (diff)
downloadopensim-SC-0fd17c08ae642fac17b24dfad06c61cfe5739483.zip
opensim-SC-0fd17c08ae642fac17b24dfad06c61cfe5739483.tar.gz
opensim-SC-0fd17c08ae642fac17b24dfad06c61cfe5739483.tar.bz2
opensim-SC-0fd17c08ae642fac17b24dfad06c61cfe5739483.tar.xz
Massive console refactor. Greatly simplify interface.
Diffstat (limited to 'OpenSim/Server')
-rwxr-xr-x[-rw-r--r--]OpenSim/Server/Base/CommandManager.cs15
-rwxr-xr-x[-rw-r--r--]OpenSim/Server/Handlers/Asset/AssetServerConnector.cs26
2 files changed, 23 insertions, 18 deletions
diff --git a/OpenSim/Server/Base/CommandManager.cs b/OpenSim/Server/Base/CommandManager.cs
index ffb20ce..9ada974 100644..100755
--- a/OpenSim/Server/Base/CommandManager.cs
+++ b/OpenSim/Server/Base/CommandManager.cs
@@ -178,7 +178,8 @@ namespace OpenSim.Server.Base
178 { 178 {
179 Dictionary<string, object> plugin = (Dictionary<string, object>)result[k]; 179 Dictionary<string, object> plugin = (Dictionary<string, object>)result[k];
180 bool enabled = (bool)plugin["enabled"]; 180 bool enabled = (bool)plugin["enabled"];
181 MainConsole.Instance.OutputFormat("{0}) {1} {2} rev. {3}", 181 MainConsole.Instance.Output("{0}) {1} {2} rev. {3}",
182 null,
182 k, 183 k,
183 enabled == true ? "[ ]" : "[X]", 184 enabled == true ? "[ ]" : "[X]",
184 plugin["name"], plugin["version"]); 185 plugin["name"], plugin["version"]);
@@ -215,7 +216,8 @@ namespace OpenSim.Server.Base
215 { 216 {
216 Dictionary<string, object> plugin = (Dictionary<string, object>)result[k]; 217 Dictionary<string, object> plugin = (Dictionary<string, object>)result[k];
217 bool enabled = (bool)plugin["enabled"]; 218 bool enabled = (bool)plugin["enabled"];
218 MainConsole.Instance.OutputFormat("{0}) {1} {2} rev. {3}", 219 MainConsole.Instance.Output("{0}) {1} {2} rev. {3}",
220 null,
219 k, 221 k,
220 enabled == true ? "[ ]" : "[X]", 222 enabled == true ? "[ ]" : "[X]",
221 plugin["name"], plugin["version"]); 223 plugin["name"], plugin["version"]);
@@ -235,7 +237,8 @@ namespace OpenSim.Server.Base
235 { 237 {
236 // name, version, repository 238 // name, version, repository
237 Dictionary<string, object> plugin = (Dictionary<string, object>)result[k]; 239 Dictionary<string, object> plugin = (Dictionary<string, object>)result[k];
238 MainConsole.Instance.OutputFormat("{0}) {1} rev. {2} {3}", 240 MainConsole.Instance.Output("{0}) {1} rev. {2} {3}",
241 null,
239 k, 242 k,
240 plugin["name"], 243 plugin["name"],
241 plugin["version"], 244 plugin["version"],
@@ -309,7 +312,8 @@ namespace OpenSim.Server.Base
309 { 312 {
310 Dictionary<string, object> repo = (Dictionary<string, object>)result[k]; 313 Dictionary<string, object> repo = (Dictionary<string, object>)result[k];
311 bool enabled = (bool)repo["enabled"]; 314 bool enabled = (bool)repo["enabled"];
312 MainConsole.Instance.OutputFormat("{0}) {1} {2}", 315 MainConsole.Instance.Output("{0}) {1} {2}",
316 null,
313 k, 317 k,
314 enabled == true ? "[ ]" : "[X]", 318 enabled == true ? "[ ]" : "[X]",
315 repo["name"], repo["url"]); 319 repo["name"], repo["url"]);
@@ -329,7 +333,8 @@ namespace OpenSim.Server.Base
329 int ndx = Convert.ToInt16(cmd[2]); 333 int ndx = Convert.ToInt16(cmd[2]);
330 PluginManager.AddinInfo(ndx, out result); 334 PluginManager.AddinInfo(ndx, out result);
331 335
332 MainConsole.Instance.OutputFormat("Name: {0}\nURL: {1}\nFile: {2}\nAuthor: {3}\nCategory: {4}\nDesc: {5}", 336 MainConsole.Instance.Output("Name: {0}\nURL: {1}\nFile: {2}\nAuthor: {3}\nCategory: {4}\nDesc: {5}",
337 null,
333 result["name"], 338 result["name"],
334 result["url"], 339 result["url"],
335 result["file_name"], 340 result["file_name"],
diff --git a/OpenSim/Server/Handlers/Asset/AssetServerConnector.cs b/OpenSim/Server/Handlers/Asset/AssetServerConnector.cs
index bad3ea2..b710ec1 100644..100755
--- a/OpenSim/Server/Handlers/Asset/AssetServerConnector.cs
+++ b/OpenSim/Server/Handlers/Asset/AssetServerConnector.cs
@@ -125,14 +125,14 @@ namespace OpenSim.Server.Handlers.Asset
125 125
126 if (asset == null || asset.Data.Length == 0) 126 if (asset == null || asset.Data.Length == 0)
127 { 127 {
128 MainConsole.Instance.OutputFormat("Could not find asset with ID {0}", args[2]); 128 MainConsole.Instance.Output("Could not find asset with ID {0}", null, args[2]);
129 return; 129 return;
130 } 130 }
131 131
132 if (!m_AssetService.Delete(asset.ID)) 132 if (!m_AssetService.Delete(asset.ID))
133 MainConsole.Instance.OutputFormat("ERROR: Could not delete asset {0} {1}", asset.ID, asset.Name); 133 MainConsole.Instance.Output("ERROR: Could not delete asset {0} {1}", null, asset.ID, asset.Name);
134 else 134 else
135 MainConsole.Instance.OutputFormat("Deleted asset {0} {1}", asset.ID, asset.Name); 135 MainConsole.Instance.Output("Deleted asset {0} {1}", null, asset.ID, asset.Name);
136 } 136 }
137 137
138 void HandleDumpAsset(string module, string[] args) 138 void HandleDumpAsset(string module, string[] args)
@@ -148,14 +148,14 @@ namespace OpenSim.Server.Handlers.Asset
148 148
149 if (!UUID.TryParse(rawAssetId, out assetId)) 149 if (!UUID.TryParse(rawAssetId, out assetId))
150 { 150 {
151 MainConsole.Instance.OutputFormat("ERROR: {0} is not a valid ID format", rawAssetId); 151 MainConsole.Instance.Output("ERROR: {0} is not a valid ID format", null, rawAssetId);
152 return; 152 return;
153 } 153 }
154 154
155 AssetBase asset = m_AssetService.Get(assetId.ToString()); 155 AssetBase asset = m_AssetService.Get(assetId.ToString());
156 if (asset == null) 156 if (asset == null)
157 { 157 {
158 MainConsole.Instance.OutputFormat("ERROR: No asset found with ID {0}", assetId); 158 MainConsole.Instance.Output("ERROR: No asset found with ID {0}", null, assetId);
159 return; 159 return;
160 } 160 }
161 161
@@ -172,7 +172,7 @@ namespace OpenSim.Server.Handlers.Asset
172 } 172 }
173 } 173 }
174 174
175 MainConsole.Instance.OutputFormat("Asset dumped to file {0}", fileName); 175 MainConsole.Instance.Output("Asset dumped to file {0}", null, fileName);
176 } 176 }
177 177
178 void HandleShowAsset(string module, string[] args) 178 void HandleShowAsset(string module, string[] args)
@@ -193,13 +193,13 @@ namespace OpenSim.Server.Handlers.Asset
193 193
194 int i; 194 int i;
195 195
196 MainConsole.Instance.OutputFormat("Name: {0}", asset.Name); 196 MainConsole.Instance.Output("Name: {0}", null, asset.Name);
197 MainConsole.Instance.OutputFormat("Description: {0}", asset.Description); 197 MainConsole.Instance.Output("Description: {0}", null, asset.Description);
198 MainConsole.Instance.OutputFormat("Type: {0} (type number = {1})", (AssetType)asset.Type, asset.Type); 198 MainConsole.Instance.Output("Type: {0} (type number = {1})", null, (AssetType)asset.Type, asset.Type);
199 MainConsole.Instance.OutputFormat("Content-type: {0}", asset.Metadata.ContentType); 199 MainConsole.Instance.Output("Content-type: {0}", null, asset.Metadata.ContentType);
200 MainConsole.Instance.OutputFormat("Size: {0} bytes", asset.Data.Length); 200 MainConsole.Instance.Output("Size: {0} bytes", null, asset.Data.Length);
201 MainConsole.Instance.OutputFormat("Temporary: {0}", asset.Temporary ? "yes" : "no"); 201 MainConsole.Instance.Output("Temporary: {0}", null, asset.Temporary ? "yes" : "no");
202 MainConsole.Instance.OutputFormat("Flags: {0}", asset.Metadata.Flags); 202 MainConsole.Instance.Output("Flags: {0}", null, asset.Metadata.Flags);
203 203
204 for (i = 0 ; i < 5 ; i++) 204 for (i = 0 ; i < 5 ; i++)
205 { 205 {