Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor
commit
4851706d35
|
@ -769,8 +769,15 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
|||
bool canEditObjectsChanged = ((rights ^ userFlags) & (int)FriendRights.CanModifyObjects) != 0;
|
||||
if (canEditObjectsChanged)
|
||||
friendClient.SendChangeUserRights(userID, friendID, rights);
|
||||
|
||||
}
|
||||
|
||||
// update local cache
|
||||
//m_Friends[friendID].Friends = m_FriendsService.GetFriends(friendID);
|
||||
foreach (FriendInfo finfo in m_Friends[friendID].Friends)
|
||||
if (finfo.Friend == userID.ToString())
|
||||
finfo.TheirFlags = rights;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -131,6 +131,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
|||
return ret;
|
||||
}
|
||||
|
||||
// DO NOT OVERRIDE THIS METHOD
|
||||
public virtual UUID DeleteToInventory(DeRezAction action, UUID folderID,
|
||||
SceneObjectGroup objectGroup, IClientAPI remoteClient)
|
||||
{
|
||||
|
|
|
@ -286,22 +286,14 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
|||
{
|
||||
// Deleting someone else's item
|
||||
//
|
||||
|
||||
|
||||
if (remoteClient == null ||
|
||||
objectGroup.OwnerID != remoteClient.AgentId)
|
||||
{
|
||||
// Folder skeleton may not be loaded and we
|
||||
// have to wait for the inventory to find
|
||||
// the destination folder
|
||||
//
|
||||
|
||||
folder = m_Scene.InventoryService.GetFolderForType(userID, AssetType.LostAndFoundFolder);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Assume inventory skeleton was loaded during login
|
||||
// and all folders can be found
|
||||
//
|
||||
folder = m_Scene.InventoryService.GetFolderForType(userID, AssetType.TrashFolder);
|
||||
}
|
||||
}
|
||||
|
@ -332,7 +324,6 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
|||
|
||||
if (folder == null) // None of the above
|
||||
{
|
||||
//folder = userInfo.RootFolder.FindFolder(folderID);
|
||||
folder = new InventoryFolderBase(folderID);
|
||||
|
||||
if (folder == null) // Nowhere to put it
|
||||
|
|
|
@ -96,7 +96,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Inventory
|
|||
|
||||
Object[] args = new Object[] { m_Config, MainServer.Instance, "HGInventoryService" };
|
||||
|
||||
ServerUtils.LoadPlugin<IServiceConnector>("OpenSim.Server.Handlers.dll:HGInventoryServiceInConnector", args);
|
||||
ServerUtils.LoadPlugin<IServiceConnector>("OpenSim.Server.Handlers.dll:XInventoryInConnector", args);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -134,7 +134,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
|||
|
||||
foreach (KeyValuePair<UUID, AssetType> kvp in m_uuids)
|
||||
{
|
||||
if (kvp.Key != UUID.Zero)
|
||||
m_assetService.Get(kvp.Key.ToString(), kvp.Value, PreAssetRequestCallback);
|
||||
}
|
||||
|
||||
|
@ -270,7 +269,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.ErrorFormat("[ARCHIVER]: AssetRequestCallback failed with {0}{1}", e.Message, e.StackTrace);
|
||||
m_log.ErrorFormat("[ARCHIVER]: AssetRequestCallback failed with {0}", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -286,8 +285,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
|||
catch (Exception e)
|
||||
{
|
||||
m_log.ErrorFormat(
|
||||
"[ARCHIVER]: Terminating archive creation since asset requester callback failed with {0}{1}",
|
||||
e.Message, e.StackTrace);
|
||||
"[ARCHIVER]: Terminating archive creation since asset requster callback failed with {0}", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1592,16 +1592,32 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
// So that we know the database is upto date,
|
||||
// for when deleting the object from it
|
||||
ForceSceneObjectBackup(grp);
|
||||
if (remoteClient != null)
|
||||
|
||||
if (remoteClient == null)
|
||||
{
|
||||
// Autoreturn has a null client. Nothing else does. So
|
||||
// allow only returns
|
||||
if (action != DeRezAction.Return)
|
||||
return;
|
||||
|
||||
permissionToTakeCopy = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (action == DeRezAction.TakeCopy)
|
||||
{
|
||||
if (!Permissions.CanTakeCopyObject(grp.UUID, remoteClient.AgentId))
|
||||
permissionToTakeCopy = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
permissionToTakeCopy = false;
|
||||
}
|
||||
if (!Permissions.CanTakeObject(grp.UUID, remoteClient.AgentId))
|
||||
permissionToTake = false;
|
||||
|
||||
if (!Permissions.CanDeleteObject(grp.UUID, remoteClient.AgentId))
|
||||
permissionToDelete = false;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -9829,19 +9829,39 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
public LSL_String llXorBase64StringsCorrect(string str1, string str2)
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
string ret = String.Empty;
|
||||
string src1 = llBase64ToString(str1);
|
||||
string src2 = llBase64ToString(str2);
|
||||
int c = 0;
|
||||
for (int i = 0; i < src1.Length; i++)
|
||||
{
|
||||
ret += (char) (src1[i] ^ src2[c]);
|
||||
|
||||
c++;
|
||||
if (c >= src2.Length)
|
||||
c = 0;
|
||||
if (str1 == String.Empty)
|
||||
return String.Empty;
|
||||
if (str2 == String.Empty)
|
||||
return str1;
|
||||
|
||||
byte[] data1 = Convert.FromBase64String(str1);
|
||||
byte[] data2 = Convert.FromBase64String(str2);
|
||||
|
||||
byte[] d2 = new Byte[data1.Length];
|
||||
int pos = 0;
|
||||
|
||||
if (data1.Length <= data2.Length)
|
||||
{
|
||||
Array.Copy(data2, 0, d2, 0, data1.Length);
|
||||
}
|
||||
return llStringToBase64(ret);
|
||||
else
|
||||
{
|
||||
while (pos < data1.Length)
|
||||
{
|
||||
int len = data1.Length - pos;
|
||||
if (len > data2.Length)
|
||||
len = data2.Length;
|
||||
|
||||
Array.Copy(data2, 0, d2, pos, len);
|
||||
pos += len;
|
||||
}
|
||||
}
|
||||
|
||||
for (pos = 0 ; pos < data1.Length ; pos++ )
|
||||
data1[pos] ^= d2[pos];
|
||||
|
||||
return Convert.ToBase64String(data1);
|
||||
}
|
||||
|
||||
public LSL_String llHTTPRequest(string url, LSL_List parameters, string body)
|
||||
|
|
|
@ -556,6 +556,11 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
|||
|
||||
if (stateSource == (int)StateSource.ScriptedRez)
|
||||
{
|
||||
lock (m_CompileDict)
|
||||
{
|
||||
m_CompileDict[itemID] = 0;
|
||||
}
|
||||
|
||||
DoOnRezScript(parms);
|
||||
}
|
||||
else
|
||||
|
@ -1356,9 +1361,23 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
|||
string xml = instance.GetXMLState();
|
||||
|
||||
XmlDocument sdoc = new XmlDocument();
|
||||
bool loadedState = true;
|
||||
try
|
||||
{
|
||||
sdoc.LoadXml(xml);
|
||||
XmlNodeList rootL = sdoc.GetElementsByTagName("ScriptState");
|
||||
XmlNode rootNode = rootL[0];
|
||||
}
|
||||
catch (System.Xml.XmlException e)
|
||||
{
|
||||
loadedState = false;
|
||||
}
|
||||
|
||||
XmlNodeList rootL = null;
|
||||
XmlNode rootNode = null;
|
||||
if (loadedState)
|
||||
{
|
||||
rootL = sdoc.GetElementsByTagName("ScriptState");
|
||||
rootNode = rootL[0];
|
||||
}
|
||||
|
||||
// Create <State UUID="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx">
|
||||
XmlDocument doc = new XmlDocument();
|
||||
|
@ -1374,8 +1393,18 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
|||
stateData.Attributes.Append(engineName);
|
||||
doc.AppendChild(stateData);
|
||||
|
||||
XmlNode xmlstate = null;
|
||||
|
||||
// Add <ScriptState>...</ScriptState>
|
||||
XmlNode xmlstate = doc.ImportNode(rootNode, true);
|
||||
if (loadedState)
|
||||
{
|
||||
xmlstate = doc.ImportNode(rootNode, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
xmlstate = doc.CreateElement("", "ScriptState", "");
|
||||
}
|
||||
|
||||
stateData.AppendChild(xmlstate);
|
||||
|
||||
string assemName = instance.GetAssemblyName();
|
||||
|
|
|
@ -230,6 +230,12 @@ namespace OpenSim.Server.Base
|
|||
"shutdown",
|
||||
"Quit the application", HandleQuit);
|
||||
|
||||
// Register a command to read other commands from a file
|
||||
MainConsole.Instance.Commands.AddCommand("base", false, "command-script",
|
||||
"command-script <script>",
|
||||
"Run a command script from file", HandleScript);
|
||||
|
||||
|
||||
// Allow derived classes to perform initialization that
|
||||
// needs to be done after the console has opened
|
||||
//
|
||||
|
@ -259,6 +265,41 @@ namespace OpenSim.Server.Base
|
|||
m_log.Info("[CONSOLE] Quitting");
|
||||
}
|
||||
|
||||
protected virtual void HandleScript(string module, string[] parms)
|
||||
{
|
||||
if (parms.Length != 2)
|
||||
{
|
||||
return;
|
||||
}
|
||||
RunCommandScript(parms[1]);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Run an optional startup list of commands
|
||||
/// </summary>
|
||||
/// <param name="fileName"></param>
|
||||
private void RunCommandScript(string fileName)
|
||||
{
|
||||
if (File.Exists(fileName))
|
||||
{
|
||||
m_log.Info("[COMMANDFILE]: Running " + fileName);
|
||||
|
||||
using (StreamReader readFile = File.OpenText(fileName))
|
||||
{
|
||||
string currentCommand;
|
||||
while ((currentCommand = readFile.ReadLine()) != null)
|
||||
{
|
||||
if (currentCommand != String.Empty)
|
||||
{
|
||||
m_log.Info("[COMMANDFILE]: Running '" + currentCommand + "'");
|
||||
MainConsole.Instance.RunCommand(currentCommand);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected virtual void ReadConfig()
|
||||
{
|
||||
}
|
||||
|
|
|
@ -44,6 +44,8 @@ namespace OpenSim.Server.Handlers.Asset
|
|||
{
|
||||
public class XInventoryInConnector : ServiceConnector
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private IInventoryService m_InventoryService;
|
||||
private string m_ConfigName = "InventoryService";
|
||||
|
||||
|
@ -53,6 +55,8 @@ namespace OpenSim.Server.Handlers.Asset
|
|||
if (configName != String.Empty)
|
||||
m_ConfigName = configName;
|
||||
|
||||
m_log.DebugFormat("[XInventoryInConnector]: Starting with config name {0}", m_ConfigName);
|
||||
|
||||
IConfig serverConfig = config.Configs[m_ConfigName];
|
||||
if (serverConfig == null)
|
||||
throw new Exception(String.Format("No section '{0}' in config file", m_ConfigName));
|
||||
|
|
|
@ -277,7 +277,7 @@ namespace OpenSim.Server.Handlers.Simulation
|
|||
//responsedata["str_response_string"] = OSDParser.SerializeJsonString(resp); ??? instead
|
||||
}
|
||||
|
||||
// subclasses cab override this
|
||||
// subclasses can override this
|
||||
protected virtual bool UpdateAgent(GridRegion destination, AgentData agent)
|
||||
{
|
||||
return m_SimulationService.UpdateAgent(destination, agent);
|
||||
|
@ -285,6 +285,16 @@ namespace OpenSim.Server.Handlers.Simulation
|
|||
|
||||
protected virtual void DoAgentGet(Hashtable request, Hashtable responsedata, UUID id, UUID regionID)
|
||||
{
|
||||
if (m_SimulationService == null)
|
||||
{
|
||||
m_log.Debug("[AGENT HANDLER]: Agent GET called. Harmless but useless.");
|
||||
responsedata["content_type"] = "application/json";
|
||||
responsedata["int_response_code"] = HttpStatusCode.NotImplemented;
|
||||
responsedata["str_response_string"] = string.Empty;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
GridRegion destination = new GridRegion();
|
||||
destination.RegionID = regionID;
|
||||
|
||||
|
|
|
@ -371,7 +371,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
|||
/// <returns></returns>
|
||||
public bool Delete(string id)
|
||||
{
|
||||
string errorMessage = String.Empty;
|
||||
//string errorMessage = String.Empty;
|
||||
string url = m_serverUrl + id;
|
||||
|
||||
if (m_cache != null)
|
||||
|
|
|
@ -255,7 +255,11 @@ namespace OpenSim.Services.GridService
|
|||
{
|
||||
m_log.WarnFormat("[HYPERGRID LINKER]: Remote Gatekeeper at {0} provided malformed ExternalName {1}", regInfo.ExternalHostName, externalName);
|
||||
}
|
||||
regInfo.RegionName = regInfo.ExternalHostName + ":" + regInfo.HttpPort + ":" + regInfo.RegionName;
|
||||
string name = regInfo.RegionName;
|
||||
regInfo.RegionName = regInfo.ExternalHostName + ":" + regInfo.HttpPort;
|
||||
if (name != string.Empty)
|
||||
regInfo.RegionName += ":" + name;
|
||||
|
||||
// Try get the map image
|
||||
//regInfo.TerrainImage = m_GatekeeperConnector.GetMapImage(regionID, imageURL);
|
||||
// I need a texture that works for this... the one I tried doesn't seem to be working
|
||||
|
|
|
@ -108,13 +108,13 @@ namespace OpenSim.Services.InventoryService
|
|||
// Warp! Root folder for travelers
|
||||
XInventoryFolder[] folders = m_Database.GetFolders(
|
||||
new string[] { "agentID", "folderName"},
|
||||
new string[] { principalID.ToString(), "Suitcase" });
|
||||
new string[] { principalID.ToString(), "My Suitcase" });
|
||||
|
||||
if (folders.Length > 0)
|
||||
return ConvertToOpenSim(folders[0]);
|
||||
|
||||
// make one
|
||||
XInventoryFolder suitcase = CreateFolder(principalID, UUID.Zero, (int)AssetType.Folder, "Suitcase");
|
||||
XInventoryFolder suitcase = CreateFolder(principalID, UUID.Zero, (int)AssetType.Folder, "My Suitcase");
|
||||
return ConvertToOpenSim(suitcase);
|
||||
}
|
||||
|
||||
|
|
|
@ -200,7 +200,14 @@ namespace OpenSim.Services.InventoryService
|
|||
if (folders.Length == 0)
|
||||
return null;
|
||||
|
||||
return ConvertToOpenSim(folders[0]);
|
||||
XInventoryFolder root = null;
|
||||
foreach (XInventoryFolder folder in folders)
|
||||
if (folder.folderName == "My Inventory")
|
||||
root = folder;
|
||||
if (folders == null) // oops
|
||||
root = folders[0];
|
||||
|
||||
return ConvertToOpenSim(root);
|
||||
}
|
||||
|
||||
public virtual InventoryFolderBase GetFolderForType(UUID principalID, AssetType type)
|
||||
|
|
|
@ -36,9 +36,9 @@
|
|||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\bin\log4net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="OpenSim.Server, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<Reference Include="Robust, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\bin\OpenSim.Server.exe</HintPath>
|
||||
<HintPath>..\..\..\bin\Robust.exe</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core">
|
||||
|
|
Binary file not shown.
|
@ -198,6 +198,10 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003
|
|||
; CHANGE THIS
|
||||
ExternalName = "http://127.0.0.1:8002"
|
||||
|
||||
; Does this grid allow incoming links to any region in it?
|
||||
; If false, HG TPs happen only to the Default regions specified in [GridService] section
|
||||
AllowTeleportsToAnyRegion = true
|
||||
|
||||
[UserAgentService]
|
||||
LocalServiceModule = "OpenSim.Services.HypergridService.dll:UserAgentService"
|
||||
;; for the service
|
||||
|
|
|
@ -68,3 +68,8 @@
|
|||
|
||||
[GatekeeperService]
|
||||
ExternalName = "http://127.0.0.1:9000"
|
||||
|
||||
; Does this grid allow incoming links to any region in it?
|
||||
; If false, HG TPs happen only to the Default regions specified in [GridService] section
|
||||
AllowTeleportsToAnyRegion = true
|
||||
|
||||
|
|
Loading…
Reference in New Issue