mirror of
https://github.com/opensim/opensim.git
synced 2026-08-10 03:06:05 +08:00
cosmetics
This commit is contained in:
@@ -120,16 +120,6 @@ namespace OpenSim.Region.CoreModules.Framework
|
||||
|
||||
public void CreateCaps(UUID agentId, uint circuitCode)
|
||||
{
|
||||
int ts = Util.EnvironmentTickCount();
|
||||
/* this as no business here...
|
||||
* must be done elsewhere ( and is )
|
||||
int flags = m_scene.GetUserFlags(agentId);
|
||||
|
||||
m_log.ErrorFormat("[CreateCaps]: banCheck {0} ", Util.EnvironmentTickCountSubtract(ts));
|
||||
|
||||
if (m_scene.RegionInfo.EstateSettings.IsBanned(agentId, flags))
|
||||
return;
|
||||
*/
|
||||
string capsObjectPath = GetCapsPath(agentId);
|
||||
Caps caps;
|
||||
lock (m_capsObjects)
|
||||
@@ -138,9 +128,9 @@ namespace OpenSim.Region.CoreModules.Framework
|
||||
{
|
||||
if (capsObjectPath == oldCaps.CapsObjectPath)
|
||||
{
|
||||
// m_log.WarnFormat(
|
||||
// "[CAPS]: Reusing caps for agent {0} in region {1}. Old caps path {2}, new caps path {3}. ",
|
||||
// agentId, m_scene.RegionInfo.RegionName, oldCaps.CapsObjectPath, capsObjectPath);
|
||||
//m_log.WarnFormat(
|
||||
// "[CAPS]: Reusing caps for agent {0} in region {1}. Old caps path {2}, new caps path {3}. ",
|
||||
// agentId, m_scene.RegionInfo.RegionName, oldCaps.CapsObjectPath, capsObjectPath);
|
||||
return;
|
||||
}
|
||||
else
|
||||
@@ -156,22 +146,19 @@ namespace OpenSim.Region.CoreModules.Framework
|
||||
}
|
||||
}
|
||||
|
||||
// m_log.DebugFormat(
|
||||
// "[CAPS]: Adding capabilities for agent {0} in {1} with path {2}",
|
||||
// agentId, m_scene.RegionInfo.RegionName, capsObjectPath);
|
||||
//m_log.DebugFormat(
|
||||
// "[CAPS]: Adding capabilities for agent {0} in {1} with path {2}",
|
||||
// agentId, m_scene.RegionInfo.RegionName, capsObjectPath);
|
||||
|
||||
caps = new Caps(MainServer.Instance, m_scene.RegionInfo.ExternalHostName,
|
||||
(MainServer.Instance == null) ? 0: MainServer.Instance.Port,
|
||||
(MainServer.Instance is null) ? 0: MainServer.Instance.Port,
|
||||
capsObjectPath, agentId, m_scene.RegionInfo.RegionName);
|
||||
|
||||
m_log.DebugFormat("[CreateCaps]: new caps agent {0}, circuit {1}, path {2}, time {3} ",agentId,
|
||||
circuitCode,caps.CapsObjectPath, Util.EnvironmentTickCountSubtract(ts));
|
||||
m_log.Debug($"[CreateCaps]: new caps agent {agentId}, circuit {circuitCode}, path {caps.CapsObjectPath}");
|
||||
|
||||
m_capsObjects[circuitCode] = caps;
|
||||
}
|
||||
m_scene.EventManager.TriggerOnRegisterCaps(agentId, caps);
|
||||
// m_log.ErrorFormat("[CreateCaps]: end {0} ", Util.EnvironmentTickCountSubtract(ts));
|
||||
|
||||
}
|
||||
|
||||
public void RemoveCaps(UUID agentId, uint circuitCode)
|
||||
@@ -299,8 +286,7 @@ namespace OpenSim.Region.CoreModules.Framework
|
||||
{
|
||||
foreach (KeyValuePair<ulong, string> kvp in m_childrenSeeds[agentID])
|
||||
{
|
||||
uint x, y;
|
||||
Util.RegionHandleToRegionLoc(kvp.Key, out x, out y);
|
||||
Util.RegionHandleToRegionLoc(kvp.Key, out uint x, out uint y);
|
||||
m_log.Info(" >> "+x+", "+y+": "+kvp.Value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -423,22 +423,20 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||
|
||||
public virtual bool UpdateInventoryItemAsset(UUID ownerID, InventoryItemBase item, AssetBase asset)
|
||||
{
|
||||
if (item != null && item.Owner == ownerID && asset != null)
|
||||
if (item is not null && item.Owner.Equals(ownerID) && asset is not null)
|
||||
{
|
||||
// m_log.DebugFormat(
|
||||
// "[INVENTORY ACCESS MODULE]: Updating item {0} {1} with new asset {2}",
|
||||
// item.Name, item.ID, asset.ID);
|
||||
|
||||
//m_log.DebugFormat(
|
||||
// "[INVENTORY ACCESS MODULE]: Updating item {0} {1} with new asset {2}",
|
||||
// item.Name, item.ID, asset.ID);
|
||||
|
||||
m_Scene.AssetService.Store(asset);
|
||||
m_Scene.InventoryService.UpdateItem(item);
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.ErrorFormat("[INVENTORY ACCESS MODULE]: Given invalid item for inventory update: {0}",
|
||||
(item == null || asset == null? "null item or asset" : "wrong owner"));
|
||||
(item is null || asset is null? "null item or asset" : "wrong owner"));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user