Merge branch 'master' into varregion
commit
604b39cea9
|
@ -109,6 +109,7 @@ what it is today.
|
||||||
* Kayne
|
* Kayne
|
||||||
* Kevin Cozens
|
* Kevin Cozens
|
||||||
* kinoc (Daxtron Labs)
|
* kinoc (Daxtron Labs)
|
||||||
|
* Kira
|
||||||
* Kitto Flora
|
* Kitto Flora
|
||||||
* KittyLiu
|
* KittyLiu
|
||||||
* Kurt Taylor (IBM)
|
* Kurt Taylor (IBM)
|
||||||
|
|
|
@ -101,7 +101,7 @@ namespace OpenSim.Groups
|
||||||
Dictionary<string, object> sendData = new Dictionary<string, object>();
|
Dictionary<string, object> sendData = new Dictionary<string, object>();
|
||||||
if (GroupID != UUID.Zero)
|
if (GroupID != UUID.Zero)
|
||||||
sendData["GroupID"] = GroupID.ToString();
|
sendData["GroupID"] = GroupID.ToString();
|
||||||
if (GroupName != null && GroupName != string.Empty)
|
if (!string.IsNullOrEmpty(GroupName))
|
||||||
sendData["Name"] = GroupsDataUtils.Sanitize(GroupName);
|
sendData["Name"] = GroupsDataUtils.Sanitize(GroupName);
|
||||||
|
|
||||||
sendData["RequestingAgentID"] = RequestingAgentID;
|
sendData["RequestingAgentID"] = RequestingAgentID;
|
||||||
|
@ -275,7 +275,7 @@ namespace OpenSim.Groups
|
||||||
|
|
||||||
//m_log.DebugFormat("[XXX]: reply was {0}", reply);
|
//m_log.DebugFormat("[XXX]: reply was {0}", reply);
|
||||||
|
|
||||||
if (reply == string.Empty || reply == null)
|
if (string.IsNullOrEmpty(reply))
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(
|
Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(
|
||||||
|
|
|
@ -120,7 +120,7 @@ namespace OpenSim.Groups
|
||||||
Dictionary<string, object> sendData = new Dictionary<string, object>();
|
Dictionary<string, object> sendData = new Dictionary<string, object>();
|
||||||
if (GroupID != UUID.Zero)
|
if (GroupID != UUID.Zero)
|
||||||
sendData["GroupID"] = GroupID.ToString();
|
sendData["GroupID"] = GroupID.ToString();
|
||||||
if (GroupName != null && GroupName != string.Empty)
|
if (!string.IsNullOrEmpty(GroupName))
|
||||||
sendData["Name"] = GroupsDataUtils.Sanitize(GroupName);
|
sendData["Name"] = GroupsDataUtils.Sanitize(GroupName);
|
||||||
|
|
||||||
sendData["RequestingAgentID"] = RequestingAgentID;
|
sendData["RequestingAgentID"] = RequestingAgentID;
|
||||||
|
|
|
@ -85,7 +85,7 @@ namespace OpenSim.Capabilities.Handlers
|
||||||
// m_log.DebugFormat("[GETTEXTURE]: Received request for texture id {0}", textureID);
|
// m_log.DebugFormat("[GETTEXTURE]: Received request for texture id {0}", textureID);
|
||||||
|
|
||||||
string[] formats;
|
string[] formats;
|
||||||
if (format != null && format != string.Empty)
|
if (!string.IsNullOrEmpty(format))
|
||||||
{
|
{
|
||||||
formats = new string[1] { format.ToLower() };
|
formats = new string[1] { format.ToLower() };
|
||||||
}
|
}
|
||||||
|
|
|
@ -121,7 +121,7 @@ namespace OpenSim.Framework.Configuration.XML
|
||||||
|
|
||||||
public void Commit()
|
public void Commit()
|
||||||
{
|
{
|
||||||
if (fileName == null || fileName == String.Empty)
|
if (string.IsNullOrEmpty(fileName))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!Directory.Exists(Util.configDir()))
|
if (!Directory.Exists(Util.configDir()))
|
||||||
|
|
|
@ -122,7 +122,7 @@ namespace OpenSim.Framework
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (m_creatorData != null && m_creatorData != string.Empty)
|
if (!string.IsNullOrEmpty(m_creatorData))
|
||||||
return m_creatorId + ';' + m_creatorData;
|
return m_creatorId + ';' + m_creatorData;
|
||||||
else
|
else
|
||||||
return m_creatorId;
|
return m_creatorId;
|
||||||
|
|
|
@ -231,7 +231,7 @@ namespace OpenSim.Framework.Monitoring
|
||||||
Container,
|
Container,
|
||||||
ShortName,
|
ShortName,
|
||||||
Value,
|
Value,
|
||||||
UnitName == null || UnitName == "" ? "" : string.Format(" {0}", UnitName));
|
string.IsNullOrEmpty(UnitName) ? "" : string.Format(" {0}", UnitName));
|
||||||
|
|
||||||
AppendMeasuresOfInterest(sb);
|
AppendMeasuresOfInterest(sb);
|
||||||
|
|
||||||
|
@ -316,9 +316,9 @@ namespace OpenSim.Framework.Monitoring
|
||||||
sb.AppendFormat(
|
sb.AppendFormat(
|
||||||
", {0:0.##}{1}/s, {2:0.##}{3}/s",
|
", {0:0.##}{1}/s, {2:0.##}{3}/s",
|
||||||
lastChangeOverTime,
|
lastChangeOverTime,
|
||||||
UnitName == null || UnitName == "" ? "" : string.Format(" {0}", UnitName),
|
string.IsNullOrEmpty(UnitName) ? "" : string.Format(" {0}", UnitName),
|
||||||
averageChangeOverTime,
|
averageChangeOverTime,
|
||||||
UnitName == null || UnitName == "" ? "" : string.Format(" {0}", UnitName));
|
string.IsNullOrEmpty(UnitName) ? "" : string.Format(" {0}", UnitName));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -277,7 +277,7 @@ namespace OpenSim.Framework.Serialization.External
|
||||||
writer.WriteStartElement("GroupOwned");
|
writer.WriteStartElement("GroupOwned");
|
||||||
writer.WriteString(inventoryItem.GroupOwned.ToString());
|
writer.WriteString(inventoryItem.GroupOwned.ToString());
|
||||||
writer.WriteEndElement();
|
writer.WriteEndElement();
|
||||||
if (options.ContainsKey("creators") && inventoryItem.CreatorData != null && inventoryItem.CreatorData != string.Empty)
|
if (options.ContainsKey("creators") && !string.IsNullOrEmpty(inventoryItem.CreatorData))
|
||||||
writer.WriteElementString("CreatorData", inventoryItem.CreatorData);
|
writer.WriteElementString("CreatorData", inventoryItem.CreatorData);
|
||||||
else if (options.ContainsKey("home"))
|
else if (options.ContainsKey("home"))
|
||||||
{
|
{
|
||||||
|
|
|
@ -785,7 +785,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||||
"[BASE HTTP SERVER]: HTTP IN {0} :{1} {2} content type handler {3} {4} from {5}",
|
"[BASE HTTP SERVER]: HTTP IN {0} :{1} {2} content type handler {3} {4} from {5}",
|
||||||
RequestNumber,
|
RequestNumber,
|
||||||
Port,
|
Port,
|
||||||
(request.ContentType == null || request.ContentType == "") ? "not set" : request.ContentType,
|
string.IsNullOrEmpty(request.ContentType) ? "not set" : request.ContentType,
|
||||||
request.HttpMethod,
|
request.HttpMethod,
|
||||||
request.Url.PathAndQuery,
|
request.Url.PathAndQuery,
|
||||||
request.RemoteIPEndPoint);
|
request.RemoteIPEndPoint);
|
||||||
|
|
|
@ -124,7 +124,7 @@ namespace OpenSim.Framework
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (_creatorData != null && _creatorData != string.Empty)
|
if (!string.IsNullOrEmpty(_creatorData))
|
||||||
return _creatorID.ToString() + ';' + _creatorData;
|
return _creatorID.ToString() + ';' + _creatorData;
|
||||||
else
|
else
|
||||||
return _creatorID.ToString();
|
return _creatorID.ToString();
|
||||||
|
|
|
@ -720,7 +720,7 @@ namespace OpenSim.Framework
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static string[] GetPreferredImageTypes(string accept)
|
public static string[] GetPreferredImageTypes(string accept)
|
||||||
{
|
{
|
||||||
if (accept == null || accept == string.Empty)
|
if (string.IsNullOrEmpty(accept))
|
||||||
return new string[0];
|
return new string[0];
|
||||||
|
|
||||||
string[] types = accept.Split(new char[] { ',' });
|
string[] types = accept.Split(new char[] { ',' });
|
||||||
|
|
|
@ -909,7 +909,7 @@ namespace OpenSim
|
||||||
regInfo.EstateSettings = EstateDataService.LoadEstateSettings(regInfo.RegionID, true);
|
regInfo.EstateSettings = EstateDataService.LoadEstateSettings(regInfo.RegionID, true);
|
||||||
|
|
||||||
string newName;
|
string newName;
|
||||||
if (estateName != null && estateName != "")
|
if (!string.IsNullOrEmpty(estateName))
|
||||||
newName = estateName;
|
newName = estateName;
|
||||||
else
|
else
|
||||||
newName = MainConsole.Instance.CmdPrompt("New estate name", regInfo.EstateSettings.EstateName);
|
newName = MainConsole.Instance.CmdPrompt("New estate name", regInfo.EstateSettings.EstateName);
|
||||||
|
|
|
@ -421,7 +421,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||||
item.CreatorId = ospResolvedId.ToString();
|
item.CreatorId = ospResolvedId.ToString();
|
||||||
item.CreatorData = string.Empty;
|
item.CreatorData = string.Empty;
|
||||||
}
|
}
|
||||||
else if (item.CreatorData == null || item.CreatorData == String.Empty)
|
else if (string.IsNullOrEmpty(item.CreatorData))
|
||||||
{
|
{
|
||||||
item.CreatorId = m_userInfo.PrincipalID.ToString();
|
item.CreatorId = m_userInfo.PrincipalID.ToString();
|
||||||
// item.CreatorIdAsUuid = new UUID(item.CreatorId);
|
// item.CreatorIdAsUuid = new UUID(item.CreatorId);
|
||||||
|
@ -522,7 +522,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||||
|
|
||||||
foreach (SceneObjectGroup sog in sceneObjects)
|
foreach (SceneObjectGroup sog in sceneObjects)
|
||||||
foreach (SceneObjectPart sop in sog.Parts)
|
foreach (SceneObjectPart sop in sog.Parts)
|
||||||
if (sop.CreatorData == null || sop.CreatorData == "")
|
if (string.IsNullOrEmpty(sop.CreatorData))
|
||||||
sop.CreatorID = m_creatorIdForAssetId[assetId];
|
sop.CreatorID = m_creatorIdForAssetId[assetId];
|
||||||
|
|
||||||
if (coa != null)
|
if (coa != null)
|
||||||
|
|
|
@ -174,7 +174,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||||
|
|
||||||
private void AdjustIdentifiers(AssetMetadata meta)
|
private void AdjustIdentifiers(AssetMetadata meta)
|
||||||
{
|
{
|
||||||
if (meta.CreatorID != null && meta.CreatorID != string.Empty)
|
if (!string.IsNullOrEmpty(meta.CreatorID))
|
||||||
{
|
{
|
||||||
UUID uuid = UUID.Zero;
|
UUID uuid = UUID.Zero;
|
||||||
UUID.TryParse(meta.CreatorID, out uuid);
|
UUID.TryParse(meta.CreatorID, out uuid);
|
||||||
|
|
|
@ -466,7 +466,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
|
||||||
return userdata.ServerURLs[serverType].ToString();
|
return userdata.ServerURLs[serverType].ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (userdata.HomeURL != null && userdata.HomeURL != string.Empty)
|
if (!string.IsNullOrEmpty(userdata.HomeURL))
|
||||||
{
|
{
|
||||||
//m_log.DebugFormat(
|
//m_log.DebugFormat(
|
||||||
// "[USER MANAGEMENT MODULE]: Did not find url type {0} so requesting urls from '{1}' for {2}",
|
// "[USER MANAGEMENT MODULE]: Did not find url type {0} so requesting urls from '{1}' for {2}",
|
||||||
|
@ -552,7 +552,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
|
||||||
|
|
||||||
if (oldUser != null)
|
if (oldUser != null)
|
||||||
{
|
{
|
||||||
if (creatorData == null || creatorData == String.Empty)
|
if (string.IsNullOrEmpty(creatorData))
|
||||||
{
|
{
|
||||||
//ignore updates without creator data
|
//ignore updates without creator data
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -460,9 +460,9 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
|
||||||
Request.Headers.Add(HttpCustomHeaders[i],
|
Request.Headers.Add(HttpCustomHeaders[i],
|
||||||
HttpCustomHeaders[i+1]);
|
HttpCustomHeaders[i+1]);
|
||||||
}
|
}
|
||||||
if (proxyurl != null && proxyurl.Length > 0)
|
if (!string.IsNullOrEmpty(proxyurl))
|
||||||
{
|
{
|
||||||
if (proxyexcepts != null && proxyexcepts.Length > 0)
|
if (!string.IsNullOrEmpty(proxyexcepts))
|
||||||
{
|
{
|
||||||
string[] elist = proxyexcepts.Split(';');
|
string[] elist = proxyexcepts.Split(';');
|
||||||
Request.Proxy = new WebProxy(proxyurl, true, elist);
|
Request.Proxy = new WebProxy(proxyurl, true, elist);
|
||||||
|
@ -483,7 +483,7 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
|
||||||
}
|
}
|
||||||
|
|
||||||
// Encode outbound data
|
// Encode outbound data
|
||||||
if (OutboundBody != null && OutboundBody.Length > 0)
|
if (!string.IsNullOrEmpty(OutboundBody))
|
||||||
{
|
{
|
||||||
byte[] data = Util.UTF8.GetBytes(OutboundBody);
|
byte[] data = Util.UTF8.GetBytes(OutboundBody);
|
||||||
|
|
||||||
|
|
|
@ -161,9 +161,9 @@ namespace OpenSim.Region.CoreModules.Scripting.LoadImageURL
|
||||||
{
|
{
|
||||||
WebRequest request = HttpWebRequest.Create(url);
|
WebRequest request = HttpWebRequest.Create(url);
|
||||||
|
|
||||||
if (m_proxyurl != null && m_proxyurl.Length > 0)
|
if (!string.IsNullOrEmpty(m_proxyurl))
|
||||||
{
|
{
|
||||||
if (m_proxyexcepts != null && m_proxyexcepts.Length > 0)
|
if (!string.IsNullOrEmpty(m_proxyexcepts))
|
||||||
{
|
{
|
||||||
string[] elist = m_proxyexcepts.Split(';');
|
string[] elist = m_proxyexcepts.Split(';');
|
||||||
request.Proxy = new WebProxy(m_proxyurl, true, elist);
|
request.Proxy = new WebProxy(m_proxyurl, true, elist);
|
||||||
|
|
|
@ -677,7 +677,7 @@ namespace OpenSim.Region.CoreModules.Scripting.XMLRPC
|
||||||
// if not, use as method name
|
// if not, use as method name
|
||||||
UUID parseUID;
|
UUID parseUID;
|
||||||
string mName = "llRemoteData";
|
string mName = "llRemoteData";
|
||||||
if ((Channel != null) && (Channel != ""))
|
if (!string.IsNullOrEmpty(Channel))
|
||||||
if (!UUID.TryParse(Channel, out parseUID))
|
if (!UUID.TryParse(Channel, out parseUID))
|
||||||
mName = Channel;
|
mName = Channel;
|
||||||
else
|
else
|
||||||
|
|
|
@ -259,7 +259,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
|
||||||
if (sp == null)
|
if (sp == null)
|
||||||
{
|
{
|
||||||
inventoryURL = UserManagementModule.GetUserServerURL(userID, "InventoryServerURI");
|
inventoryURL = UserManagementModule.GetUserServerURL(userID, "InventoryServerURI");
|
||||||
if (inventoryURL != null && inventoryURL != string.Empty)
|
if (!string.IsNullOrEmpty(inventoryURL))
|
||||||
{
|
{
|
||||||
inventoryURL = inventoryURL.Trim(new char[] { '/' });
|
inventoryURL = inventoryURL.Trim(new char[] { '/' });
|
||||||
m_InventoryURLs.Add(userID, inventoryURL);
|
m_InventoryURLs.Add(userID, inventoryURL);
|
||||||
|
|
|
@ -464,7 +464,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||||
// or creator data is present. Otherwise, use the estate owner instead.
|
// or creator data is present. Otherwise, use the estate owner instead.
|
||||||
foreach (SceneObjectPart part in sceneObject.Parts)
|
foreach (SceneObjectPart part in sceneObject.Parts)
|
||||||
{
|
{
|
||||||
if (part.CreatorData == null || part.CreatorData == string.Empty)
|
if (string.IsNullOrEmpty(part.CreatorData))
|
||||||
{
|
{
|
||||||
if (!ResolveUserUuid(scene, part.CreatorID))
|
if (!ResolveUserUuid(scene, part.CreatorID))
|
||||||
part.CreatorID = scene.RegionInfo.EstateSettings.EstateOwner;
|
part.CreatorID = scene.RegionInfo.EstateSettings.EstateOwner;
|
||||||
|
@ -498,7 +498,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||||
kvp.Value.OwnerID = scene.RegionInfo.EstateSettings.EstateOwner;
|
kvp.Value.OwnerID = scene.RegionInfo.EstateSettings.EstateOwner;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (kvp.Value.CreatorData == null || kvp.Value.CreatorData == string.Empty)
|
if (string.IsNullOrEmpty(kvp.Value.CreatorData))
|
||||||
{
|
{
|
||||||
if (!ResolveUserUuid(scene, kvp.Value.CreatorID))
|
if (!ResolveUserUuid(scene, kvp.Value.CreatorID))
|
||||||
kvp.Value.CreatorID = scene.RegionInfo.EstateSettings.EstateOwner;
|
kvp.Value.CreatorID = scene.RegionInfo.EstateSettings.EstateOwner;
|
||||||
|
|
|
@ -42,7 +42,6 @@ using OpenSim.Framework.Capabilities;
|
||||||
using OpenSim.Framework.Console;
|
using OpenSim.Framework.Console;
|
||||||
using OpenSim.Framework.Servers;
|
using OpenSim.Framework.Servers;
|
||||||
using OpenSim.Framework.Servers.HttpServer;
|
using OpenSim.Framework.Servers.HttpServer;
|
||||||
using OpenSim.Region.CoreModules.Framework.InterfaceCommander;
|
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
using OpenSim.Region.Physics.Manager;
|
using OpenSim.Region.Physics.Manager;
|
||||||
|
@ -71,7 +70,6 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
|
|
||||||
private LandChannel landChannel;
|
private LandChannel landChannel;
|
||||||
private Scene m_scene;
|
private Scene m_scene;
|
||||||
protected Commander m_commander = new Commander("land");
|
|
||||||
|
|
||||||
protected IUserManagement m_userManager;
|
protected IUserManagement m_userManager;
|
||||||
protected IPrimCountModule m_primCountModule;
|
protected IPrimCountModule m_primCountModule;
|
||||||
|
@ -139,14 +137,13 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
m_scene.EventManager.OnIncomingLandDataFromStorage += EventManagerOnIncomingLandDataFromStorage;
|
m_scene.EventManager.OnIncomingLandDataFromStorage += EventManagerOnIncomingLandDataFromStorage;
|
||||||
m_scene.EventManager.OnSetAllowForcefulBan += EventManagerOnSetAllowedForcefulBan;
|
m_scene.EventManager.OnSetAllowForcefulBan += EventManagerOnSetAllowedForcefulBan;
|
||||||
m_scene.EventManager.OnRegisterCaps += EventManagerOnRegisterCaps;
|
m_scene.EventManager.OnRegisterCaps += EventManagerOnRegisterCaps;
|
||||||
m_scene.EventManager.OnPluginConsole += EventManagerOnPluginConsole;
|
|
||||||
|
|
||||||
lock (m_scene)
|
lock (m_scene)
|
||||||
{
|
{
|
||||||
m_scene.LandChannel = (ILandChannel)landChannel;
|
m_scene.LandChannel = (ILandChannel)landChannel;
|
||||||
}
|
}
|
||||||
|
|
||||||
InstallInterfaces();
|
RegisterCommands();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RegionLoaded(Scene scene)
|
public void RegionLoaded(Scene scene)
|
||||||
|
@ -158,10 +155,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
|
|
||||||
public void RemoveRegion(Scene scene)
|
public void RemoveRegion(Scene scene)
|
||||||
{
|
{
|
||||||
// TODO: Also release other event manager listeners here
|
// TODO: Release event manager listeners here
|
||||||
|
|
||||||
m_scene.EventManager.OnPluginConsole -= EventManagerOnPluginConsole;
|
|
||||||
m_scene.UnregisterModuleCommander(m_commander.Name);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// private bool OnVerifyUserConnection(ScenePresence scenePresence, out string reason)
|
// private bool OnVerifyUserConnection(ScenePresence scenePresence, out string reason)
|
||||||
|
@ -171,29 +165,6 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
// return nearestParcel != null;
|
// return nearestParcel != null;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Processes commandline input. Do not call directly.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="args">Commandline arguments</param>
|
|
||||||
protected void EventManagerOnPluginConsole(string[] args)
|
|
||||||
{
|
|
||||||
if (args[0] == "land")
|
|
||||||
{
|
|
||||||
if (args.Length == 1)
|
|
||||||
{
|
|
||||||
m_commander.ProcessConsoleCommand("help", new string[0]);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
string[] tmpArgs = new string[args.Length - 2];
|
|
||||||
int i;
|
|
||||||
for (i = 2; i < args.Length; i++)
|
|
||||||
tmpArgs[i - 2] = args[i];
|
|
||||||
|
|
||||||
m_commander.ProcessConsoleCommand(args[1], tmpArgs);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void EventManagerOnNewClient(IClientAPI client)
|
void EventManagerOnNewClient(IClientAPI client)
|
||||||
{
|
{
|
||||||
//Register some client events
|
//Register some client events
|
||||||
|
@ -1982,44 +1953,84 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
m_Dialog.SendAlertToUser(remoteClient, "You are not allowed to set your home location in this parcel.");
|
m_Dialog.SendAlertToUser(remoteClient, "You are not allowed to set your home location in this parcel.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void RegisterCommands()
|
||||||
protected void InstallInterfaces()
|
|
||||||
{
|
{
|
||||||
Command clearCommand
|
ICommands commands = MainConsole.Instance.Commands;
|
||||||
= new Command("clear", CommandIntentions.COMMAND_HAZARDOUS, ClearCommand, "Clears all the parcels from the region.");
|
|
||||||
Command showCommand
|
|
||||||
= new Command("show", CommandIntentions.COMMAND_STATISTICAL, ShowParcelsCommand, "Shows all parcels on the region.");
|
|
||||||
|
|
||||||
m_commander.RegisterCommand("clear", clearCommand);
|
commands.AddCommand(
|
||||||
m_commander.RegisterCommand("show", showCommand);
|
"Land", false, "land clear",
|
||||||
|
"land clear",
|
||||||
|
"Clear all the parcels from the region.",
|
||||||
|
"Command will ask for confirmation before proceeding.",
|
||||||
|
HandleClearCommand);
|
||||||
|
|
||||||
// Add this to our scene so scripts can call these functions
|
commands.AddCommand(
|
||||||
m_scene.RegisterModuleCommander(m_commander);
|
"Land", false, "land show",
|
||||||
|
"land show [<local-land-id>]",
|
||||||
|
"Show information about the parcels on the region.",
|
||||||
|
"If no local land ID is given, then summary information about all the parcels is shown.\n"
|
||||||
|
+ "If a local land ID is given then full information about that parcel is shown.",
|
||||||
|
HandleShowCommand);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void ClearCommand(Object[] args)
|
protected void HandleClearCommand(string module, string[] args)
|
||||||
{
|
{
|
||||||
|
if (!(MainConsole.Instance.ConsoleScene == null || MainConsole.Instance.ConsoleScene == m_scene))
|
||||||
|
return;
|
||||||
|
|
||||||
string response = MainConsole.Instance.CmdPrompt(
|
string response = MainConsole.Instance.CmdPrompt(
|
||||||
string.Format(
|
string.Format(
|
||||||
"Are you sure that you want to clear all land parcels from {0} (y or n)",
|
"Are you sure that you want to clear all land parcels from {0} (y or n)", m_scene.Name),
|
||||||
m_scene.RegionInfo.RegionName),
|
|
||||||
"n");
|
"n");
|
||||||
|
|
||||||
if (response.ToLower() == "y")
|
if (response.ToLower() == "y")
|
||||||
{
|
{
|
||||||
Clear(true);
|
Clear(true);
|
||||||
MainConsole.Instance.OutputFormat("Cleared all parcels from {0}", m_scene.RegionInfo.RegionName);
|
MainConsole.Instance.OutputFormat("Cleared all parcels from {0}", m_scene.Name);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("Aborting clear of all parcels from {0}", m_scene.RegionInfo.RegionName);
|
MainConsole.Instance.OutputFormat("Aborting clear of all parcels from {0}", m_scene.Name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void ShowParcelsCommand(Object[] args)
|
protected void HandleShowCommand(string module, string[] args)
|
||||||
{
|
{
|
||||||
|
if (!(MainConsole.Instance.ConsoleScene == null || MainConsole.Instance.ConsoleScene == m_scene))
|
||||||
|
return;
|
||||||
|
|
||||||
StringBuilder report = new StringBuilder();
|
StringBuilder report = new StringBuilder();
|
||||||
|
|
||||||
|
if (args.Length <= 2)
|
||||||
|
{
|
||||||
|
AppendParcelsSummaryReport(report);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int landLocalId;
|
||||||
|
|
||||||
|
if (!ConsoleUtil.TryParseConsoleInt(MainConsole.Instance, args[2], out landLocalId))
|
||||||
|
return;
|
||||||
|
|
||||||
|
ILandObject lo;
|
||||||
|
|
||||||
|
lock (m_landList)
|
||||||
|
{
|
||||||
|
if (!m_landList.TryGetValue(landLocalId, out lo))
|
||||||
|
{
|
||||||
|
MainConsole.Instance.OutputFormat("No parcel found with local ID {0}", landLocalId);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
AppendParcelReport(report, lo);
|
||||||
|
}
|
||||||
|
|
||||||
|
MainConsole.Instance.Output(report.ToString());
|
||||||
|
}
|
||||||
|
|
||||||
|
private void AppendParcelsSummaryReport(StringBuilder report)
|
||||||
|
{
|
||||||
report.AppendFormat("Land information for {0}\n", m_scene.RegionInfo.RegionName);
|
report.AppendFormat("Land information for {0}\n", m_scene.RegionInfo.RegionName);
|
||||||
report.AppendFormat(
|
report.AppendFormat(
|
||||||
"{0,-20} {1,-10} {2,-9} {3,-18} {4,-18} {5,-20}\n",
|
"{0,-20} {1,-10} {2,-9} {3,-18} {4,-18} {5,-20}\n",
|
||||||
|
@ -2041,8 +2052,69 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
ld.Name, ld.LocalID, ld.Area, lo.StartPoint, lo.EndPoint, m_userManager.GetUserName(ld.OwnerID));
|
ld.Name, ld.LocalID, ld.Area, lo.StartPoint, lo.EndPoint, m_userManager.GetUserName(ld.OwnerID));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
MainConsole.Instance.Output(report.ToString());
|
private void AppendParcelReport(StringBuilder report, ILandObject lo)
|
||||||
|
{
|
||||||
|
LandData ld = lo.LandData;
|
||||||
|
|
||||||
|
ConsoleDisplayList cdl = new ConsoleDisplayList();
|
||||||
|
cdl.AddRow("Parcel name", ld.Name);
|
||||||
|
cdl.AddRow("Local ID", ld.LocalID);
|
||||||
|
cdl.AddRow("Description", ld.Description);
|
||||||
|
cdl.AddRow("Snapshot ID", ld.SnapshotID);
|
||||||
|
cdl.AddRow("Area", ld.Area);
|
||||||
|
cdl.AddRow("Starts", lo.StartPoint);
|
||||||
|
cdl.AddRow("Ends", lo.EndPoint);
|
||||||
|
cdl.AddRow("AABB Min", ld.AABBMin);
|
||||||
|
cdl.AddRow("AABB Max", ld.AABBMax);
|
||||||
|
|
||||||
|
cdl.AddRow("Owner", m_userManager.GetUserName(ld.OwnerID));
|
||||||
|
cdl.AddRow("Is group owned?", ld.IsGroupOwned);
|
||||||
|
cdl.AddRow("GroupID", ld.GroupID);
|
||||||
|
|
||||||
|
cdl.AddRow("Status", ld.Status);
|
||||||
|
cdl.AddRow("Flags", (ParcelFlags)ld.Flags);
|
||||||
|
|
||||||
|
cdl.AddRow("Landing Type", (LandingType)ld.LandingType);
|
||||||
|
cdl.AddRow("User Location", ld.UserLocation);
|
||||||
|
cdl.AddRow("User look at", ld.UserLookAt);
|
||||||
|
|
||||||
|
cdl.AddRow("Other clean time", ld.OtherCleanTime);
|
||||||
|
|
||||||
|
cdl.AddRow("Max Prims", lo.GetParcelMaxPrimCount());
|
||||||
|
IPrimCounts pc = lo.PrimCounts;
|
||||||
|
cdl.AddRow("Owner Prims", pc.Owner);
|
||||||
|
cdl.AddRow("Group Prims", pc.Group);
|
||||||
|
cdl.AddRow("Other Prims", pc.Others);
|
||||||
|
cdl.AddRow("Selected Prims", pc.Selected);
|
||||||
|
cdl.AddRow("Total Prims", pc.Total);
|
||||||
|
|
||||||
|
cdl.AddRow("Music URL", ld.MusicURL);
|
||||||
|
cdl.AddRow("Obscure Music", ld.ObscureMusic);
|
||||||
|
|
||||||
|
cdl.AddRow("Media ID", ld.MediaID);
|
||||||
|
cdl.AddRow("Media Autoscale", Convert.ToBoolean(ld.MediaAutoScale));
|
||||||
|
cdl.AddRow("Media URL", ld.MediaURL);
|
||||||
|
cdl.AddRow("Media Type", ld.MediaType);
|
||||||
|
cdl.AddRow("Media Description", ld.MediaDescription);
|
||||||
|
cdl.AddRow("Media Width", ld.MediaWidth);
|
||||||
|
cdl.AddRow("Media Height", ld.MediaHeight);
|
||||||
|
cdl.AddRow("Media Loop", ld.MediaLoop);
|
||||||
|
cdl.AddRow("Obscure Media", ld.ObscureMedia);
|
||||||
|
|
||||||
|
cdl.AddRow("Parcel Category", ld.Category);
|
||||||
|
|
||||||
|
cdl.AddRow("Claim Date", ld.ClaimDate);
|
||||||
|
cdl.AddRow("Claim Price", ld.ClaimPrice);
|
||||||
|
cdl.AddRow("Pass Hours", ld.PassHours);
|
||||||
|
cdl.AddRow("Pass Price", ld.PassPrice);
|
||||||
|
|
||||||
|
cdl.AddRow("Auction ID", ld.AuctionID);
|
||||||
|
cdl.AddRow("Authorized Buyer ID", ld.AuthBuyerID);
|
||||||
|
cdl.AddRow("Sale Price", ld.SalePrice);
|
||||||
|
|
||||||
|
cdl.AddToStringBuilder(report);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -307,7 +307,7 @@ namespace OpenSim.Region.DataSnapshot
|
||||||
XmlNode regiondata = requestedSnap.CreateNode(XmlNodeType.Element, "regiondata", "");
|
XmlNode regiondata = requestedSnap.CreateNode(XmlNodeType.Element, "regiondata", "");
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (regionName == null || regionName == "")
|
if (string.IsNullOrEmpty(regionName))
|
||||||
{
|
{
|
||||||
XmlNode timerblock = requestedSnap.CreateNode(XmlNodeType.Element, "expire", "");
|
XmlNode timerblock = requestedSnap.CreateNode(XmlNodeType.Element, "expire", "");
|
||||||
timerblock.InnerText = m_period.ToString();
|
timerblock.InnerText = m_period.ToString();
|
||||||
|
|
|
@ -473,7 +473,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (CreatorData != null && CreatorData != string.Empty)
|
if (!string.IsNullOrEmpty(CreatorData))
|
||||||
return CreatorID.ToString() + ';' + CreatorData;
|
return CreatorID.ToString() + ';' + CreatorData;
|
||||||
else
|
else
|
||||||
return CreatorID.ToString();
|
return CreatorID.ToString();
|
||||||
|
|
|
@ -1223,7 +1223,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
|
||||||
|
|
||||||
WriteUUID(writer, "CreatorID", sop.CreatorID, options);
|
WriteUUID(writer, "CreatorID", sop.CreatorID, options);
|
||||||
|
|
||||||
if (sop.CreatorData != null && sop.CreatorData != string.Empty)
|
if (!string.IsNullOrEmpty(sop.CreatorData))
|
||||||
writer.WriteElementString("CreatorData", sop.CreatorData);
|
writer.WriteElementString("CreatorData", sop.CreatorData);
|
||||||
else if (options.ContainsKey("home"))
|
else if (options.ContainsKey("home"))
|
||||||
{
|
{
|
||||||
|
@ -1396,7 +1396,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
|
||||||
|
|
||||||
WriteUUID(writer, "CreatorID", item.CreatorID, options);
|
WriteUUID(writer, "CreatorID", item.CreatorID, options);
|
||||||
|
|
||||||
if (item.CreatorData != null && item.CreatorData != string.Empty)
|
if (!string.IsNullOrEmpty(item.CreatorData))
|
||||||
writer.WriteElementString("CreatorData", item.CreatorData);
|
writer.WriteElementString("CreatorData", item.CreatorData);
|
||||||
else if (options.ContainsKey("home"))
|
else if (options.ContainsKey("home"))
|
||||||
{
|
{
|
||||||
|
|
|
@ -461,7 +461,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat
|
||||||
|
|
||||||
string result = instr;
|
string result = instr;
|
||||||
|
|
||||||
if (result == null || result.Length == 0)
|
if (string.IsNullOrEmpty(result))
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
// Repeatedly scan the string until all possible
|
// Repeatedly scan the string until all possible
|
||||||
|
|
|
@ -822,11 +822,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
||||||
{
|
{
|
||||||
string requrl = String.Format(m_vivoxChannelPath, m_vivoxServer, "create", channelId, m_authToken);
|
string requrl = String.Format(m_vivoxChannelPath, m_vivoxServer, "create", channelId, m_authToken);
|
||||||
|
|
||||||
if (parent != null && parent != String.Empty)
|
if (!string.IsNullOrEmpty(parent))
|
||||||
{
|
{
|
||||||
requrl = String.Format("{0}&chan_parent={1}", requrl, parent);
|
requrl = String.Format("{0}&chan_parent={1}", requrl, parent);
|
||||||
}
|
}
|
||||||
if (description != null && description != String.Empty)
|
if (!string.IsNullOrEmpty(description))
|
||||||
{
|
{
|
||||||
requrl = String.Format("{0}&chan_desc={1}", requrl, description);
|
requrl = String.Format("{0}&chan_desc={1}", requrl, description);
|
||||||
}
|
}
|
||||||
|
@ -862,7 +862,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
||||||
// requrl = String.Format("{0}&chan_parent={1}", requrl, parent);
|
// requrl = String.Format("{0}&chan_parent={1}", requrl, parent);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
if (description != null && description != String.Empty)
|
if (!string.IsNullOrEmpty(description))
|
||||||
{
|
{
|
||||||
requrl = String.Format("{0}&chan_desc={1}", requrl, description);
|
requrl = String.Format("{0}&chan_desc={1}", requrl, description);
|
||||||
}
|
}
|
||||||
|
@ -1047,7 +1047,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
||||||
private XmlElement VivoxDeleteChannel(string parent, string channelid)
|
private XmlElement VivoxDeleteChannel(string parent, string channelid)
|
||||||
{
|
{
|
||||||
string requrl = String.Format(m_vivoxChannelDel, m_vivoxServer, "delete", channelid, m_authToken);
|
string requrl = String.Format(m_vivoxChannelDel, m_vivoxServer, "delete", channelid, m_authToken);
|
||||||
if (parent != null && parent != String.Empty)
|
if (!string.IsNullOrEmpty(parent))
|
||||||
{
|
{
|
||||||
requrl = String.Format("{0}&chan_parent={1}", requrl, parent);
|
requrl = String.Format("{0}&chan_parent={1}", requrl, parent);
|
||||||
}
|
}
|
||||||
|
|
|
@ -212,8 +212,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
||||||
m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR]: Initializing {0}", this.Name);
|
m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR]: Initializing {0}", this.Name);
|
||||||
|
|
||||||
m_groupsServerURI = groupsConfig.GetString("GroupsServerURI", string.Empty);
|
m_groupsServerURI = groupsConfig.GetString("GroupsServerURI", string.Empty);
|
||||||
if ((m_groupsServerURI == null) ||
|
if (string.IsNullOrEmpty(m_groupsServerURI))
|
||||||
(m_groupsServerURI == string.Empty))
|
|
||||||
{
|
{
|
||||||
m_log.ErrorFormat("Please specify a valid Simian Server for GroupsServerURI in OpenSim.ini, [Groups]");
|
m_log.ErrorFormat("Please specify a valid Simian Server for GroupsServerURI in OpenSim.ini, [Groups]");
|
||||||
m_connectorEnabled = false;
|
m_connectorEnabled = false;
|
||||||
|
@ -438,7 +437,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ((groupName != null) && (groupName != string.Empty))
|
else if (!string.IsNullOrEmpty(groupName))
|
||||||
{
|
{
|
||||||
if (!SimianGetFirstGenericEntry("Group", groupName, out groupID, out GroupInfoMap))
|
if (!SimianGetFirstGenericEntry("Group", groupName, out groupID, out GroupInfoMap))
|
||||||
{
|
{
|
||||||
|
|
|
@ -168,8 +168,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
||||||
m_log.DebugFormat("[XMLRPC-GROUPS-CONNECTOR]: Initializing {0}", this.Name);
|
m_log.DebugFormat("[XMLRPC-GROUPS-CONNECTOR]: Initializing {0}", this.Name);
|
||||||
|
|
||||||
m_groupsServerURI = groupsConfig.GetString("GroupsServerURI", string.Empty);
|
m_groupsServerURI = groupsConfig.GetString("GroupsServerURI", string.Empty);
|
||||||
if ((m_groupsServerURI == null) ||
|
if (string.IsNullOrEmpty(m_groupsServerURI))
|
||||||
(m_groupsServerURI == string.Empty))
|
|
||||||
{
|
{
|
||||||
m_log.ErrorFormat("Please specify a valid URL for GroupsServerURI in OpenSim.ini, [Groups]");
|
m_log.ErrorFormat("Please specify a valid URL for GroupsServerURI in OpenSim.ini, [Groups]");
|
||||||
m_connectorEnabled = false;
|
m_connectorEnabled = false;
|
||||||
|
@ -354,7 +353,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
||||||
{
|
{
|
||||||
param["GroupID"] = GroupID.ToString();
|
param["GroupID"] = GroupID.ToString();
|
||||||
}
|
}
|
||||||
if ((GroupName != null) && (GroupName != string.Empty))
|
if (!string.IsNullOrEmpty(GroupName))
|
||||||
{
|
{
|
||||||
param["Name"] = GroupName.ToString();
|
param["Name"] = GroupName.ToString();
|
||||||
}
|
}
|
||||||
|
|
|
@ -367,7 +367,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
|
||||||
|
|
||||||
Vector3 ZeroVector = new Vector3(0, 0, 0);
|
Vector3 ZeroVector = new Vector3(0, 0, 0);
|
||||||
|
|
||||||
bool nameSearch = (ts.name != null && ts.name != "");
|
bool nameSearch = !string.IsNullOrEmpty(ts.name);
|
||||||
|
|
||||||
foreach (EntityBase ent in Entities)
|
foreach (EntityBase ent in Entities)
|
||||||
{
|
{
|
||||||
|
@ -605,7 +605,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
|
||||||
return sensedEntities;
|
return sensedEntities;
|
||||||
senseEntity(sp);
|
senseEntity(sp);
|
||||||
}
|
}
|
||||||
else if (ts.name != null && ts.name != "")
|
else if (!string.IsNullOrEmpty(ts.name))
|
||||||
{
|
{
|
||||||
ScenePresence sp;
|
ScenePresence sp;
|
||||||
// Try lookup by name will return if/when found
|
// Try lookup by name will return if/when found
|
||||||
|
|
|
@ -618,7 +618,7 @@ namespace SecondLife
|
||||||
// error log.
|
// error log.
|
||||||
if (results.Errors.Count > 0)
|
if (results.Errors.Count > 0)
|
||||||
{
|
{
|
||||||
if (!retried && (results.Errors[0].FileName == null || results.Errors[0].FileName == String.Empty) &&
|
if (!retried && string.IsNullOrEmpty(results.Errors[0].FileName) &&
|
||||||
results.Errors[0].Line == 0)
|
results.Errors[0].Line == 0)
|
||||||
{
|
{
|
||||||
// System.Console.WriteLine("retrying failed compilation");
|
// System.Console.WriteLine("retrying failed compilation");
|
||||||
|
|
|
@ -298,7 +298,7 @@ namespace OpenSim.Services.HypergridService
|
||||||
UserAccount user = m_Cache.GetUser(it.CreatorId);
|
UserAccount user = m_Cache.GetUser(it.CreatorId);
|
||||||
|
|
||||||
// Adjust the creator data
|
// Adjust the creator data
|
||||||
if (user != null && it != null && (it.CreatorData == null || it.CreatorData == string.Empty))
|
if (user != null && it != null && string.IsNullOrEmpty(it.CreatorData))
|
||||||
it.CreatorData = m_HomeURL + ";" + user.FirstName + " " + user.LastName;
|
it.CreatorData = m_HomeURL + ";" + user.FirstName + " " + user.LastName;
|
||||||
}
|
}
|
||||||
return it;
|
return it;
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue