Merge branch 'master' into careminster-presence-refactor

This brings careminster on the level of master. To be tested
This commit is contained in:
Melanie
2010-03-03 02:07:03 +00:00
501 changed files with 26121 additions and 46964 deletions

View File

@@ -36,12 +36,11 @@ using OpenMetaverse;
using Nini.Config;
using OpenSim;
using OpenSim.Framework;
using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Console;
using OpenSim.Region.CoreModules.Avatar.NPC;
using OpenSim.Region.Framework.Interfaces;
using OpenSim.Region.Framework.Scenes;
using OpenSim.Region.Framework.Scenes.Hypergrid;
using OpenSim.Region.ScriptEngine.Shared;
using OpenSim.Region.ScriptEngine.Shared.Api.Plugins;
using OpenSim.Region.ScriptEngine.Shared.ScriptBase;
@@ -607,21 +606,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
// and convert the regionName to the target region
if (regionName.Contains(".") && regionName.Contains(":"))
{
List<GridRegion> regions = World.GridService.GetRegionsByName(World.RegionInfo.ScopeID, regionName, 1);
// Try to link the region
IHyperlinkService hyperService = World.RequestModuleInterface<IHyperlinkService>();
if (hyperService != null)
if (regions != null && regions.Count > 0)
{
GridRegion regInfo = hyperService.TryLinkRegion(presence.ControllingClient,
regionName);
// Get the region name
if (regInfo != null)
{
regionName = regInfo.RegionName;
}
else
{
// Might need to ping the client here in case of failure??
}
GridRegion regInfo = regions[0];
regionName = regInfo.RegionName;
}
}
presence.ControllingClient.SendTeleportLocationStart();
@@ -1482,7 +1472,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
m_host.AddScriptLPS(1);
// Create new asset
AssetBase asset = new AssetBase(UUID.Random(), notecardName, (sbyte)AssetType.Notecard);
AssetBase asset = new AssetBase(UUID.Random(), notecardName, (sbyte)AssetType.Notecard, m_host.OwnerID.ToString());
asset.Description = "Script Generated Notecard";
string notecardData = String.Empty;
@@ -1695,15 +1685,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{
CheckThreatLevel(ThreatLevel.Low, "osAvatarName2Key");
CachedUserInfo userInfo = World.CommsManager.UserProfileCacheService.GetUserDetails(firstname, lastname);
if (null == userInfo)
UserAccount account = World.UserAccountService.GetUserAccount(World.RegionInfo.ScopeID, firstname, lastname);
if (null == account)
{
return UUID.Zero.ToString();
}
else
{
return userInfo.UserProfile.ID.ToString();
return account.PrincipalID.ToString();
}
}
@@ -1714,15 +1703,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
if (UUID.TryParse(id, out key))
{
CachedUserInfo userInfo = World.CommsManager.UserProfileCacheService.GetUserDetails(key);
if (null == userInfo)
UserAccount account = World.UserAccountService.GetUserAccount(World.RegionInfo.ScopeID, key);
if (null == account)
{
return "";
}
else
{
return userInfo.UserProfile.Name;
return account.Name;
}
}
else