remove some more useless NULL arguments

0.9.1.0-post-fixes
UbitUmarov 2019-10-22 13:04:01 +01:00
parent da0a8d6c43
commit 46e36601cb
20 changed files with 81 additions and 99 deletions

View File

@ -917,7 +917,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
m_scene.ForEachSOG(searchAction); m_scene.ForEachSOG(searchAction);
if (sceneObjects.Count == 0) if (sceneObjects.Count == 0)
m_console.Output("No objects with name {0} found in {1}", null, name, m_scene.RegionInfo.RegionName); m_console.Output("No objects with name {0} found in {1}", name, m_scene.RegionInfo.RegionName);
return sceneObjects; return sceneObjects;
} }
@ -952,7 +952,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
if (!ConsoleUtil.TryParseConsoleMinVector(rawConsoleStartVector, out startVector)) if (!ConsoleUtil.TryParseConsoleMinVector(rawConsoleStartVector, out startVector))
{ {
m_console.Output("Error: Start vector '{0}' does not have a valid format", null, rawConsoleStartVector); m_console.Output("Error: Start vector '{0}' does not have a valid format", rawConsoleStartVector);
endVector = Vector3.Zero; endVector = Vector3.Zero;
return false; return false;
@ -962,7 +962,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
if (!ConsoleUtil.TryParseConsoleMaxVector(rawConsoleEndVector, out endVector)) if (!ConsoleUtil.TryParseConsoleMaxVector(rawConsoleEndVector, out endVector))
{ {
m_console.Output("Error: End vector '{0}' does not have a valid format", null, rawConsoleEndVector); m_console.Output("Error: End vector '{0}' does not have a valid format", rawConsoleEndVector);
return false; return false;
} }

View File

@ -1538,7 +1538,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain
} }
else else
{ {
MainConsole.Instance.Output("ERROR: Unrecognised direction {0} - need x or y", null, direction); MainConsole.Instance.Output("ERROR: Unrecognised direction {0} - need x or y", direction);
} }
} }

View File

@ -114,20 +114,20 @@ namespace OpenSim.Region.OptionalModules.Agent.TextureSender
if (!UUID.TryParse(rawAssetId, out assetId)) if (!UUID.TryParse(rawAssetId, out assetId))
{ {
MainConsole.Instance.Output("ERROR: {0} is not a valid ID format", null, rawAssetId); MainConsole.Instance.Output("ERROR: {0} is not a valid ID format", rawAssetId);
return; return;
} }
AssetBase asset = m_scene.AssetService.Get(assetId.ToString()); AssetBase asset = m_scene.AssetService.Get(assetId.ToString());
if (asset == null) if (asset == null)
{ {
MainConsole.Instance.Output("ERROR: No asset found with ID {0}", null, assetId); MainConsole.Instance.Output("ERROR: No asset found with ID {0}", assetId);
return; return;
} }
if (asset.Type != (sbyte)AssetType.Texture) if (asset.Type != (sbyte)AssetType.Texture)
{ {
MainConsole.Instance.Output("ERROR: Asset {0} is not a texture type", null, assetId); MainConsole.Instance.Output("ERROR: Asset {0} is not a texture type", assetId);
return; return;
} }
@ -144,12 +144,11 @@ namespace OpenSim.Region.OptionalModules.Agent.TextureSender
{ {
MainConsole.Instance.Output( MainConsole.Instance.Output(
"Successfully decoded asset {0} with {1} layers and {2} components", "Successfully decoded asset {0} with {1} layers and {2} components",
null,
assetId, layers.Length, components); assetId, layers.Length, components);
} }
else else
{ {
MainConsole.Instance.Output("Decode of asset {0} failed", null, assetId); MainConsole.Instance.Output("Decode of asset {0} failed", assetId);
} }
} }
} }

View File

@ -115,14 +115,14 @@ namespace OpenSim.Region.OptionalModules.Asset
if (!UUID.TryParse(rawAssetId, out assetId)) if (!UUID.TryParse(rawAssetId, out assetId))
{ {
MainConsole.Instance.Output("ERROR: {0} is not a valid ID format", null, rawAssetId); MainConsole.Instance.Output("ERROR: {0} is not a valid ID format", rawAssetId);
return; return;
} }
AssetBase asset = m_scene.AssetService.Get(assetId.ToString()); AssetBase asset = m_scene.AssetService.Get(assetId.ToString());
if (asset == null) if (asset == null)
{ {
MainConsole.Instance.Output("ERROR: No asset found with ID {0}", null, assetId); MainConsole.Instance.Output("ERROR: No asset found with ID {0}", assetId);
return; return;
} }
@ -139,7 +139,7 @@ namespace OpenSim.Region.OptionalModules.Asset
} }
} }
MainConsole.Instance.Output("Asset dumped to file {0}", null, fileName); MainConsole.Instance.Output("Asset dumped to file {0}", fileName);
} }
void HandleShowAsset(string module, string[] args) void HandleShowAsset(string module, string[] args)
@ -160,13 +160,13 @@ namespace OpenSim.Region.OptionalModules.Asset
int i; int i;
MainConsole.Instance.Output("Name: {0}", null, asset.Name); MainConsole.Instance.Output("Name: {0}", asset.Name);
MainConsole.Instance.Output("Description: {0}", null, asset.Description); MainConsole.Instance.Output("Description: {0}", asset.Description);
MainConsole.Instance.Output("Type: {0} (type number = {1})", null, (AssetType)asset.Type, asset.Type); MainConsole.Instance.Output("Type: {0} (type number = {1})", (AssetType)asset.Type, asset.Type);
MainConsole.Instance.Output("Content-type: {0}", null, asset.Metadata.ContentType); MainConsole.Instance.Output("Content-type: {0}", asset.Metadata.ContentType);
MainConsole.Instance.Output("Size: {0} bytes", null, asset.Data.Length); MainConsole.Instance.Output("Size: {0} bytes", asset.Data.Length);
MainConsole.Instance.Output("Temporary: {0}", null, asset.Temporary ? "yes" : "no"); MainConsole.Instance.Output("Temporary: {0}", asset.Temporary ? "yes" : "no");
MainConsole.Instance.Output("Flags: {0}", null, asset.Metadata.Flags); MainConsole.Instance.Output("Flags: {0}", asset.Metadata.Flags);
for (i = 0 ; i < 5 ; i++) for (i = 0 ; i < 5 ; i++)
{ {

View File

@ -180,7 +180,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance
{ {
MainConsole.Instance.Output( MainConsole.Instance.Output(
"Sending appearance information for {0} to all other avatars in {1}", "Sending appearance information for {0} to all other avatars in {1}",
null,
sp.Name, scene.RegionInfo.RegionName); sp.Name, scene.RegionInfo.RegionName);
scene.AvatarFactory.SendAppearance(sp.UUID); scene.AvatarFactory.SendAppearance(sp.UUID);
@ -193,7 +192,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance
{ {
MainConsole.Instance.Output( MainConsole.Instance.Output(
"Sending appearance information for {0} to all other avatars in {1}", "Sending appearance information for {0} to all other avatars in {1}",
null,
sp.Name, scene.RegionInfo.RegionName); sp.Name, scene.RegionInfo.RegionName);
scene.AvatarFactory.SendAppearance(sp.UUID); scene.AvatarFactory.SendAppearance(sp.UUID);
@ -240,7 +238,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance
{ {
bool bakedTextureValid = scene.AvatarFactory.ValidateBakedTextureCache(sp); bool bakedTextureValid = scene.AvatarFactory.ValidateBakedTextureCache(sp);
MainConsole.Instance.Output( MainConsole.Instance.Output(
"{0} baked appearance texture is {1}", null, sp.Name, bakedTextureValid ? "OK" : "incomplete"); "{0} baked appearance texture is {1}", sp.Name, bakedTextureValid ? "OK" : "incomplete");
} }
); );
} }
@ -271,12 +269,10 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance
if (rebakesRequested > 0) if (rebakesRequested > 0)
MainConsole.Instance.Output( MainConsole.Instance.Output(
"Requesting rebake of {0} uploaded textures for {1} in {2}", "Requesting rebake of {0} uploaded textures for {1} in {2}",
null,
rebakesRequested, sp.Name, scene.RegionInfo.RegionName); rebakesRequested, sp.Name, scene.RegionInfo.RegionName);
else else
MainConsole.Instance.Output( MainConsole.Instance.Output(
"No texture IDs available for rebake request for {0} in {1}", "No texture IDs available for rebake request for {0} in {1}",
null,
sp.Name, scene.RegionInfo.RegionName); sp.Name, scene.RegionInfo.RegionName);
} }
} }
@ -320,7 +316,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance
{ {
MainConsole.Instance.Output( MainConsole.Instance.Output(
"{0} matched {1}", "{0} matched {1}",
null,
rawUuid, rawUuid,
string.Join(", ", matchedAvatars.ToList().ConvertAll<string>(sp => sp.Name).ToArray())); string.Join(", ", matchedAvatars.ToList().ConvertAll<string>(sp => sp.Name).ToArray()));
} }

View File

@ -136,7 +136,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Friends
if (userId == UUID.Zero) if (userId == UUID.Zero)
{ {
MainConsole.Instance.Output("No such user as {0} {1}", null, firstName, lastName); MainConsole.Instance.Output("No such user as {0} {1}", firstName, lastName);
return; return;
} }
@ -146,7 +146,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Friends
{ {
if (!m_friendsModule.AreFriendsCached(userId)) if (!m_friendsModule.AreFriendsCached(userId))
{ {
MainConsole.Instance.Output("No friends cached on this simulator for {0} {1}", null, firstName, lastName); MainConsole.Instance.Output("No friends cached on this simulator for {0} {1}", firstName, lastName);
return; return;
} }
else else
@ -162,10 +162,10 @@ namespace OpenSim.Region.OptionalModules.Avatar.Friends
friends = ((FriendsModule)m_friendsModule).FriendsService.GetFriends(userId); friends = ((FriendsModule)m_friendsModule).FriendsService.GetFriends(userId);
} }
MainConsole.Instance.Output("Friends for {0} {1} {2}:", null, firstName, lastName, userId); MainConsole.Instance.Output("Friends for {0} {1} {2}:", firstName, lastName, userId);
MainConsole.Instance.Output( MainConsole.Instance.Output(
"{0,-36} {1,-36} {2,-7} {3,7} {4,10}", null, "UUID", "Name", "Status", "MyFlags", "TheirFlags"); "{0,-36} {1,-36} {2,-7} {3,7} {4,10}", "UUID", "Name", "Status", "MyFlags", "TheirFlags");
foreach (FriendInfo friend in friends) foreach (FriendInfo friend in friends)
{ {
@ -193,7 +193,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Friends
MainConsole.Instance.Output( MainConsole.Instance.Output(
"{0,-36} {1,-36} {2,-7} {3,-7} {4,-10}", "{0,-36} {1,-36} {2,-7} {3,-7} {4,-10}",
null,
friend.Friend, friendName, onlineText, friend.MyFlags, friend.TheirFlags); friend.Friend, friendName, onlineText, friend.MyFlags, friend.TheirFlags);
} }
} }

View File

@ -144,7 +144,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.SitStand
{ {
MainConsole.Instance.Output( MainConsole.Instance.Output(
"Sitting {0} on {1} {2} in {3}", "Sitting {0} on {1} {2} in {3}",
null,
sp.Name, sitPart.ParentGroup.Name, sitPart.ParentGroup.UUID, m_scene.Name); sp.Name, sitPart.ParentGroup.Name, sitPart.ParentGroup.UUID, m_scene.Name);
sp.HandleAgentRequestSit(sp.ControllingClient, sp.UUID, sitPart.UUID, Vector3.Zero); sp.HandleAgentRequestSit(sp.ControllingClient, sp.UUID, sitPart.UUID, Vector3.Zero);
@ -154,7 +153,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.SitStand
{ {
MainConsole.Instance.Output( MainConsole.Instance.Output(
"Could not find any unoccupied set seat on which to sit {0} in {1}. Aborting", "Could not find any unoccupied set seat on which to sit {0} in {1}. Aborting",
null,
sp.Name, m_scene.Name); sp.Name, m_scene.Name);
break; break;
@ -179,7 +177,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.SitStand
{ {
if (sp.SitGround || sp.IsSatOnObject) if (sp.SitGround || sp.IsSatOnObject)
{ {
MainConsole.Instance.Output("Standing {0} in {1}", null, sp.Name, m_scene.Name); MainConsole.Instance.Output("Standing {0} in {1}", sp.Name, m_scene.Name);
sp.StandUp(); sp.StandUp();
} }
} }

View File

@ -256,13 +256,13 @@ namespace OpenSim.Region.OptionalModules.PhysicsParameters
private void WriteOut(string msg, params object[] args) private void WriteOut(string msg, params object[] args)
{ {
// m_log.InfoFormat(msg, args); // m_log.InfoFormat(msg, args);
MainConsole.Instance.Output(msg, null, args); MainConsole.Instance.Output(msg, args);
} }
private void WriteError(string msg, params object[] args) private void WriteError(string msg, params object[] args)
{ {
// m_log.ErrorFormat(msg, args); // m_log.ErrorFormat(msg, args);
MainConsole.Instance.Output(msg, null, args); MainConsole.Instance.Output(msg, args);
} }
} }
} }

View File

@ -186,7 +186,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
return; return;
JsonStoreStats stats = m_store.GetStoreStats(); JsonStoreStats stats = m_store.GetStoreStats();
MainConsole.Instance.Output("{0}\t{1}", null, m_scene.RegionInfo.RegionName, stats.StoreCount); MainConsole.Instance.Output("{0}\t{1}", m_scene.RegionInfo.RegionName, stats.StoreCount);
} }
#endregion #endregion

View File

@ -109,7 +109,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady
// This should always show up to the user but should not trigger warn/errors as these messages are // This should always show up to the user but should not trigger warn/errors as these messages are
// expected and are not simulator problems. Ideally, there would be a status level in log4net but // expected and are not simulator problems. Ideally, there would be a status level in log4net but
// failing that, we will print out to console instead. // failing that, we will print out to console instead.
MainConsole.Instance.Output("Region {0} - LOGINS DISABLED DURING INITIALIZATION.", null, m_scene.Name); MainConsole.Instance.Output("Region {0} - LOGINS DISABLED DURING INITIALIZATION.", m_scene.Name);
if (m_uri != string.Empty) if (m_uri != string.Empty)
{ {
@ -232,7 +232,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady
// without info log messages enabled. Making this a warning is arguably misleading since it isn't a // without info log messages enabled. Making this a warning is arguably misleading since it isn't a
// warning, and monitor scripts looking for warn/error/fatal messages will received false positives. // warning, and monitor scripts looking for warn/error/fatal messages will received false positives.
// Arguably, log4net needs a status log level (like Apache). // Arguably, log4net needs a status log level (like Apache).
MainConsole.Instance.Output("INITIALIZATION COMPLETE FOR {0} - LOGINS ENABLED", null, m_scene.Name); MainConsole.Instance.Output("INITIALIZATION COMPLETE FOR {0} - LOGINS ENABLED", m_scene.Name);
} }
m_scene.SceneGridService.InformNeighborsThatRegionisUp( m_scene.SceneGridService.InformNeighborsThatRegionisUp(

View File

@ -327,7 +327,7 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup
m_busy = false; m_busy = false;
} }
if (!found) if (!found)
MainConsole.Instance.Output("No such region {0}. Nothing to backup", null, name); MainConsole.Instance.Output("No such region {0}. Nothing to backup", name);
} }
private void ParseDefaultConfig(IConfig config) private void ParseDefaultConfig(IConfig config)

View File

@ -145,7 +145,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
cdl.AddRow("teleport", m_scene.DebugTeleporting); cdl.AddRow("teleport", m_scene.DebugTeleporting);
cdl.AddRow("updates", m_scene.DebugUpdates); cdl.AddRow("updates", m_scene.DebugUpdates);
MainConsole.Instance.Output("Scene {0} options:", null, m_scene.Name); MainConsole.Instance.Output("Scene {0} options:", m_scene.Name);
MainConsole.Instance.Output(cdl.ToString()); MainConsole.Instance.Output(cdl.ToString());
} }
@ -160,7 +160,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
string value = args[4]; string value = args[4];
SetSceneDebugOptions(new Dictionary<string, string>() { { key, value } }); SetSceneDebugOptions(new Dictionary<string, string>() { { key, value } });
MainConsole.Instance.Output("Set {0} debug scene {1} = {2}", null, m_scene.Name, key, value); MainConsole.Instance.Output("Set {0} debug scene {1} = {2}", m_scene.Name, key, value);
} }
else else
{ {

View File

@ -89,7 +89,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
} }
MainConsole.Instance.Output(cdt.ToString()); MainConsole.Instance.Output(cdt.ToString());
MainConsole.Instance.Output("Total: {0}", null, sensorInfo.Count); MainConsole.Instance.Output("Total: {0}", sensorInfo.Count);
} }
private void HandleShowTimers(string module, string[] cmdparams) private void HandleShowTimers(string module, string[] cmdparams)
@ -120,7 +120,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
} }
MainConsole.Instance.Output(cdt.ToString()); MainConsole.Instance.Output(cdt.ToString());
MainConsole.Instance.Output("Total: {0}", null, timersInfo.Count); MainConsole.Instance.Output("Total: {0}", timersInfo.Count);
} }
} }
} }

View File

@ -456,7 +456,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
} }
si.DebugLevel = newLevel; si.DebugLevel = newLevel;
MainConsole.Instance.Output("Set debug level of {0} {1} to {2}", null, si.ScriptName, si.ItemID, newLevel); MainConsole.Instance.Output("Set debug level of {0} {1} to {2}", si.ScriptName, si.ItemID, newLevel);
} }
/// <summary> /// <summary>
@ -472,12 +472,12 @@ namespace OpenSim.Region.ScriptEngine.XEngine
if (ConsoleUtil.TryParseConsoleNaturalInt(MainConsole.Instance, args[3], out newDebug)) if (ConsoleUtil.TryParseConsoleNaturalInt(MainConsole.Instance, args[3], out newDebug))
{ {
DebugLevel = newDebug; DebugLevel = newDebug;
MainConsole.Instance.Output("Debug level set to {0} in XEngine for region {1}", null, newDebug, m_Scene.Name); MainConsole.Instance.Output("Debug level set to {0} in XEngine for region {1}", newDebug, m_Scene.Name);
} }
} }
else if (args.Length == 3) else if (args.Length == 3)
{ {
MainConsole.Instance.Output("Current debug level is {0}", null, DebugLevel); MainConsole.Instance.Output("Current debug level is {0}", DebugLevel);
} }
else else
{ {
@ -532,7 +532,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
if (!UUID.TryParse(rawItemId, out itemId)) if (!UUID.TryParse(rawItemId, out itemId))
{ {
MainConsole.Instance.Output("ERROR: {0} is not a valid UUID", null, rawItemId); MainConsole.Instance.Output("ERROR: {0} is not a valid UUID", rawItemId);
continue; continue;
} }
@ -618,7 +618,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
lock (m_Scripts) lock (m_Scripts)
{ {
MainConsole.Instance.Output( MainConsole.Instance.Output(
"Showing {0} scripts in {1}", null, m_Scripts.Count, m_Scene.RegionInfo.RegionName); "Showing {0} scripts in {1}", m_Scripts.Count, m_Scene.RegionInfo.RegionName);
} }
} }
@ -671,7 +671,6 @@ namespace OpenSim.Region.ScriptEngine.XEngine
SceneObjectPart sop = m_Scene.GetSceneObjectPart(instance.ObjectID); SceneObjectPart sop = m_Scene.GetSceneObjectPart(instance.ObjectID);
MainConsole.Instance.Output( MainConsole.Instance.Output(
"Suspended {0}.{1}, item UUID {2}, prim UUID {3} @ {4}", "Suspended {0}.{1}, item UUID {2}, prim UUID {3} @ {4}",
null,
instance.PrimName, instance.ScriptName, instance.ItemID, instance.ObjectID, sop.AbsolutePosition); instance.PrimName, instance.ScriptName, instance.ItemID, instance.ObjectID, sop.AbsolutePosition);
} }
} }
@ -685,7 +684,6 @@ namespace OpenSim.Region.ScriptEngine.XEngine
SceneObjectPart sop = m_Scene.GetSceneObjectPart(instance.ObjectID); SceneObjectPart sop = m_Scene.GetSceneObjectPart(instance.ObjectID);
MainConsole.Instance.Output( MainConsole.Instance.Output(
"Resumed {0}.{1}, item UUID {2}, prim UUID {3} @ {4}", "Resumed {0}.{1}, item UUID {2}, prim UUID {3} @ {4}",
null,
instance.PrimName, instance.ScriptName, instance.ItemID, instance.ObjectID, sop.AbsolutePosition); instance.PrimName, instance.ScriptName, instance.ItemID, instance.ObjectID, sop.AbsolutePosition);
} }
} }
@ -699,7 +697,6 @@ namespace OpenSim.Region.ScriptEngine.XEngine
SceneObjectPart sop = m_Scene.GetSceneObjectPart(instance.ObjectID); SceneObjectPart sop = m_Scene.GetSceneObjectPart(instance.ObjectID);
MainConsole.Instance.Output( MainConsole.Instance.Output(
"Started {0}.{1}, item UUID {2}, prim UUID {3} @ {4}", "Started {0}.{1}, item UUID {2}, prim UUID {3} @ {4}",
null,
instance.PrimName, instance.ScriptName, instance.ItemID, instance.ObjectID, sop.AbsolutePosition); instance.PrimName, instance.ScriptName, instance.ItemID, instance.ObjectID, sop.AbsolutePosition);
} }
} }
@ -715,7 +712,6 @@ namespace OpenSim.Region.ScriptEngine.XEngine
SceneObjectPart sop = m_Scene.GetSceneObjectPart(instance.ObjectID); SceneObjectPart sop = m_Scene.GetSceneObjectPart(instance.ObjectID);
MainConsole.Instance.Output( MainConsole.Instance.Output(
"Stopped {0}.{1}, item UUID {2}, prim UUID {3} @ {4}", "Stopped {0}.{1}, item UUID {2}, prim UUID {3} @ {4}",
null,
instance.PrimName, instance.ScriptName, instance.ItemID, instance.ObjectID, sop.AbsolutePosition); instance.PrimName, instance.ScriptName, instance.ItemID, instance.ObjectID, sop.AbsolutePosition);
} }
} }

View File

@ -179,7 +179,6 @@ namespace OpenSim.Server.Base
Dictionary<string, object> plugin = (Dictionary<string, object>)result[k]; Dictionary<string, object> plugin = (Dictionary<string, object>)result[k];
bool enabled = (bool)plugin["enabled"]; bool enabled = (bool)plugin["enabled"];
MainConsole.Instance.Output("{0}) {1} {2} rev. {3}", MainConsole.Instance.Output("{0}) {1} {2} rev. {3}",
null,
k, k,
enabled == true ? "[ ]" : "[X]", enabled == true ? "[ ]" : "[X]",
plugin["name"], plugin["version"]); plugin["name"], plugin["version"]);
@ -217,7 +216,6 @@ namespace OpenSim.Server.Base
Dictionary<string, object> plugin = (Dictionary<string, object>)result[k]; Dictionary<string, object> plugin = (Dictionary<string, object>)result[k];
bool enabled = (bool)plugin["enabled"]; bool enabled = (bool)plugin["enabled"];
MainConsole.Instance.Output("{0}) {1} {2} rev. {3}", MainConsole.Instance.Output("{0}) {1} {2} rev. {3}",
null,
k, k,
enabled == true ? "[ ]" : "[X]", enabled == true ? "[ ]" : "[X]",
plugin["name"], plugin["version"]); plugin["name"], plugin["version"]);
@ -238,7 +236,6 @@ namespace OpenSim.Server.Base
// name, version, repository // name, version, repository
Dictionary<string, object> plugin = (Dictionary<string, object>)result[k]; Dictionary<string, object> plugin = (Dictionary<string, object>)result[k];
MainConsole.Instance.Output("{0}) {1} rev. {2} {3}", MainConsole.Instance.Output("{0}) {1} rev. {2} {3}",
null,
k, k,
plugin["name"], plugin["name"],
plugin["version"], plugin["version"],
@ -313,7 +310,6 @@ namespace OpenSim.Server.Base
Dictionary<string, object> repo = (Dictionary<string, object>)result[k]; Dictionary<string, object> repo = (Dictionary<string, object>)result[k];
bool enabled = (bool)repo["enabled"]; bool enabled = (bool)repo["enabled"];
MainConsole.Instance.Output("{0}) {1} {2}", MainConsole.Instance.Output("{0}) {1} {2}",
null,
k, k,
enabled == true ? "[ ]" : "[X]", enabled == true ? "[ ]" : "[X]",
repo["name"], repo["url"]); repo["name"], repo["url"]);
@ -334,7 +330,6 @@ namespace OpenSim.Server.Base
PluginManager.AddinInfo(ndx, out result); PluginManager.AddinInfo(ndx, out result);
MainConsole.Instance.Output("Name: {0}\nURL: {1}\nFile: {2}\nAuthor: {3}\nCategory: {4}\nDesc: {5}", MainConsole.Instance.Output("Name: {0}\nURL: {1}\nFile: {2}\nAuthor: {3}\nCategory: {4}\nDesc: {5}",
null,
result["name"], result["name"],
result["url"], result["url"],
result["file_name"], result["file_name"],

View File

@ -125,14 +125,14 @@ namespace OpenSim.Server.Handlers.Asset
if (asset == null || asset.Data.Length == 0) if (asset == null || asset.Data.Length == 0)
{ {
MainConsole.Instance.Output("Could not find asset with ID {0}", null, args[2]); MainConsole.Instance.Output("Could not find asset with ID {0}", args[2]);
return; return;
} }
if (!m_AssetService.Delete(asset.ID)) if (!m_AssetService.Delete(asset.ID))
MainConsole.Instance.Output("ERROR: Could not delete asset {0} {1}", null, asset.ID, asset.Name); MainConsole.Instance.Output("ERROR: Could not delete asset {0} {1}", asset.ID, asset.Name);
else else
MainConsole.Instance.Output("Deleted asset {0} {1}", null, asset.ID, asset.Name); MainConsole.Instance.Output("Deleted asset {0} {1}", asset.ID, asset.Name);
} }
void HandleDumpAsset(string module, string[] args) void HandleDumpAsset(string module, string[] args)
@ -148,14 +148,14 @@ namespace OpenSim.Server.Handlers.Asset
if (!UUID.TryParse(rawAssetId, out assetId)) if (!UUID.TryParse(rawAssetId, out assetId))
{ {
MainConsole.Instance.Output("ERROR: {0} is not a valid ID format", null, rawAssetId); MainConsole.Instance.Output("ERROR: {0} is not a valid ID format", rawAssetId);
return; return;
} }
AssetBase asset = m_AssetService.Get(assetId.ToString()); AssetBase asset = m_AssetService.Get(assetId.ToString());
if (asset == null) if (asset == null)
{ {
MainConsole.Instance.Output("ERROR: No asset found with ID {0}", null, assetId); MainConsole.Instance.Output("ERROR: No asset found with ID {0}", assetId);
return; return;
} }
@ -172,7 +172,7 @@ namespace OpenSim.Server.Handlers.Asset
} }
} }
MainConsole.Instance.Output("Asset dumped to file {0}", null, fileName); MainConsole.Instance.Output("Asset dumped to file {0}", fileName);
} }
void HandleShowAsset(string module, string[] args) void HandleShowAsset(string module, string[] args)
@ -193,13 +193,13 @@ namespace OpenSim.Server.Handlers.Asset
int i; int i;
MainConsole.Instance.Output("Name: {0}", null, asset.Name); MainConsole.Instance.Output("Name: {0}", asset.Name);
MainConsole.Instance.Output("Description: {0}", null, asset.Description); MainConsole.Instance.Output("Description: {0}", asset.Description);
MainConsole.Instance.Output("Type: {0} (type number = {1})", null, (AssetType)asset.Type, asset.Type); MainConsole.Instance.Output("Type: {0} (type number = {1})", (AssetType)asset.Type, asset.Type);
MainConsole.Instance.Output("Content-type: {0}", null, asset.Metadata.ContentType); MainConsole.Instance.Output("Content-type: {0}", asset.Metadata.ContentType);
MainConsole.Instance.Output("Size: {0} bytes", null, asset.Data.Length); MainConsole.Instance.Output("Size: {0} bytes", asset.Data.Length);
MainConsole.Instance.Output("Temporary: {0}", null, asset.Temporary ? "yes" : "no"); MainConsole.Instance.Output("Temporary: {0}", asset.Temporary ? "yes" : "no");
MainConsole.Instance.Output("Flags: {0}", null, asset.Metadata.Flags); MainConsole.Instance.Output("Flags: {0}", asset.Metadata.Flags);
for (i = 0 ; i < 5 ; i++) for (i = 0 ; i < 5 ; i++)
{ {

View File

@ -787,7 +787,7 @@ namespace OpenSim.Services.GridService
if (!UUID.TryParse(rawRegionUuid, out regionUuid)) if (!UUID.TryParse(rawRegionUuid, out regionUuid))
{ {
MainConsole.Instance.Output("{0} is not a valid region uuid", null, rawRegionUuid); MainConsole.Instance.Output("{0} is not a valid region uuid", rawRegionUuid);
return; return;
} }
@ -795,18 +795,18 @@ namespace OpenSim.Services.GridService
if (region == null) if (region == null)
{ {
MainConsole.Instance.Output("No region with UUID {0}", null, regionUuid); MainConsole.Instance.Output("No region with UUID {0}", regionUuid);
return; return;
} }
if (DeregisterRegion(regionUuid)) if (DeregisterRegion(regionUuid))
{ {
MainConsole.Instance.Output("Deregistered {0} {1}", null, region.RegionName, regionUuid); MainConsole.Instance.Output("Deregistered {0} {1}", region.RegionName, regionUuid);
} }
else else
{ {
// I don't think this can ever occur if we know that the region exists. // I don't think this can ever occur if we know that the region exists.
MainConsole.Instance.Output("Error deregistering {0} {1}", null, region.RegionName, regionUuid); MainConsole.Instance.Output("Error deregistering {0} {1}", region.RegionName, regionUuid);
} }
} }
} }
@ -843,7 +843,7 @@ namespace OpenSim.Services.GridService
MainConsole.Instance.Output("it will count regions that are inactive but were not deregistered from the grid service"); MainConsole.Instance.Output("it will count regions that are inactive but were not deregistered from the grid service");
MainConsole.Instance.Output("(e.g. simulator crashed rather than shutting down cleanly).\n"); MainConsole.Instance.Output("(e.g. simulator crashed rather than shutting down cleanly).\n");
MainConsole.Instance.Output("Grid size: {0} km squared.", null, size / 1000000); MainConsole.Instance.Output("Grid size: {0} km squared.", size / 1000000);
} }
private void HandleShowRegion(string module, string[] cmd) private void HandleShowRegion(string module, string[] cmd)
@ -892,7 +892,7 @@ namespace OpenSim.Services.GridService
if (region == null) if (region == null)
{ {
MainConsole.Instance.Output("No region found at {0},{1}", null, x, y); MainConsole.Instance.Output("No region found at {0},{1}", x, y);
return; return;
} }

View File

@ -1126,22 +1126,22 @@ namespace OpenSim.Services.LLLoginService
if (cmd.Length > 2) if (cmd.Length > 2)
{ {
if (Int32.TryParse(cmd[2], out m_MinLoginLevel)) if (Int32.TryParse(cmd[2], out m_MinLoginLevel))
MainConsole.Instance.Output("Set minimum login level to {0}", null, m_MinLoginLevel); MainConsole.Instance.Output("Set minimum login level to {0}", m_MinLoginLevel);
else else
MainConsole.Instance.Output("ERROR: {0} is not a valid login level", null, cmd[2]); MainConsole.Instance.Output("ERROR: {0} is not a valid login level", cmd[2]);
} }
break; break;
case "reset": case "reset":
m_MinLoginLevel = m_LoginServerConfig.GetInt("MinLoginLevel", 0); m_MinLoginLevel = m_LoginServerConfig.GetInt("MinLoginLevel", 0);
MainConsole.Instance.Output("Reset min login level to {0}", null, m_MinLoginLevel); MainConsole.Instance.Output("Reset min login level to {0}", m_MinLoginLevel);
break; break;
case "text": case "text":
if (cmd.Length > 2) if (cmd.Length > 2)
{ {
m_WelcomeMessage = cmd[2]; m_WelcomeMessage = cmd[2];
MainConsole.Instance.Output("Login welcome message set to '{0}'", null, m_WelcomeMessage); MainConsole.Instance.Output("Login welcome message set to '{0}'", m_WelcomeMessage);
} }
break; break;
} }

View File

@ -94,7 +94,7 @@ namespace OpenSim.Services.UserAccountService
MainConsole.Instance.Output(cdl.ToString()); MainConsole.Instance.Output(cdl.ToString());
} }
MainConsole.Instance.Output("Entries: {0}", null, data.Length); MainConsole.Instance.Output("Entries: {0}", data.Length);
} }
protected void HandleShowGridUsersOnline(string module, string[] cmdparams) protected void HandleShowGridUsersOnline(string module, string[] cmdparams)
@ -123,7 +123,7 @@ namespace OpenSim.Services.UserAccountService
} }
} }
MainConsole.Instance.Output("Users online: {0}", null, onlineRecentlyCount); MainConsole.Instance.Output("Users online: {0}", onlineRecentlyCount);
} }
private GridUserData GetGridUserData(string userID) private GridUserData GetGridUserData(string userID)

View File

@ -434,19 +434,19 @@ namespace OpenSim.Services.UserAccountService
if (ua == null) if (ua == null)
{ {
MainConsole.Instance.Output("No user named {0} {1}", null, firstName, lastName); MainConsole.Instance.Output("No user named {0} {1}", firstName, lastName);
return; return;
} }
MainConsole.Instance.Output("Name: {0}", null, ua.Name); MainConsole.Instance.Output("Name: {0}", ua.Name);
MainConsole.Instance.Output("ID: {0}", null, ua.PrincipalID); MainConsole.Instance.Output("ID: {0}", ua.PrincipalID);
MainConsole.Instance.Output("Title: {0}", null, ua.UserTitle); MainConsole.Instance.Output("Title: {0}", ua.UserTitle);
MainConsole.Instance.Output("E-mail: {0}", null, ua.Email); MainConsole.Instance.Output("E-mail: {0}", ua.Email);
MainConsole.Instance.Output("Created: {0}", null, Utils.UnixTimeToDateTime(ua.Created)); MainConsole.Instance.Output("Created: {0}", Utils.UnixTimeToDateTime(ua.Created));
MainConsole.Instance.Output("Level: {0}", null, ua.UserLevel); MainConsole.Instance.Output("Level: {0}", ua.UserLevel);
MainConsole.Instance.Output("Flags: {0}", null, ua.UserFlags); MainConsole.Instance.Output("Flags: {0}", ua.UserFlags);
foreach (KeyValuePair<string, Object> kvp in ua.ServiceURLs) foreach (KeyValuePair<string, Object> kvp in ua.ServiceURLs)
MainConsole.Instance.Output("{0}: {1}", null, kvp.Key, kvp.Value); MainConsole.Instance.Output("{0}: {1}", kvp.Key, kvp.Value);
} }
protected void HandleResetUserPassword(string module, string[] cmdparams) protected void HandleResetUserPassword(string module, string[] cmdparams)
@ -470,7 +470,7 @@ namespace OpenSim.Services.UserAccountService
UserAccount account = GetUserAccount(UUID.Zero, firstName, lastName); UserAccount account = GetUserAccount(UUID.Zero, firstName, lastName);
if (account == null) if (account == null)
{ {
MainConsole.Instance.Output("No such user as {0} {1}", null, firstName, lastName); MainConsole.Instance.Output("No such user as {0} {1}", firstName, lastName);
return; return;
} }
@ -479,9 +479,9 @@ namespace OpenSim.Services.UserAccountService
success = m_AuthenticationService.SetPassword(account.PrincipalID, newPassword); success = m_AuthenticationService.SetPassword(account.PrincipalID, newPassword);
if (!success) if (!success)
MainConsole.Instance.Output("Unable to reset password for account {0} {1}.", null, firstName, lastName); MainConsole.Instance.Output("Unable to reset password for account {0} {1}.", firstName, lastName);
else else
MainConsole.Instance.Output("Password reset for user {0} {1}", null, firstName, lastName); MainConsole.Instance.Output("Password reset for user {0} {1}", firstName, lastName);
} }
protected void HandleResetUserEmail(string module, string[] cmdparams) protected void HandleResetUserEmail(string module, string[] cmdparams)
@ -505,7 +505,7 @@ namespace OpenSim.Services.UserAccountService
UserAccount account = GetUserAccount(UUID.Zero, firstName, lastName); UserAccount account = GetUserAccount(UUID.Zero, firstName, lastName);
if (account == null) if (account == null)
{ {
MainConsole.Instance.Output("No such user as {0} {1}", null, firstName, lastName); MainConsole.Instance.Output("No such user as {0} {1}", firstName, lastName);
return; return;
} }
@ -515,9 +515,9 @@ namespace OpenSim.Services.UserAccountService
success = StoreUserAccount(account); success = StoreUserAccount(account);
if (!success) if (!success)
MainConsole.Instance.Output("Unable to set Email for account {0} {1}.", null, firstName, lastName); MainConsole.Instance.Output("Unable to set Email for account {0} {1}.", firstName, lastName);
else else
MainConsole.Instance.Output("User Email set for user {0} {1} to {2}", null, firstName, lastName, account.Email); MainConsole.Instance.Output("User Email set for user {0} {1} to {2}", firstName, lastName, account.Email);
} }
@ -555,9 +555,9 @@ namespace OpenSim.Services.UserAccountService
bool success = StoreUserAccount(account); bool success = StoreUserAccount(account);
if (!success) if (!success)
MainConsole.Instance.Output("Unable to set user level for account {0} {1}.", null, firstName, lastName); MainConsole.Instance.Output("Unable to set user level for account {0} {1}.", firstName, lastName);
else else
MainConsole.Instance.Output("User level set for user {0} {1} to {2}", null, firstName, lastName, level); MainConsole.Instance.Output("User level set for user {0} {1} to {2}", firstName, lastName, level);
} }
#endregion #endregion