mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 01:06:30 +08:00
Merge branch 'master' into careminster-presence-refactor
This commit is contained in:
@@ -94,7 +94,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
|
||||
public void Initialise()
|
||||
{
|
||||
m_log.Info("[RADMIN]: " + Name + " cannot be default-initialized!");
|
||||
m_log.Error("[RADMIN]: " + Name + " cannot be default-initialized!");
|
||||
throw new PluginNotInitialisedException(Name);
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
else
|
||||
{
|
||||
m_config = m_configSource.Configs["RemoteAdmin"];
|
||||
m_log.Info("[RADMIN]: Remote Admin Plugin Enabled");
|
||||
m_log.Debug("[RADMIN]: Remote Admin Plugin Enabled");
|
||||
m_requiredPassword = m_config.GetString("access_password", String.Empty);
|
||||
int port = m_config.GetInt("port", 0);
|
||||
|
||||
@@ -266,8 +266,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.ErrorFormat("[RADMIN]: Restart region: failed: {0}", e.Message);
|
||||
m_log.DebugFormat("[RADMIN]: Restart region: failed: {0}", e.ToString());
|
||||
m_log.ErrorFormat("[RADMIN]: Restart region: failed: {0} {1}", e.Message, e.StackTrace);
|
||||
responseData["accepted"] = false;
|
||||
responseData["success"] = false;
|
||||
responseData["rebooting"] = false;
|
||||
@@ -313,8 +312,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.ErrorFormat("[RADMIN]: Broadcasting: failed: {0}", e.Message);
|
||||
m_log.DebugFormat("[RADMIN]: Broadcasting: failed: {0}", e.ToString());
|
||||
m_log.ErrorFormat("[RADMIN]: Broadcasting: failed: {0}", e.Message, e.StackTrace);
|
||||
|
||||
responseData["accepted"] = false;
|
||||
responseData["success"] = false;
|
||||
@@ -384,7 +382,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
{
|
||||
Hashtable requestData = (Hashtable) request.Params[0];
|
||||
|
||||
m_log.DebugFormat("[RADMIN]: Load Terrain: XmlRpc {0}", request.ToString());
|
||||
m_log.DebugFormat("[RADMIN]: Load Terrain: XmlRpc {0}", request);
|
||||
// foreach (string k in requestData.Keys)
|
||||
// {
|
||||
// m_log.DebugFormat("[RADMIN]: Load Terrain: XmlRpc {0}: >{1}< {2}",
|
||||
@@ -431,8 +429,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.ErrorFormat("[RADMIN]: Terrain Loading: failed: {0}", e.Message);
|
||||
m_log.DebugFormat("[RADMIN]: Terrain Loading: failed: {0}", e.ToString());
|
||||
m_log.ErrorFormat("[RADMIN]: Terrain Loading: failed: {0} {1}", e.Message, e.StackTrace);
|
||||
|
||||
responseData["success"] = false;
|
||||
responseData["error"] = e.Message;
|
||||
@@ -520,14 +517,14 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.ErrorFormat("[RADMIN] Shutdown: failed: {0}", e.Message);
|
||||
m_log.DebugFormat("[RADMIN] Shutdown: failed: {0}", e.ToString());
|
||||
m_log.ErrorFormat("[RADMIN]: Shutdown: failed: {0} {1}", e.Message, e.StackTrace);
|
||||
|
||||
responseData["accepted"] = false;
|
||||
responseData["error"] = e.Message;
|
||||
|
||||
response.Value = responseData;
|
||||
}
|
||||
|
||||
m_log.Info("[RADMIN]: Shutdown Administrator Request complete");
|
||||
return response;
|
||||
}
|
||||
@@ -828,8 +825,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.ErrorFormat("[RADMIN] CreateRegion: failed {0}", e.Message);
|
||||
m_log.DebugFormat("[RADMIN] CreateRegion: failed {0}", e.ToString());
|
||||
m_log.ErrorFormat("[RADMIN] CreateRegion: failed {0} {1}", e.Message, e.StackTrace);
|
||||
|
||||
responseData["success"] = false;
|
||||
responseData["error"] = e.Message;
|
||||
@@ -895,8 +891,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.ErrorFormat("[RADMIN] DeleteRegion: failed {0}", e.Message);
|
||||
m_log.DebugFormat("[RADMIN] DeleteRegion: failed {0}", e.ToString());
|
||||
m_log.ErrorFormat("[RADMIN] DeleteRegion: failed {0} {1}", e.Message, e.StackTrace);
|
||||
|
||||
responseData["success"] = false;
|
||||
responseData["error"] = e.Message;
|
||||
@@ -987,8 +982,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.ErrorFormat("[RADMIN] CloseRegion: failed {0}", e.Message);
|
||||
m_log.DebugFormat("[RADMIN] CloseRegion: failed {0}", e.ToString());
|
||||
m_log.ErrorFormat("[RADMIN]: CloseRegion: failed {0} {1}", e.Message, e.StackTrace);
|
||||
|
||||
responseData["success"] = false;
|
||||
responseData["error"] = e.Message;
|
||||
@@ -1085,8 +1079,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.ErrorFormat("[RADMIN] ModifyRegion: failed {0}", e.Message);
|
||||
m_log.DebugFormat("[RADMIN] ModifyRegion: failed {0}", e.ToString());
|
||||
m_log.ErrorFormat("[RADMIN] ModifyRegion: failed {0} {1}", e.Message, e.StackTrace);
|
||||
|
||||
responseData["success"] = false;
|
||||
responseData["error"] = e.Message;
|
||||
@@ -1209,8 +1202,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.ErrorFormat("[RADMIN] CreateUser: failed: {0}", e.Message);
|
||||
m_log.DebugFormat("[RADMIN] CreateUser: failed: {0}", e.ToString());
|
||||
m_log.ErrorFormat("[RADMIN]: CreateUser: failed: {0} {1}", e.Message, e.StackTrace);
|
||||
|
||||
responseData["success"] = false;
|
||||
responseData["avatar_uuid"] = UUID.Zero.ToString();
|
||||
@@ -1301,8 +1293,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.ErrorFormat("[RADMIN] UserExists: failed: {0}", e.Message);
|
||||
m_log.DebugFormat("[RADMIN] UserExists: failed: {0}", e.ToString());
|
||||
m_log.ErrorFormat("[RADMIN]: UserExists: failed: {0} {1}", e.Message, e.StackTrace);
|
||||
|
||||
responseData["success"] = false;
|
||||
responseData["error"] = e.Message;
|
||||
@@ -1475,9 +1466,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
m_log.ErrorFormat("[RADMIN] UpdateUserAccount: failed: {0}", e.Message);
|
||||
m_log.DebugFormat("[RADMIN] UpdateUserAccount: failed: {0}", e.ToString());
|
||||
m_log.ErrorFormat("[RADMIN] UpdateUserAccount: failed: {0} {1}", e.Message, e.StackTrace);
|
||||
|
||||
responseData["success"] = false;
|
||||
responseData["avatar_uuid"] = UUID.Zero.ToString();
|
||||
@@ -1485,6 +1474,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
|
||||
response.Value = responseData;
|
||||
}
|
||||
|
||||
m_log.Info("[RADMIN]: UpdateUserAccount: request complete");
|
||||
return response;
|
||||
}
|
||||
@@ -1500,7 +1490,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
|
||||
private void UpdateUserAppearance(Hashtable responseData, Hashtable requestData, UUID userid)
|
||||
{
|
||||
m_log.DebugFormat("[RADMIN] updateUserAppearance");
|
||||
m_log.DebugFormat("[RADMIN]: updateUserAppearance");
|
||||
|
||||
string defaultMale = m_config.GetString("default_male", "Default Male");
|
||||
string defaultFemale = m_config.GetString("default_female", "Default Female");
|
||||
@@ -1540,16 +1530,16 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
|
||||
if (String.IsNullOrEmpty(model))
|
||||
{
|
||||
m_log.DebugFormat("[RADMIN] Appearance update not requested");
|
||||
m_log.DebugFormat("[RADMIN]: Appearance update not requested");
|
||||
return;
|
||||
}
|
||||
|
||||
m_log.DebugFormat("[RADMIN] Setting appearance for avatar {0}, using model <{1}>", userid, model);
|
||||
m_log.DebugFormat("[RADMIN]: Setting appearance for avatar {0}, using model <{1}>", userid, model);
|
||||
|
||||
string[] modelSpecifiers = model.Split();
|
||||
if (modelSpecifiers.Length != 2)
|
||||
{
|
||||
m_log.WarnFormat("[RADMIN] User appearance not set for {0}. Invalid model name : <{1}>", userid, model);
|
||||
m_log.WarnFormat("[RADMIN]: User appearance not set for {0}. Invalid model name : <{1}>", userid, model);
|
||||
// modelSpecifiers = dmodel.Split();
|
||||
return;
|
||||
}
|
||||
@@ -1560,7 +1550,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
|
||||
if (modelProfile == null)
|
||||
{
|
||||
m_log.WarnFormat("[RADMIN] Requested model ({0}) not found. Appearance unchanged", model);
|
||||
m_log.WarnFormat("[RADMIN]: Requested model ({0}) not found. Appearance unchanged", model);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1570,7 +1560,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
|
||||
EstablishAppearance(userid, modelProfile.PrincipalID);
|
||||
|
||||
m_log.DebugFormat("[RADMIN] Finished setting appearance for avatar {0}, using model {1}",
|
||||
m_log.DebugFormat("[RADMIN]: Finished setting appearance for avatar {0}, using model {1}",
|
||||
userid, model);
|
||||
}
|
||||
|
||||
@@ -1582,7 +1572,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
|
||||
private void EstablishAppearance(UUID destination, UUID source)
|
||||
{
|
||||
m_log.DebugFormat("[RADMIN] Initializing inventory for {0} from {1}", destination, source);
|
||||
m_log.DebugFormat("[RADMIN]: Initializing inventory for {0} from {1}", destination, source);
|
||||
Scene scene = m_application.SceneManager.CurrentOrFirstScene;
|
||||
|
||||
// If the model has no associated appearance we're done.
|
||||
@@ -1604,7 +1594,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.WarnFormat("[RADMIN] Error transferring appearance for {0} : {1}",
|
||||
m_log.WarnFormat("[RADMIN]: Error transferring appearance for {0} : {1}",
|
||||
destination, e.Message);
|
||||
}
|
||||
|
||||
@@ -1635,7 +1625,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.WarnFormat("[RADMIN] Error transferring appearance for {0} : {1}",
|
||||
m_log.WarnFormat("[RADMIN]: Error transferring appearance for {0} : {1}",
|
||||
destination, e.Message);
|
||||
}
|
||||
|
||||
@@ -1670,7 +1660,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
destinationFolder.ParentID = inventoryService.GetRootFolder(destination).ID;
|
||||
destinationFolder.Version = 1;
|
||||
inventoryService.AddFolder(destinationFolder); // store base record
|
||||
m_log.ErrorFormat("[RADMIN] Created folder for destination {0}", source);
|
||||
m_log.ErrorFormat("[RADMIN]: Created folder for destination {0}", source);
|
||||
}
|
||||
|
||||
// Wearables
|
||||
@@ -1690,6 +1680,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
{
|
||||
InventoryItemBase destinationItem = new InventoryItemBase(UUID.Random(), destination);
|
||||
destinationItem.Name = item.Name;
|
||||
destinationItem.Owner = destination;
|
||||
destinationItem.Description = item.Description;
|
||||
destinationItem.InvType = item.InvType;
|
||||
destinationItem.CreatorId = item.CreatorId;
|
||||
@@ -1709,6 +1700,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
destinationItem.Flags = item.Flags;
|
||||
destinationItem.CreationDate = item.CreationDate;
|
||||
destinationItem.Folder = destinationFolder.ID;
|
||||
ApplyNextOwnerPermissions(destinationItem);
|
||||
|
||||
m_application.SceneManager.CurrentOrFirstScene.AddInventoryItem(destinationItem);
|
||||
m_log.DebugFormat("[RADMIN]: Added item {0} to folder {1}", destinationItem.ID, destinationFolder.ID);
|
||||
@@ -1743,6 +1735,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
{
|
||||
InventoryItemBase destinationItem = new InventoryItemBase(UUID.Random(), destination);
|
||||
destinationItem.Name = item.Name;
|
||||
destinationItem.Owner = destination;
|
||||
destinationItem.Description = item.Description;
|
||||
destinationItem.InvType = item.InvType;
|
||||
destinationItem.CreatorId = item.CreatorId;
|
||||
@@ -1762,6 +1755,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
destinationItem.Flags = item.Flags;
|
||||
destinationItem.CreationDate = item.CreationDate;
|
||||
destinationItem.Folder = destinationFolder.ID;
|
||||
ApplyNextOwnerPermissions(destinationItem);
|
||||
|
||||
m_application.SceneManager.CurrentOrFirstScene.AddInventoryItem(destinationItem);
|
||||
m_log.DebugFormat("[RADMIN]: Added item {0} to folder {1}", destinationItem.ID, destinationFolder.ID);
|
||||
@@ -1819,13 +1813,17 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
{
|
||||
destinationFolder = new InventoryFolderBase();
|
||||
destinationFolder.ID = UUID.Random();
|
||||
destinationFolder.Name = assetType.ToString();
|
||||
if (assetType == AssetType.Clothing) {
|
||||
destinationFolder.Name = "Clothing";
|
||||
} else {
|
||||
destinationFolder.Name = "Body Parts";
|
||||
}
|
||||
destinationFolder.Owner = destination;
|
||||
destinationFolder.Type = (short)assetType;
|
||||
destinationFolder.ParentID = inventoryService.GetRootFolder(destination).ID;
|
||||
destinationFolder.Version = 1;
|
||||
inventoryService.AddFolder(destinationFolder); // store base record
|
||||
m_log.ErrorFormat("[RADMIN] Created folder for destination {0}", source);
|
||||
m_log.ErrorFormat("[RADMIN]: Created folder for destination {0}", source);
|
||||
}
|
||||
|
||||
InventoryFolderBase extraFolder;
|
||||
@@ -1843,7 +1841,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
extraFolder.ParentID = destinationFolder.ID;
|
||||
inventoryService.AddFolder(extraFolder);
|
||||
|
||||
m_log.DebugFormat("[RADMIN] Added folder {0} to folder {1}", extraFolder.ID, sourceFolder.ID);
|
||||
m_log.DebugFormat("[RADMIN]: Added folder {0} to folder {1}", extraFolder.ID, sourceFolder.ID);
|
||||
|
||||
List<InventoryItemBase> items = inventoryService.GetFolderContent(source, folder.ID).Items;
|
||||
|
||||
@@ -1851,6 +1849,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
{
|
||||
InventoryItemBase destinationItem = new InventoryItemBase(UUID.Random(), destination);
|
||||
destinationItem.Name = item.Name;
|
||||
destinationItem.Owner = destination;
|
||||
destinationItem.Description = item.Description;
|
||||
destinationItem.InvType = item.InvType;
|
||||
destinationItem.CreatorId = item.CreatorId;
|
||||
@@ -1870,6 +1869,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
destinationItem.Flags = item.Flags;
|
||||
destinationItem.CreationDate = item.CreationDate;
|
||||
destinationItem.Folder = extraFolder.ID;
|
||||
ApplyNextOwnerPermissions(destinationItem);
|
||||
|
||||
m_application.SceneManager.CurrentOrFirstScene.AddInventoryItem(destinationItem);
|
||||
inventoryMap.Add(item.ID, destinationItem.ID);
|
||||
@@ -1886,6 +1886,29 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Apply next owner permissions.
|
||||
/// </summary>
|
||||
|
||||
private void ApplyNextOwnerPermissions(InventoryItemBase item)
|
||||
{
|
||||
if (item.InvType == (int)InventoryType.Object && (item.CurrentPermissions & 7) != 0)
|
||||
{
|
||||
if ((item.CurrentPermissions & ((uint)PermissionMask.Copy >> 13)) == 0)
|
||||
item.CurrentPermissions &= ~(uint)PermissionMask.Copy;
|
||||
if ((item.CurrentPermissions & ((uint)PermissionMask.Transfer >> 13)) == 0)
|
||||
item.CurrentPermissions &= ~(uint)PermissionMask.Transfer;
|
||||
if ((item.CurrentPermissions & ((uint)PermissionMask.Modify >> 13)) == 0)
|
||||
item.CurrentPermissions &= ~(uint)PermissionMask.Modify;
|
||||
}
|
||||
item.CurrentPermissions &= item.NextPermissions;
|
||||
item.BasePermissions &= item.NextPermissions;
|
||||
item.EveryOnePermissions &= item.NextPermissions;
|
||||
// item.OwnerChanged = true;
|
||||
// item.PermsMask = 0;
|
||||
// item.PermsGranter = UUID.Zero;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method is called if a given model avatar name can not be found. If the external
|
||||
/// file has already been loaded once, then control returns immediately. If not, then it
|
||||
@@ -1895,7 +1918,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
/// indicate which outfit is the default, and this outfit will be automatically worn. The
|
||||
/// other outfits are provided to allow "real" avatars a way to easily change their outfits.
|
||||
/// </summary>
|
||||
|
||||
private bool CreateDefaultAvatars()
|
||||
{
|
||||
// Only load once
|
||||
@@ -1904,7 +1926,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
return false;
|
||||
}
|
||||
|
||||
m_log.DebugFormat("[RADMIN] Creating default avatar entries");
|
||||
m_log.DebugFormat("[RADMIN]: Creating default avatar entries");
|
||||
|
||||
m_defaultAvatarsLoaded = true;
|
||||
|
||||
@@ -1960,7 +1982,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
|
||||
foreach (XmlElement avatar in avatars)
|
||||
{
|
||||
m_log.DebugFormat("[RADMIN] Loading appearance for {0}, gender = {1}",
|
||||
m_log.DebugFormat("[RADMIN]: Loading appearance for {0}, gender = {1}",
|
||||
GetStringAttribute(avatar,"name","?"), GetStringAttribute(avatar,"gender","?"));
|
||||
|
||||
// Create the user identified by the avatar entry
|
||||
@@ -1982,7 +2004,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
account = CreateUser(scopeID, names[0], names[1], password, email);
|
||||
if (null == account)
|
||||
{
|
||||
m_log.ErrorFormat("[RADMIN] Avatar {0} {1} was not created", names[0], names[1]);
|
||||
m_log.ErrorFormat("[RADMIN]: Avatar {0} {1} was not created", names[0], names[1]);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -2000,12 +2022,12 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
|
||||
ID = account.PrincipalID;
|
||||
|
||||
m_log.DebugFormat("[RADMIN] User {0}[{1}] created or retrieved", name, ID);
|
||||
m_log.DebugFormat("[RADMIN]: User {0}[{1}] created or retrieved", name, ID);
|
||||
include = true;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.DebugFormat("[RADMIN] Error creating user {0} : {1}", name, e.Message);
|
||||
m_log.DebugFormat("[RADMIN]: Error creating user {0} : {1}", name, e.Message);
|
||||
include = false;
|
||||
}
|
||||
|
||||
@@ -2045,7 +2067,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
clothingFolder.ParentID = inventoryService.GetRootFolder(ID).ID;
|
||||
clothingFolder.Version = 1;
|
||||
inventoryService.AddFolder(clothingFolder); // store base record
|
||||
m_log.ErrorFormat("[RADMIN] Created clothing folder for {0}/{1}", name, ID);
|
||||
m_log.ErrorFormat("[RADMIN]: Created clothing folder for {0}/{1}", name, ID);
|
||||
}
|
||||
|
||||
// OK, now we have an inventory for the user, read in the outfits from the
|
||||
@@ -2058,7 +2080,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
|
||||
foreach (XmlElement outfit in outfits)
|
||||
{
|
||||
m_log.DebugFormat("[RADMIN] Loading outfit {0} for {1}",
|
||||
m_log.DebugFormat("[RADMIN]: Loading outfit {0} for {1}",
|
||||
GetStringAttribute(outfit,"name","?"), GetStringAttribute(avatar,"name","?"));
|
||||
|
||||
outfitName = GetStringAttribute(outfit,"name","");
|
||||
@@ -2082,7 +2104,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
// Otherwise, we must create the folder.
|
||||
if (extraFolder == null)
|
||||
{
|
||||
m_log.DebugFormat("[RADMIN] Creating outfit folder {0} for {1}", outfitName, name);
|
||||
m_log.DebugFormat("[RADMIN]: Creating outfit folder {0} for {1}", outfitName, name);
|
||||
extraFolder = new InventoryFolderBase();
|
||||
extraFolder.ID = UUID.Random();
|
||||
extraFolder.Name = outfitName;
|
||||
@@ -2091,7 +2113,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
extraFolder.Version = 1;
|
||||
extraFolder.ParentID = clothingFolder.ID;
|
||||
inventoryService.AddFolder(extraFolder);
|
||||
m_log.DebugFormat("[RADMIN] Adding outfile folder {0} to folder {1}", extraFolder.ID, clothingFolder.ID);
|
||||
m_log.DebugFormat("[RADMIN]: Adding outfile folder {0} to folder {1}", extraFolder.ID, clothingFolder.ID);
|
||||
}
|
||||
|
||||
// Now get the pieces that make up the outfit
|
||||
@@ -2106,7 +2128,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
switch (child.Name)
|
||||
{
|
||||
case "Permissions" :
|
||||
m_log.DebugFormat("[RADMIN] Permissions specified");
|
||||
m_log.DebugFormat("[RADMIN]: Permissions specified");
|
||||
perms = child;
|
||||
break;
|
||||
case "Asset" :
|
||||
@@ -2156,7 +2178,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
inventoryItem.Folder = extraFolder.ID; // Parent folder
|
||||
|
||||
m_application.SceneManager.CurrentOrFirstScene.AddInventoryItem(inventoryItem);
|
||||
m_log.DebugFormat("[RADMIN] Added item {0} to folder {1}", inventoryItem.ID, extraFolder.ID);
|
||||
m_log.DebugFormat("[RADMIN]: Added item {0} to folder {1}", inventoryItem.ID, extraFolder.ID);
|
||||
}
|
||||
|
||||
// Attach item, if attachpoint is specified
|
||||
@@ -2164,7 +2186,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
if (attachpoint != 0)
|
||||
{
|
||||
avatarAppearance.SetAttachment(attachpoint, inventoryItem.ID, inventoryItem.AssetID);
|
||||
m_log.DebugFormat("[RADMIN] Attached {0}", inventoryItem.ID);
|
||||
m_log.DebugFormat("[RADMIN]: Attached {0}", inventoryItem.ID);
|
||||
}
|
||||
|
||||
// Record whether or not the item is to be initially worn
|
||||
@@ -2177,32 +2199,32 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.WarnFormat("[RADMIN] Error wearing item {0} : {1}", inventoryItem.ID, e.Message);
|
||||
m_log.WarnFormat("[RADMIN]: Error wearing item {0} : {1}", inventoryItem.ID, e.Message);
|
||||
}
|
||||
} // foreach item in outfit
|
||||
m_log.DebugFormat("[RADMIN] Outfit {0} load completed", outfitName);
|
||||
m_log.DebugFormat("[RADMIN]: Outfit {0} load completed", outfitName);
|
||||
} // foreach outfit
|
||||
m_log.DebugFormat("[RADMIN] Inventory update complete for {0}", name);
|
||||
m_log.DebugFormat("[RADMIN]: Inventory update complete for {0}", name);
|
||||
scene.AvatarService.SetAppearance(ID, avatarAppearance);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.WarnFormat("[RADMIN] Inventory processing incomplete for user {0} : {1}",
|
||||
m_log.WarnFormat("[RADMIN]: Inventory processing incomplete for user {0} : {1}",
|
||||
name, e.Message);
|
||||
}
|
||||
} // End of include
|
||||
}
|
||||
m_log.DebugFormat("[RADMIN] Default avatar loading complete");
|
||||
m_log.DebugFormat("[RADMIN]: Default avatar loading complete");
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.DebugFormat("[RADMIN] No default avatar information available");
|
||||
m_log.DebugFormat("[RADMIN]: No default avatar information available");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.WarnFormat("[RADMIN] Exception whilst loading default avatars ; {0}", e.Message);
|
||||
m_log.WarnFormat("[RADMIN]: Exception whilst loading default avatars ; {0}", e.Message);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -2297,8 +2319,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.InfoFormat("[RADMIN] LoadOAR: {0}", e.Message);
|
||||
m_log.DebugFormat("[RADMIN] LoadOAR: {0}", e.ToString());
|
||||
m_log.ErrorFormat("[RADMIN]: LoadOAR: {0} {1}", e.Message, e.StackTrace);
|
||||
|
||||
responseData["loaded"] = false;
|
||||
responseData["error"] = e.Message;
|
||||
@@ -2403,8 +2424,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.InfoFormat("[RADMIN] SaveOAR: {0}", e.Message);
|
||||
m_log.DebugFormat("[RADMIN] SaveOAR: {0}", e.ToString());
|
||||
m_log.ErrorFormat("[RADMIN]: SaveOAR: {0} {1}", e.Message, e.StackTrace);
|
||||
|
||||
responseData["saved"] = false;
|
||||
responseData["error"] = e.Message;
|
||||
@@ -2418,7 +2438,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
|
||||
private void RemoteAdminOarSaveCompleted(Guid uuid, string name)
|
||||
{
|
||||
m_log.DebugFormat("[RADMIN] File processing complete for {0}", name);
|
||||
m_log.DebugFormat("[RADMIN]: File processing complete for {0}", name);
|
||||
lock (m_saveOarLock) Monitor.Pulse(m_saveOarLock);
|
||||
}
|
||||
|
||||
@@ -2456,14 +2476,14 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
UUID region_uuid = (UUID) (string) requestData["region_uuid"];
|
||||
if (!m_application.SceneManager.TrySetCurrentScene(region_uuid))
|
||||
throw new Exception(String.Format("failed to switch to region {0}", region_uuid.ToString()));
|
||||
m_log.InfoFormat("[RADMIN] Switched to region {0}", region_uuid.ToString());
|
||||
m_log.InfoFormat("[RADMIN]: Switched to region {0}", region_uuid.ToString());
|
||||
}
|
||||
else if (requestData.Contains("region_name"))
|
||||
{
|
||||
string region_name = (string) requestData["region_name"];
|
||||
if (!m_application.SceneManager.TrySetCurrentScene(region_name))
|
||||
throw new Exception(String.Format("failed to switch to region {0}", region_name));
|
||||
m_log.InfoFormat("[RADMIN] Switched to region {0}", region_name);
|
||||
m_log.InfoFormat("[RADMIN]: Switched to region {0}", region_name);
|
||||
}
|
||||
else throw new Exception("neither region_name nor region_uuid given");
|
||||
|
||||
@@ -2494,8 +2514,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.InfoFormat("[RADMIN] LoadXml: {0}", e.Message);
|
||||
m_log.DebugFormat("[RADMIN] LoadXml: {0}", e.ToString());
|
||||
m_log.ErrorFormat("[RADMIN] LoadXml: {0} {1}", e.Message, e.StackTrace);
|
||||
|
||||
responseData["loaded"] = false;
|
||||
responseData["switched"] = false;
|
||||
@@ -2541,14 +2560,14 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
UUID region_uuid = (UUID) (string) requestData["region_uuid"];
|
||||
if (!m_application.SceneManager.TrySetCurrentScene(region_uuid))
|
||||
throw new Exception(String.Format("failed to switch to region {0}", region_uuid.ToString()));
|
||||
m_log.InfoFormat("[RADMIN] Switched to region {0}", region_uuid.ToString());
|
||||
m_log.InfoFormat("[RADMIN]: Switched to region {0}", region_uuid.ToString());
|
||||
}
|
||||
else if (requestData.Contains("region_name"))
|
||||
{
|
||||
string region_name = (string) requestData["region_name"];
|
||||
if (!m_application.SceneManager.TrySetCurrentScene(region_name))
|
||||
throw new Exception(String.Format("failed to switch to region {0}", region_name));
|
||||
m_log.InfoFormat("[RADMIN] Switched to region {0}", region_name);
|
||||
m_log.InfoFormat("[RADMIN]: Switched to region {0}", region_name);
|
||||
}
|
||||
else throw new Exception("neither region_name nor region_uuid given");
|
||||
|
||||
@@ -2580,8 +2599,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.InfoFormat("[RADMIN] SaveXml: {0}", e.Message);
|
||||
m_log.DebugFormat("[RADMIN] SaveXml: {0}", e.ToString());
|
||||
m_log.ErrorFormat("[RADMIN]: SaveXml: {0} {1}", e.Message, e.StackTrace);
|
||||
|
||||
responseData["saved"] = false;
|
||||
responseData["switched"] = false;
|
||||
@@ -2620,14 +2638,14 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
UUID region_uuid = (UUID) (string) requestData["region_uuid"];
|
||||
if (!m_application.SceneManager.TrySetCurrentScene(region_uuid))
|
||||
throw new Exception(String.Format("failed to switch to region {0}", region_uuid.ToString()));
|
||||
m_log.InfoFormat("[RADMIN] Switched to region {0}", region_uuid.ToString());
|
||||
m_log.InfoFormat("[RADMIN]: Switched to region {0}", region_uuid.ToString());
|
||||
}
|
||||
else if (requestData.Contains("region_name"))
|
||||
{
|
||||
string region_name = (string) requestData["region_name"];
|
||||
if (!m_application.SceneManager.TrySetCurrentScene(region_name))
|
||||
throw new Exception(String.Format("failed to switch to region {0}", region_name));
|
||||
m_log.InfoFormat("[RADMIN] Switched to region {0}", region_name);
|
||||
m_log.InfoFormat("[RADMIN]: Switched to region {0}", region_name);
|
||||
}
|
||||
else throw new Exception("neither region_name nor region_uuid given");
|
||||
|
||||
@@ -2643,7 +2661,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.InfoFormat("[RADMIN] RegionQuery: {0}", e.Message);
|
||||
m_log.InfoFormat("[RADMIN]: RegionQuery: {0}", e.Message);
|
||||
|
||||
responseData["success"] = false;
|
||||
responseData["error"] = e.Message;
|
||||
@@ -2684,7 +2702,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.InfoFormat("[RADMIN] ConsoleCommand: {0}", e.Message);
|
||||
m_log.InfoFormat("[RADMIN]: ConsoleCommand: {0}", e.Message);
|
||||
|
||||
responseData["success"] = false;
|
||||
responseData["error"] = e.Message;
|
||||
@@ -2721,14 +2739,14 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
UUID region_uuid = (UUID) (string) requestData["region_uuid"];
|
||||
if (!m_application.SceneManager.TrySetCurrentScene(region_uuid))
|
||||
throw new Exception(String.Format("failed to switch to region {0}", region_uuid.ToString()));
|
||||
m_log.InfoFormat("[RADMIN] Switched to region {0}", region_uuid.ToString());
|
||||
m_log.InfoFormat("[RADMIN]: Switched to region {0}", region_uuid.ToString());
|
||||
}
|
||||
else if (requestData.Contains("region_name"))
|
||||
{
|
||||
string region_name = (string) requestData["region_name"];
|
||||
if (!m_application.SceneManager.TrySetCurrentScene(region_name))
|
||||
throw new Exception(String.Format("failed to switch to region {0}", region_name));
|
||||
m_log.InfoFormat("[RADMIN] Switched to region {0}", region_name);
|
||||
m_log.InfoFormat("[RADMIN]: Switched to region {0}", region_name);
|
||||
}
|
||||
else throw new Exception("neither region_name nor region_uuid given");
|
||||
|
||||
@@ -2739,7 +2757,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.InfoFormat("[RADMIN] Access List Clear Request: {0}", e.Message);
|
||||
m_log.ErrorFormat("[RADMIN]: Access List Clear Request: {0} {1}", e.Message, e.StackTrace);
|
||||
|
||||
responseData["success"] = false;
|
||||
responseData["error"] = e.Message;
|
||||
@@ -2778,14 +2796,14 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
UUID region_uuid = (UUID) (string) requestData["region_uuid"];
|
||||
if (!m_application.SceneManager.TrySetCurrentScene(region_uuid))
|
||||
throw new Exception(String.Format("failed to switch to region {0}", region_uuid.ToString()));
|
||||
m_log.InfoFormat("[RADMIN] Switched to region {0}", region_uuid.ToString());
|
||||
m_log.InfoFormat("[RADMIN]: Switched to region {0}", region_uuid.ToString());
|
||||
}
|
||||
else if (requestData.Contains("region_name"))
|
||||
{
|
||||
string region_name = (string) requestData["region_name"];
|
||||
if (!m_application.SceneManager.TrySetCurrentScene(region_name))
|
||||
throw new Exception(String.Format("failed to switch to region {0}", region_name));
|
||||
m_log.InfoFormat("[RADMIN] Switched to region {0}", region_name);
|
||||
m_log.InfoFormat("[RADMIN]: Switched to region {0}", region_name);
|
||||
}
|
||||
else throw new Exception("neither region_name nor region_uuid given");
|
||||
|
||||
@@ -2805,7 +2823,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
if (account != null)
|
||||
{
|
||||
uuids.Add(account.PrincipalID);
|
||||
m_log.DebugFormat("[RADMIN] adding \"{0}\" to ACL for \"{1}\"", name, scene.RegionInfo.RegionName);
|
||||
m_log.DebugFormat("[RADMIN]: adding \"{0}\" to ACL for \"{1}\"", name, scene.RegionInfo.RegionName);
|
||||
}
|
||||
}
|
||||
List<UUID> accessControlList = new List<UUID>(scene.RegionInfo.EstateSettings.EstateAccess);
|
||||
@@ -2826,7 +2844,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.InfoFormat("[RADMIN] Access List Add Request: {0}", e.Message);
|
||||
m_log.ErrorFormat("[RADMIN]: Access List Add Request: {0} {1}", e.Message, e.StackTrace);
|
||||
|
||||
responseData["success"] = false;
|
||||
responseData["error"] = e.Message;
|
||||
@@ -2865,14 +2883,14 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
UUID region_uuid = (UUID) (string) requestData["region_uuid"];
|
||||
if (!m_application.SceneManager.TrySetCurrentScene(region_uuid))
|
||||
throw new Exception(String.Format("failed to switch to region {0}", region_uuid.ToString()));
|
||||
m_log.InfoFormat("[RADMIN] Switched to region {0}", region_uuid.ToString());
|
||||
m_log.InfoFormat("[RADMIN]: Switched to region {0}", region_uuid.ToString());
|
||||
}
|
||||
else if (requestData.Contains("region_name"))
|
||||
{
|
||||
string region_name = (string) requestData["region_name"];
|
||||
if (!m_application.SceneManager.TrySetCurrentScene(region_name))
|
||||
throw new Exception(String.Format("failed to switch to region {0}", region_name));
|
||||
m_log.InfoFormat("[RADMIN] Switched to region {0}", region_name);
|
||||
m_log.InfoFormat("[RADMIN]: Switched to region {0}", region_name);
|
||||
}
|
||||
else throw new Exception("neither region_name nor region_uuid given");
|
||||
|
||||
@@ -2913,7 +2931,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.InfoFormat("[RADMIN] Access List Remove Request: {0}", e.Message);
|
||||
m_log.ErrorFormat("[RADMIN]: Access List Remove Request: {0} {1}", e.Message, e.StackTrace);
|
||||
|
||||
responseData["success"] = false;
|
||||
responseData["error"] = e.Message;
|
||||
@@ -2952,14 +2970,14 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
UUID region_uuid = (UUID) (string) requestData["region_uuid"];
|
||||
if (!m_application.SceneManager.TrySetCurrentScene(region_uuid))
|
||||
throw new Exception(String.Format("failed to switch to region {0}", region_uuid.ToString()));
|
||||
m_log.InfoFormat("[RADMIN] Switched to region {0}", region_uuid.ToString());
|
||||
m_log.InfoFormat("[RADMIN]: Switched to region {0}", region_uuid.ToString());
|
||||
}
|
||||
else if (requestData.Contains("region_name"))
|
||||
{
|
||||
string region_name = (string) requestData["region_name"];
|
||||
if (!m_application.SceneManager.TrySetCurrentScene(region_name))
|
||||
throw new Exception(String.Format("failed to switch to region {0}", region_name));
|
||||
m_log.InfoFormat("[RADMIN] Switched to region {0}", region_name);
|
||||
m_log.InfoFormat("[RADMIN]: Switched to region {0}", region_name);
|
||||
}
|
||||
else throw new Exception("neither region_name nor region_uuid given");
|
||||
|
||||
@@ -2981,7 +2999,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.InfoFormat("[RADMIN] Acces List List: {0}", e.Message);
|
||||
m_log.ErrorFormat("[RADMIN]: Access List List: {0} {1}", e.Message, e.StackTrace);
|
||||
|
||||
responseData["success"] = false;
|
||||
responseData["error"] = e.Message;
|
||||
|
||||
Reference in New Issue
Block a user