Compare commits
19 Commits
master
...
0.6.5-post
Author | SHA1 | Date |
---|---|---|
Melanie Thielker | f6ba67f1a3 | |
Melanie Thielker | 06b16c5b3a | |
Melanie Thielker | 6de971a570 | |
Melanie Thielker | e01270036a | |
Melanie Thielker | 501df1ce2b | |
Melanie Thielker | 3769785d3c | |
Melanie Thielker | 30a76861d4 | |
Melanie Thielker | 7375f3c273 | |
Melanie Thielker | 2f581c0d0d | |
Melanie Thielker | f8666f3630 | |
Melanie Thielker | 2587170445 | |
Melanie Thielker | be2ed074fa | |
Adam Frisby | b74cd49f7c | |
lbsa71 | 4b0e34155d | |
Melanie Thielker | 5f4dc6fe61 | |
lbsa71 | c4e4cd5931 | |
lbsa71 | 89e7dac649 | |
lbsa71 | d217f1e9e7 | |
lbsa71 | 319ad737bc |
|
@ -60,7 +60,7 @@ using System.Runtime.InteropServices;
|
||||||
//
|
//
|
||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("0.6.4.*")]
|
// [assembly: AssemblyVersion("0.6.5.*")]
|
||||||
|
|
||||||
[assembly : AssemblyVersion("0.6.4.*")]
|
[assembly : AssemblyVersion("0.6.5.*")]
|
||||||
[assembly : AssemblyFileVersion("1.0.0.0")]
|
[assembly : AssemblyFileVersion("0.6.5.0")]
|
|
@ -30,6 +30,6 @@ using System.Runtime.InteropServices;
|
||||||
//
|
//
|
||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("0.6.4.*")]
|
// [assembly: AssemblyVersion("0.6.5.*")]
|
||||||
[assembly: AssemblyVersion("0.6.4.*")]
|
[assembly: AssemblyVersion("0.6.5.*")]
|
||||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
[assembly: AssemblyFileVersion("0.6.5.0")]
|
||||||
|
|
|
@ -38,7 +38,7 @@ namespace OpenSim.Data.MSSQL
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A MSSQL Interface for the Asset server
|
/// A MSSQL Interface for the Asset server
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal class MSSQLAssetData : AssetDataBase
|
public class MSSQLAssetData : AssetDataBase
|
||||||
{
|
{
|
||||||
private const string _migrationStore = "AssetStore";
|
private const string _migrationStore = "AssetStore";
|
||||||
|
|
||||||
|
|
|
@ -108,7 +108,7 @@ namespace OpenSim.Data.MSSQL
|
||||||
{
|
{
|
||||||
cmd.Parameters.Add(_Database.CreateParameter("@RegionID", regionID));
|
cmd.Parameters.Add(_Database.CreateParameter("@RegionID", regionID));
|
||||||
|
|
||||||
using (IDataReader reader = cmd.ExecuteReader())
|
using (SqlDataReader reader = cmd.ExecuteReader())
|
||||||
{
|
{
|
||||||
if (reader.Read())
|
if (reader.Read())
|
||||||
{
|
{
|
||||||
|
@ -124,16 +124,11 @@ namespace OpenSim.Data.MSSQL
|
||||||
}
|
}
|
||||||
else if (_FieldMap[name].GetValue(es) is UUID)
|
else if (_FieldMap[name].GetValue(es) is UUID)
|
||||||
{
|
{
|
||||||
// UUID uuid;
|
|
||||||
// UUID.TryParse(reader[name].ToString(), out uuid);
|
|
||||||
|
|
||||||
_FieldMap[name].SetValue(es, new UUID((Guid) reader[name])); // uuid);
|
_FieldMap[name].SetValue(es, new UUID((Guid) reader[name])); // uuid);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
es.EstateID = Convert.ToUInt32(reader["EstateID"].ToString());
|
es.EstateID = Convert.ToUInt32(reader["EstateID"].ToString());
|
||||||
//Problems converting a Int32 to a UInt32
|
|
||||||
//_FieldMap[name].SetValue(es, reader["EstateID"]);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -153,7 +148,6 @@ namespace OpenSim.Data.MSSQL
|
||||||
|
|
||||||
sql = string.Format("insert into estate_settings ({0}) values ( @{1})", String.Join(",", names.ToArray()), String.Join(", @", names.ToArray()));
|
sql = string.Format("insert into estate_settings ({0}) values ( @{1})", String.Join(",", names.ToArray()), String.Join(", @", names.ToArray()));
|
||||||
|
|
||||||
//_Log.Debug("[DB ESTATE]: SQL: " + sql);
|
|
||||||
using (SqlConnection connection = _Database.DatabaseConnection())
|
using (SqlConnection connection = _Database.DatabaseConnection())
|
||||||
{
|
{
|
||||||
using (SqlCommand insertCommand = connection.CreateCommand())
|
using (SqlCommand insertCommand = connection.CreateCommand())
|
||||||
|
@ -163,28 +157,8 @@ namespace OpenSim.Data.MSSQL
|
||||||
foreach (string name in names)
|
foreach (string name in names)
|
||||||
{
|
{
|
||||||
insertCommand.Parameters.Add(_Database.CreateParameter("@" + name, _FieldMap[name].GetValue(es)));
|
insertCommand.Parameters.Add(_Database.CreateParameter("@" + name, _FieldMap[name].GetValue(es)));
|
||||||
// if (_FieldMap[name].GetValue(es) is bool)
|
|
||||||
// {
|
|
||||||
// SqlParameter tempBool = new SqlParameter("@" + name, SqlDbType.Bit);
|
|
||||||
//
|
|
||||||
// if ((bool) _FieldMap[name].GetValue(es))
|
|
||||||
// tempBool.Value = 1;
|
|
||||||
// else
|
|
||||||
// tempBool.Value = 0;
|
|
||||||
//
|
|
||||||
// insertCommand.Parameters.Add(tempBool);
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// //cmd.Parameters.AddWithValue("@" + name, _FieldMap[name].GetValue(es));
|
|
||||||
// SqlParameter tempPar = new SqlParameter("@" + name,
|
|
||||||
// _Database.DbtypeFromType(_FieldMap[name].FieldType));
|
|
||||||
// tempPar.Value = _FieldMap[name].GetValue(es).ToString();
|
|
||||||
//
|
|
||||||
// insertCommand.Parameters.Add(tempPar);
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
// insertCommand.Parameters.Add(_Database.CreateParameter("@ID", es.EstateID, true));
|
|
||||||
SqlParameter idParameter = new SqlParameter("@ID", SqlDbType.Int);
|
SqlParameter idParameter = new SqlParameter("@ID", SqlDbType.Int);
|
||||||
idParameter.Direction = ParameterDirection.Output;
|
idParameter.Direction = ParameterDirection.Output;
|
||||||
insertCommand.Parameters.Add(idParameter);
|
insertCommand.Parameters.Add(idParameter);
|
||||||
|
@ -211,7 +185,6 @@ namespace OpenSim.Data.MSSQL
|
||||||
}
|
}
|
||||||
|
|
||||||
// Munge and transfer the ban list
|
// Munge and transfer the ban list
|
||||||
//
|
|
||||||
|
|
||||||
sql = string.Format("insert into estateban select {0}, bannedUUID, bannedIp, bannedIpHostMask, '' from regionban where regionban.regionUUID = @UUID", es.EstateID);
|
sql = string.Format("insert into estateban select {0}, bannedUUID, bannedIp, bannedIpHostMask, '' from regionban where regionban.regionUUID = @UUID", es.EstateID);
|
||||||
using (AutoClosingSqlCommand cmd = _Database.Query(sql))
|
using (AutoClosingSqlCommand cmd = _Database.Query(sql))
|
||||||
|
@ -253,7 +226,7 @@ namespace OpenSim.Data.MSSQL
|
||||||
|
|
||||||
names.Remove("EstateID");
|
names.Remove("EstateID");
|
||||||
|
|
||||||
string sql = string.Format("UPDATE estate_settings SET ") ; // ({0}) values ( @{1}) WHERE EstateID = @EstateID", String.Join(",", names.ToArray()), String.Join(", @", names.ToArray()));
|
string sql = string.Format("UPDATE estate_settings SET ") ;
|
||||||
foreach (string name in names)
|
foreach (string name in names)
|
||||||
{
|
{
|
||||||
sql += name + " = @" + name + ", ";
|
sql += name + " = @" + name + ", ";
|
||||||
|
@ -266,33 +239,8 @@ namespace OpenSim.Data.MSSQL
|
||||||
foreach (string name in names)
|
foreach (string name in names)
|
||||||
{
|
{
|
||||||
cmd.Parameters.Add(_Database.CreateParameter("@" + name, _FieldMap[name].GetValue(es)));
|
cmd.Parameters.Add(_Database.CreateParameter("@" + name, _FieldMap[name].GetValue(es)));
|
||||||
// if (_FieldMap[name].GetValue(es) is bool)
|
|
||||||
// {
|
|
||||||
// SqlParameter tempBool = new SqlParameter("@" + name, SqlDbType.Bit);
|
|
||||||
//
|
|
||||||
// if ((bool)_FieldMap[name].GetValue(es))
|
|
||||||
// tempBool.Value = 1;
|
|
||||||
// else
|
|
||||||
// tempBool.Value = 0;
|
|
||||||
//
|
|
||||||
// cmd.Parameters.Add(tempBool);
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// //cmd.Parameters.AddWithValue("@" + name, _FieldMap[name].GetValue(es));
|
|
||||||
// SqlParameter tempPar = new SqlParameter("@" + name,
|
|
||||||
// _Database.DbtypeFromType(_FieldMap[name].FieldType));
|
|
||||||
// tempPar.Value = _FieldMap[name].GetValue(es).ToString();
|
|
||||||
//
|
|
||||||
// cmd.Parameters.Add(tempPar);
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd.Parameters.Add(_Database.CreateParameter("@EstateID", es.EstateID));
|
cmd.Parameters.Add(_Database.CreateParameter("@EstateID", es.EstateID));
|
||||||
// SqlParameter idParameter = new SqlParameter("@EstateID", SqlDbType.Int);
|
|
||||||
// idParameter.Value = es.EstateID;
|
|
||||||
// cmd.Parameters.Add(idParameter);
|
|
||||||
|
|
||||||
cmd.ExecuteNonQuery();
|
cmd.ExecuteNonQuery();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -577,7 +577,6 @@ namespace OpenSim.Data.MSSQL
|
||||||
/// <param name="appearance">the appearence</param>
|
/// <param name="appearance">the appearence</param>
|
||||||
override public void UpdateUserAppearance(UUID user, AvatarAppearance appearance)
|
override public void UpdateUserAppearance(UUID user, AvatarAppearance appearance)
|
||||||
{
|
{
|
||||||
m_log.Error("[USER DB] updating user appearance for user ID " + user.Guid);
|
|
||||||
string sql = String.Empty;
|
string sql = String.Empty;
|
||||||
sql += "DELETE FROM avatarappearance WHERE owner=@owner ";
|
sql += "DELETE FROM avatarappearance WHERE owner=@owner ";
|
||||||
sql += "INSERT INTO avatarappearance ";
|
sql += "INSERT INTO avatarappearance ";
|
||||||
|
@ -1113,6 +1112,10 @@ ELSE
|
||||||
retval.ID = new UUID((Guid)reader["UUID"]);
|
retval.ID = new UUID((Guid)reader["UUID"]);
|
||||||
retval.FirstName = (string)reader["username"];
|
retval.FirstName = (string)reader["username"];
|
||||||
retval.SurName = (string)reader["lastname"];
|
retval.SurName = (string)reader["lastname"];
|
||||||
|
if (reader.IsDBNull(reader.GetOrdinal("email")))
|
||||||
|
retval.Email = "";
|
||||||
|
else
|
||||||
|
retval.Email = (string)reader["email"];
|
||||||
|
|
||||||
retval.PasswordHash = (string)reader["passwordHash"];
|
retval.PasswordHash = (string)reader["passwordHash"];
|
||||||
retval.PasswordSalt = (string)reader["passwordSalt"];
|
retval.PasswordSalt = (string)reader["passwordSalt"];
|
||||||
|
@ -1127,6 +1130,11 @@ ELSE
|
||||||
Convert.ToSingle(reader["homeLookAtY"].ToString()),
|
Convert.ToSingle(reader["homeLookAtY"].ToString()),
|
||||||
Convert.ToSingle(reader["homeLookAtZ"].ToString()));
|
Convert.ToSingle(reader["homeLookAtZ"].ToString()));
|
||||||
|
|
||||||
|
if (reader.IsDBNull(reader.GetOrdinal("homeRegionID")))
|
||||||
|
retval.HomeRegionID = UUID.Zero;
|
||||||
|
else
|
||||||
|
retval.HomeRegionID = new UUID((Guid)reader["homeRegionID"]);
|
||||||
|
|
||||||
retval.Created = Convert.ToInt32(reader["created"].ToString());
|
retval.Created = Convert.ToInt32(reader["created"].ToString());
|
||||||
retval.LastLogin = Convert.ToInt32(reader["lastLogin"].ToString());
|
retval.LastLogin = Convert.ToInt32(reader["lastLogin"].ToString());
|
||||||
|
|
||||||
|
@ -1136,12 +1144,42 @@ ELSE
|
||||||
retval.CanDoMask = Convert.ToUInt32(reader["profileCanDoMask"].ToString());
|
retval.CanDoMask = Convert.ToUInt32(reader["profileCanDoMask"].ToString());
|
||||||
retval.WantDoMask = Convert.ToUInt32(reader["profileWantDoMask"].ToString());
|
retval.WantDoMask = Convert.ToUInt32(reader["profileWantDoMask"].ToString());
|
||||||
|
|
||||||
|
if (reader.IsDBNull(reader.GetOrdinal("profileAboutText")))
|
||||||
|
retval.AboutText = "";
|
||||||
|
else
|
||||||
retval.AboutText = (string)reader["profileAboutText"];
|
retval.AboutText = (string)reader["profileAboutText"];
|
||||||
|
|
||||||
|
if (reader.IsDBNull(reader.GetOrdinal("profileFirstText")))
|
||||||
|
retval.FirstLifeAboutText = "";
|
||||||
|
else
|
||||||
retval.FirstLifeAboutText = (string)reader["profileFirstText"];
|
retval.FirstLifeAboutText = (string)reader["profileFirstText"];
|
||||||
|
|
||||||
|
if (reader.IsDBNull(reader.GetOrdinal("profileImage")))
|
||||||
|
retval.Image = UUID.Zero;
|
||||||
|
else
|
||||||
retval.Image = new UUID((Guid)reader["profileImage"]);
|
retval.Image = new UUID((Guid)reader["profileImage"]);
|
||||||
|
|
||||||
|
if (reader.IsDBNull(reader.GetOrdinal("profileFirstImage")))
|
||||||
|
retval.Image = UUID.Zero;
|
||||||
|
else
|
||||||
retval.FirstLifeImage = new UUID((Guid)reader["profileFirstImage"]);
|
retval.FirstLifeImage = new UUID((Guid)reader["profileFirstImage"]);
|
||||||
|
|
||||||
|
if (reader.IsDBNull(reader.GetOrdinal("webLoginKey")))
|
||||||
|
retval.WebLoginKey = UUID.Zero;
|
||||||
|
else
|
||||||
retval.WebLoginKey = new UUID((Guid)reader["webLoginKey"]);
|
retval.WebLoginKey = new UUID((Guid)reader["webLoginKey"]);
|
||||||
|
|
||||||
|
retval.UserFlags = Convert.ToInt32(reader["userFlags"].ToString());
|
||||||
|
retval.GodLevel = Convert.ToInt32(reader["godLevel"].ToString());
|
||||||
|
if (reader.IsDBNull(reader.GetOrdinal("customType")))
|
||||||
|
retval.CustomType = "";
|
||||||
|
else
|
||||||
|
retval.CustomType = reader["customType"].ToString();
|
||||||
|
|
||||||
|
if (reader.IsDBNull(reader.GetOrdinal("partner")))
|
||||||
|
retval.Partner = UUID.Zero;
|
||||||
|
else
|
||||||
|
retval.Partner = new UUID((Guid)reader["partner"]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -61,5 +61,5 @@ using System.Runtime.InteropServices;
|
||||||
// You can specify all the values or you can default the Revision and Build Numbers
|
// You can specify all the values or you can default the Revision and Build Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
|
|
||||||
[assembly : AssemblyVersion("0.6.4.*")]
|
[assembly : AssemblyVersion("0.6.5.*")]
|
||||||
[assembly : AssemblyFileVersion("1.0.0.0")]
|
[assembly : AssemblyFileVersion("0.6.5.0")]
|
||||||
|
|
|
@ -61,5 +61,5 @@ using System.Runtime.InteropServices;
|
||||||
// You can specify all the values or you can default the Revision and Build Numbers
|
// You can specify all the values or you can default the Revision and Build Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
|
|
||||||
[assembly : AssemblyVersion("0.6.4.*")]
|
[assembly : AssemblyVersion("0.6.5.*")]
|
||||||
[assembly : AssemblyFileVersion("1.0.0.0")]
|
[assembly : AssemblyFileVersion("0.6.5.0")]
|
||||||
|
|
|
@ -61,5 +61,5 @@ using System.Runtime.InteropServices;
|
||||||
// You can specify all the values or you can default the Revision and Build Numbers
|
// You can specify all the values or you can default the Revision and Build Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
|
|
||||||
[assembly : AssemblyVersion("0.6.4.*")]
|
[assembly : AssemblyVersion("0.6.5.*")]
|
||||||
[assembly : AssemblyFileVersion("1.0.0.0")]
|
[assembly : AssemblyFileVersion("0.6.5.0")]
|
||||||
|
|
|
@ -61,5 +61,5 @@ using System.Runtime.InteropServices;
|
||||||
// You can specify all the values or you can default the Revision and Build Numbers
|
// You can specify all the values or you can default the Revision and Build Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
|
|
||||||
[assembly : AssemblyVersion("0.6.4.*")]
|
[assembly : AssemblyVersion("0.6.5.*")]
|
||||||
[assembly : AssemblyFileVersion("1.0.0.0")]
|
[assembly : AssemblyFileVersion("0.6.5.0")]
|
||||||
|
|
|
@ -61,5 +61,5 @@ using System.Runtime.InteropServices;
|
||||||
// You can specify all the values or you can default the Revision and Build Numbers
|
// You can specify all the values or you can default the Revision and Build Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
|
|
||||||
[assembly : AssemblyVersion("0.6.4.*")]
|
[assembly : AssemblyVersion("0.6.5.*")]
|
||||||
[assembly : AssemblyFileVersion("1.0.0.0")]
|
[assembly : AssemblyFileVersion("0.6.5.0")]
|
||||||
|
|
|
@ -59,5 +59,5 @@ using System.Runtime.InteropServices;
|
||||||
// Revision
|
// Revision
|
||||||
//
|
//
|
||||||
|
|
||||||
[assembly : AssemblyVersion("0.6.4.*")]
|
[assembly : AssemblyVersion("0.6.5.*")]
|
||||||
[assembly : AssemblyFileVersion("1.0.0.0")]
|
[assembly : AssemblyFileVersion("0.6.5.0")]
|
|
@ -61,5 +61,5 @@ using System.Runtime.InteropServices;
|
||||||
// You can specify all the values or you can default the Revision and Build Numbers
|
// You can specify all the values or you can default the Revision and Build Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
|
|
||||||
[assembly : AssemblyVersion("0.6.4.*")]
|
[assembly : AssemblyVersion("0.6.5.*")]
|
||||||
[assembly : AssemblyFileVersion("1.0.0.0")]
|
[assembly : AssemblyFileVersion("0.6.5.0")]
|
||||||
|
|
|
@ -55,4 +55,4 @@ using System.Runtime.InteropServices;
|
||||||
// You can specify all values by your own or you can build default build and revision
|
// You can specify all values by your own or you can build default build and revision
|
||||||
// numbers with the '*' character (the default):
|
// numbers with the '*' character (the default):
|
||||||
|
|
||||||
[assembly : AssemblyVersion("0.6.4.*")]
|
[assembly : AssemblyVersion("0.6.5.*")]
|
||||||
|
|
|
@ -84,26 +84,38 @@ namespace OpenSim.Framework
|
||||||
m_creatorId = value;
|
m_creatorId = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
protected string m_creatorId;
|
||||||
|
|
||||||
protected string m_creatorId = UUID.Zero.ToString();
|
|
||||||
/// <value>
|
/// <value>
|
||||||
/// The creator of this item expressed as a UUID. Database plugins don't need to set this, it will be set by
|
/// The UUID for the creator. This may be different from the canonical CreatorId. This property is used
|
||||||
|
/// for communication with the client over the Second Life protocol, since that protocol can only understand
|
||||||
|
/// UUIDs. As this is a basic framework class, this means that both the string creator id and the uuid
|
||||||
|
/// reference have to be settable separately
|
||||||
|
///
|
||||||
|
/// Database plugins don't need to set this, it will be set by
|
||||||
/// upstream code (or set by the get accessor if left unset).
|
/// upstream code (or set by the get accessor if left unset).
|
||||||
|
///
|
||||||
|
/// XXX: An alternative to having a separate uuid property would be to hash the CreatorId appropriately
|
||||||
|
/// every time there was communication with a UUID-only client. This may be much more expensive.
|
||||||
/// </value>
|
/// </value>
|
||||||
public UUID CreatorIdAsUuid
|
public UUID CreatorIdAsUuid
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
UUID temp = UUID.Zero;
|
if (UUID.Zero == m_creatorIdAsUuid)
|
||||||
UUID.TryParse(CreatorId, out temp);
|
{
|
||||||
return temp;
|
UUID.TryParse(CreatorId, out m_creatorIdAsUuid);
|
||||||
|
}
|
||||||
|
|
||||||
|
return m_creatorIdAsUuid;
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
CreatorId = value.ToString();
|
m_creatorIdAsUuid = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
protected UUID m_creatorIdAsUuid = UUID.Zero;
|
||||||
|
|
||||||
/// <value>
|
/// <value>
|
||||||
/// The description of the inventory item (must be less than 64 characters)
|
/// The description of the inventory item (must be less than 64 characters)
|
||||||
|
|
|
@ -236,10 +236,6 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The operation to perform once trust has been established.
|
/// The operation to perform once trust has been established.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="httpMethod"></param>
|
|
||||||
/// <param name="path"></param>
|
|
||||||
/// <param name="method"></param>
|
|
||||||
/// <param name="tmethod"></param>
|
|
||||||
private RestDeserialiseMethod<TRequest, TResponse> m_method;
|
private RestDeserialiseMethod<TRequest, TResponse> m_method;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -32,7 +32,7 @@ namespace OpenSim
|
||||||
/// <value>
|
/// <value>
|
||||||
/// This is the OpenSim version string. Change this if you are releasing a new OpenSim version.
|
/// This is the OpenSim version string. Change this if you are releasing a new OpenSim version.
|
||||||
/// </value>
|
/// </value>
|
||||||
public readonly static string Version = "OpenSimulator Server 0.6.4"; // stay with 27 chars (used in regioninfo)
|
public readonly static string Version = "OpenSimulator Server 0.6.5"; // stay with 27 chars (used in regioninfo)
|
||||||
|
|
||||||
/// <value>
|
/// <value>
|
||||||
/// This is the external interface version. It is separate from the OpenSimulator project version.
|
/// This is the external interface version. It is separate from the OpenSimulator project version.
|
||||||
|
@ -48,6 +48,6 @@ namespace OpenSim
|
||||||
/// of the code that is too old.
|
/// of the code that is too old.
|
||||||
///
|
///
|
||||||
/// </value>
|
/// </value>
|
||||||
public readonly static int MajorInterfaceVersion = 3;
|
public readonly static int MajorInterfaceVersion = 4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,5 +59,5 @@ using System.Runtime.InteropServices;
|
||||||
// Revision
|
// Revision
|
||||||
//
|
//
|
||||||
|
|
||||||
[assembly : AssemblyVersion("0.6.4.*")]
|
[assembly : AssemblyVersion("0.6.5.*")]
|
||||||
[assembly : AssemblyFileVersion("1.0.0.0")]
|
[assembly : AssemblyFileVersion("0.6.5.0")]
|
||||||
|
|
|
@ -59,5 +59,5 @@ using System.Runtime.InteropServices;
|
||||||
// Revision
|
// Revision
|
||||||
//
|
//
|
||||||
|
|
||||||
[assembly : AssemblyVersion("0.6.4.*")]
|
[assembly : AssemblyVersion("0.6.5.*")]
|
||||||
[assembly : AssemblyFileVersion("1.0.0.0")]
|
[assembly : AssemblyFileVersion("0.6.5.0")]
|
||||||
|
|
|
@ -44,6 +44,8 @@ namespace OpenSim.Grid.InventoryServer
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class GridInventoryService : InventoryServiceBase
|
public class GridInventoryService : InventoryServiceBase
|
||||||
{
|
{
|
||||||
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
private bool m_doLookup = false;
|
private bool m_doLookup = false;
|
||||||
|
|
||||||
public bool DoLookup
|
public bool DoLookup
|
||||||
|
@ -51,8 +53,7 @@ namespace OpenSim.Grid.InventoryServer
|
||||||
get { return m_doLookup; }
|
get { return m_doLookup; }
|
||||||
set { m_doLookup = value; }
|
set { m_doLookup = value; }
|
||||||
}
|
}
|
||||||
private static readonly ILog m_log
|
|
||||||
= LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
|
||||||
private static readonly int INVENTORY_DEFAULT_SESSION_TIME = 30; // secs
|
private static readonly int INVENTORY_DEFAULT_SESSION_TIME = 30; // secs
|
||||||
|
|
||||||
private string m_userserver_url;
|
private string m_userserver_url;
|
||||||
|
|
|
@ -59,5 +59,5 @@ using System.Runtime.InteropServices;
|
||||||
// Revision
|
// Revision
|
||||||
//
|
//
|
||||||
|
|
||||||
[assembly : AssemblyVersion("0.6.4.*")]
|
[assembly : AssemblyVersion("0.6.5.*")]
|
||||||
[assembly : AssemblyFileVersion("1.0.0.0")]
|
[assembly : AssemblyFileVersion("0.6.5.0")]
|
||||||
|
|
|
@ -3287,6 +3287,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
ObjectPropertiesFamilyPacket.ObjectDataBlock objPropDB = new ObjectPropertiesFamilyPacket.ObjectDataBlock();
|
ObjectPropertiesFamilyPacket.ObjectDataBlock objPropDB = new ObjectPropertiesFamilyPacket.ObjectDataBlock();
|
||||||
objPropDB.RequestFlags = RequestFlags;
|
objPropDB.RequestFlags = RequestFlags;
|
||||||
objPropDB.ObjectID = ObjectUUID;
|
objPropDB.ObjectID = ObjectUUID;
|
||||||
|
if (OwnerID == GroupID)
|
||||||
|
objPropDB.OwnerID = UUID.Zero;
|
||||||
|
else
|
||||||
objPropDB.OwnerID = OwnerID;
|
objPropDB.OwnerID = OwnerID;
|
||||||
objPropDB.GroupID = GroupID;
|
objPropDB.GroupID = GroupID;
|
||||||
objPropDB.BaseMask = BaseMask;
|
objPropDB.BaseMask = BaseMask;
|
||||||
|
@ -3332,6 +3335,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
// proper.ObjectData[0].LastOwnerID = UUID.Zero;
|
// proper.ObjectData[0].LastOwnerID = UUID.Zero;
|
||||||
|
|
||||||
proper.ObjectData[0].ObjectID = ObjectUUID;
|
proper.ObjectData[0].ObjectID = ObjectUUID;
|
||||||
|
if (OwnerUUID == GroupUUID)
|
||||||
|
proper.ObjectData[0].OwnerID = UUID.Zero;
|
||||||
|
else
|
||||||
proper.ObjectData[0].OwnerID = OwnerUUID;
|
proper.ObjectData[0].OwnerID = OwnerUUID;
|
||||||
proper.ObjectData[0].TouchName = LLUtil.StringToPacketBytes(TouchTitle);
|
proper.ObjectData[0].TouchName = LLUtil.StringToPacketBytes(TouchTitle);
|
||||||
proper.ObjectData[0].TextureID = TextureID;
|
proper.ObjectData[0].TextureID = TextureID;
|
||||||
|
@ -8618,6 +8624,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
List<GroupMembersData> members =
|
List<GroupMembersData> members =
|
||||||
m_GroupsModule.GroupMembersRequest(this, groupMembersRequestPacket.GroupData.GroupID);
|
m_GroupsModule.GroupMembersRequest(this, groupMembersRequestPacket.GroupData.GroupID);
|
||||||
|
|
||||||
|
int memberCount = members.Count;
|
||||||
|
|
||||||
|
while (true)
|
||||||
|
{
|
||||||
|
int blockCount = members.Count;
|
||||||
|
if (blockCount > 40)
|
||||||
|
blockCount = 40;
|
||||||
|
|
||||||
GroupMembersReplyPacket groupMembersReply = (GroupMembersReplyPacket)PacketPool.Instance.GetPacket(PacketType.GroupMembersReply);
|
GroupMembersReplyPacket groupMembersReply = (GroupMembersReplyPacket)PacketPool.Instance.GetPacket(PacketType.GroupMembersReply);
|
||||||
|
|
||||||
groupMembersReply.AgentData =
|
groupMembersReply.AgentData =
|
||||||
|
@ -8626,18 +8640,20 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
new GroupMembersReplyPacket.GroupDataBlock();
|
new GroupMembersReplyPacket.GroupDataBlock();
|
||||||
groupMembersReply.MemberData =
|
groupMembersReply.MemberData =
|
||||||
new GroupMembersReplyPacket.MemberDataBlock[
|
new GroupMembersReplyPacket.MemberDataBlock[
|
||||||
members.Count];
|
blockCount];
|
||||||
|
|
||||||
groupMembersReply.AgentData.AgentID = AgentId;
|
groupMembersReply.AgentData.AgentID = AgentId;
|
||||||
groupMembersReply.GroupData.GroupID =
|
groupMembersReply.GroupData.GroupID =
|
||||||
groupMembersRequestPacket.GroupData.GroupID;
|
groupMembersRequestPacket.GroupData.GroupID;
|
||||||
groupMembersReply.GroupData.RequestID =
|
groupMembersReply.GroupData.RequestID =
|
||||||
groupMembersRequestPacket.GroupData.RequestID;
|
groupMembersRequestPacket.GroupData.RequestID;
|
||||||
groupMembersReply.GroupData.MemberCount = members.Count;
|
groupMembersReply.GroupData.MemberCount = memberCount;
|
||||||
|
|
||||||
int i = 0;
|
for (int i = 0 ; i < blockCount ; i++)
|
||||||
foreach (GroupMembersData m in members)
|
|
||||||
{
|
{
|
||||||
|
GroupMembersData m = members[0];
|
||||||
|
members.RemoveAt(0);
|
||||||
|
|
||||||
groupMembersReply.MemberData[i] =
|
groupMembersReply.MemberData[i] =
|
||||||
new GroupMembersReplyPacket.MemberDataBlock();
|
new GroupMembersReplyPacket.MemberDataBlock();
|
||||||
groupMembersReply.MemberData[i].AgentID =
|
groupMembersReply.MemberData[i].AgentID =
|
||||||
|
@ -8652,10 +8668,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
Utils.StringToBytes(m.Title);
|
Utils.StringToBytes(m.Title);
|
||||||
groupMembersReply.MemberData[i].IsOwner =
|
groupMembersReply.MemberData[i].IsOwner =
|
||||||
m.IsOwner;
|
m.IsOwner;
|
||||||
i++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
OutPacket(groupMembersReply, ThrottleOutPacketType.Task);
|
OutPacket(groupMembersReply, ThrottleOutPacketType.Task);
|
||||||
|
if (members.Count == 0)
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -8741,6 +8758,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
if (m_GroupsModule != null)
|
if (m_GroupsModule != null)
|
||||||
{
|
{
|
||||||
|
List<GroupRoleMembersData> mappings =
|
||||||
|
m_GroupsModule.GroupRoleMembersRequest(this,
|
||||||
|
groupRoleMembersRequest.GroupData.GroupID);
|
||||||
|
|
||||||
|
int mappingsCount = mappings.Count;
|
||||||
|
|
||||||
|
while (mappings.Count > 0)
|
||||||
|
{
|
||||||
|
int pairs = mappings.Count;
|
||||||
|
if (pairs > 32)
|
||||||
|
pairs = 32;
|
||||||
|
|
||||||
GroupRoleMembersReplyPacket groupRoleMembersReply = (GroupRoleMembersReplyPacket)PacketPool.Instance.GetPacket(PacketType.GroupRoleMembersReply);
|
GroupRoleMembersReplyPacket groupRoleMembersReply = (GroupRoleMembersReplyPacket)PacketPool.Instance.GetPacket(PacketType.GroupRoleMembersReply);
|
||||||
groupRoleMembersReply.AgentData =
|
groupRoleMembersReply.AgentData =
|
||||||
new GroupRoleMembersReplyPacket.AgentDataBlock();
|
new GroupRoleMembersReplyPacket.AgentDataBlock();
|
||||||
|
@ -8751,19 +8780,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
groupRoleMembersReply.AgentData.RequestID =
|
groupRoleMembersReply.AgentData.RequestID =
|
||||||
groupRoleMembersRequest.GroupData.RequestID;
|
groupRoleMembersRequest.GroupData.RequestID;
|
||||||
|
|
||||||
List<GroupRoleMembersData> mappings =
|
|
||||||
m_GroupsModule.GroupRoleMembersRequest(this,
|
|
||||||
groupRoleMembersRequest.GroupData.GroupID);
|
|
||||||
|
|
||||||
groupRoleMembersReply.AgentData.TotalPairs =
|
groupRoleMembersReply.AgentData.TotalPairs =
|
||||||
(uint)mappings.Count;
|
(uint)mappingsCount;
|
||||||
|
|
||||||
groupRoleMembersReply.MemberData =
|
groupRoleMembersReply.MemberData =
|
||||||
new GroupRoleMembersReplyPacket.MemberDataBlock[mappings.Count];
|
new GroupRoleMembersReplyPacket.MemberDataBlock[pairs];
|
||||||
|
|
||||||
int i = 0;
|
for (int i = 0 ; i < pairs ; i++)
|
||||||
foreach (GroupRoleMembersData d in mappings)
|
|
||||||
{
|
{
|
||||||
|
GroupRoleMembersData d = mappings[0];
|
||||||
|
mappings.RemoveAt(0);
|
||||||
|
|
||||||
groupRoleMembersReply.MemberData[i] =
|
groupRoleMembersReply.MemberData[i] =
|
||||||
new GroupRoleMembersReplyPacket.MemberDataBlock();
|
new GroupRoleMembersReplyPacket.MemberDataBlock();
|
||||||
|
|
||||||
|
@ -8771,11 +8798,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
d.RoleID;
|
d.RoleID;
|
||||||
groupRoleMembersReply.MemberData[i].MemberID =
|
groupRoleMembersReply.MemberData[i].MemberID =
|
||||||
d.MemberID;
|
d.MemberID;
|
||||||
i++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
OutPacket(groupRoleMembersReply, ThrottleOutPacketType.Task);
|
OutPacket(groupRoleMembersReply, ThrottleOutPacketType.Task);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PacketType.CreateGroupRequest:
|
case PacketType.CreateGroupRequest:
|
||||||
|
|
|
@ -61,5 +61,5 @@ using System.Runtime.InteropServices;
|
||||||
// You can specify all the values or you can default the Revision and Build Numbers
|
// You can specify all the values or you can default the Revision and Build Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
|
|
||||||
[assembly : AssemblyVersion("0.6.4.*")]
|
[assembly : AssemblyVersion("0.6.5.*")]
|
||||||
[assembly : AssemblyFileVersion("1.0.0.0")]
|
[assembly : AssemblyFileVersion("0.6.5.0")]
|
||||||
|
|
|
@ -61,5 +61,5 @@ using System.Runtime.InteropServices;
|
||||||
// You can specify all the values or you can default the Revision and Build Numbers
|
// You can specify all the values or you can default the Revision and Build Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
|
|
||||||
[assembly : AssemblyVersion("0.6.4.*")]
|
[assembly : AssemblyVersion("0.6.5.*")]
|
||||||
[assembly : AssemblyFileVersion("1.0.0.0")]
|
[assembly : AssemblyFileVersion("0.6.5.0")]
|
||||||
|
|
|
@ -381,7 +381,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
||||||
client.OnLogout += OnLogout;
|
client.OnLogout += OnLogout;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ClientClosed(UUID AgentId)
|
private void ClientClosed(UUID AgentId, Scene scene)
|
||||||
{
|
{
|
||||||
// agent's client was closed. As we handle logout in OnLogout, this here has only to handle
|
// agent's client was closed. As we handle logout in OnLogout, this here has only to handle
|
||||||
// TPing away (root agent is closed) or TPing/crossing in a region far enough away (client
|
// TPing away (root agent is closed) or TPing/crossing in a region far enough away (client
|
||||||
|
|
|
@ -198,7 +198,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Groups
|
||||||
remote_client.SendGroupNameReply(groupUUID, groupnamereply);
|
remote_client.SendGroupNameReply(groupUUID, groupnamereply);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnClientClosed(UUID agentID)
|
private void OnClientClosed(UUID agentID, Scene scene)
|
||||||
{
|
{
|
||||||
lock (m_ClientMap)
|
lock (m_ClientMap)
|
||||||
{
|
{
|
||||||
|
|
|
@ -368,7 +368,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ClientLoggedOut(UUID agentID)
|
public void ClientLoggedOut(UUID agentID, Scene scene)
|
||||||
{
|
{
|
||||||
if (m_AgentRegions.ContainsKey(agentID))
|
if (m_AgentRegions.ContainsKey(agentID))
|
||||||
m_AgentRegions.Remove(agentID);
|
m_AgentRegions.Remove(agentID);
|
||||||
|
|
|
@ -198,7 +198,7 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue
|
||||||
// ClientClosed(client.AgentId);
|
// ClientClosed(client.AgentId);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
private void ClientClosed(UUID AgentID)
|
private void ClientClosed(UUID AgentID, Scene scene)
|
||||||
{
|
{
|
||||||
m_log.DebugFormat("[EVENTQUEUE]: Closed client {0} in region {1}", AgentID, m_scene.RegionInfo.RegionName);
|
m_log.DebugFormat("[EVENTQUEUE]: Closed client {0} in region {1}", AgentID, m_scene.RegionInfo.RegionName);
|
||||||
|
|
||||||
|
|
|
@ -856,8 +856,11 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (List<SceneObjectGroup> ol in returns.Values)
|
foreach (List<SceneObjectGroup> ol in returns.Values)
|
||||||
|
{
|
||||||
|
if (m_scene.Permissions.CanUseObjectReturn(this, type, remote_client, ol))
|
||||||
m_scene.returnObjects(ol.ToArray(), remote_client.AgentId);
|
m_scene.returnObjects(ol.ToArray(), remote_client.AgentId);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,56 @@ using OpenSim.Framework.Communications.Cache;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
|
|
||||||
|
// Temporary fix of wrong GroupPowers constants in OpenMetaverse library
|
||||||
|
enum GroupPowers : long
|
||||||
|
{
|
||||||
|
None = 0,
|
||||||
|
LandEjectAndFreeze = 1,
|
||||||
|
Invite = 2,
|
||||||
|
ReturnGroupSet = 2,
|
||||||
|
Eject = 4,
|
||||||
|
ReturnNonGroup = 4,
|
||||||
|
ChangeOptions = 8,
|
||||||
|
LandGardening = 8,
|
||||||
|
CreateRole = 16,
|
||||||
|
DeedObject = 16,
|
||||||
|
ModerateChat = 32,
|
||||||
|
DeleteRole = 32,
|
||||||
|
RoleProperties = 64,
|
||||||
|
ObjectManipulate = 64,
|
||||||
|
ObjectSetForSale = 128,
|
||||||
|
AssignMemberLimited = 128,
|
||||||
|
AssignMember = 256,
|
||||||
|
Accountable = 256,
|
||||||
|
RemoveMember = 512,
|
||||||
|
SendNotices = 1024,
|
||||||
|
ChangeActions = 1024,
|
||||||
|
ChangeIdentity = 2048,
|
||||||
|
ReceiveNotices = 2048,
|
||||||
|
StartProposal = 4096,
|
||||||
|
LandDeed = 4096,
|
||||||
|
VoteOnProposal = 8192,
|
||||||
|
LandRelease = 8192,
|
||||||
|
LandSetSale = 16384,
|
||||||
|
LandDivideJoin = 32768,
|
||||||
|
ReturnGroupOwned = 65536,
|
||||||
|
JoinChat = 65536,
|
||||||
|
FindPlaces = 131072,
|
||||||
|
LandChangeIdentity = 262144,
|
||||||
|
SetLandingPoint = 524288,
|
||||||
|
ChangeMedia = 1048576,
|
||||||
|
LandEdit = 2097152,
|
||||||
|
LandOptions = 4194304,
|
||||||
|
AllowEditLand = 8388608,
|
||||||
|
AllowFly = 16777216,
|
||||||
|
AllowRez = 33554432,
|
||||||
|
AllowLandmark = 67108864,
|
||||||
|
AllowVoiceChat = 134217728,
|
||||||
|
AllowSetHome = 268435456,
|
||||||
|
LandManageAllowed = 536870912,
|
||||||
|
LandManageBanned = 1073741824
|
||||||
|
}
|
||||||
|
|
||||||
namespace OpenSim.Region.CoreModules.World.Permissions
|
namespace OpenSim.Region.CoreModules.World.Permissions
|
||||||
{
|
{
|
||||||
public class PermissionsModule : IRegionModule
|
public class PermissionsModule : IRegionModule
|
||||||
|
@ -129,6 +179,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||||
m_scene.Permissions.OnAbandonParcel += CanAbandonParcel;
|
m_scene.Permissions.OnAbandonParcel += CanAbandonParcel;
|
||||||
m_scene.Permissions.OnReclaimParcel += CanReclaimParcel;
|
m_scene.Permissions.OnReclaimParcel += CanReclaimParcel;
|
||||||
m_scene.Permissions.OnDeedParcel += CanDeedParcel;
|
m_scene.Permissions.OnDeedParcel += CanDeedParcel;
|
||||||
|
m_scene.Permissions.OnDeedObject += CanDeedObject;
|
||||||
m_scene.Permissions.OnIsGod += IsGod;
|
m_scene.Permissions.OnIsGod += IsGod;
|
||||||
m_scene.Permissions.OnDuplicateObject += CanDuplicateObject;
|
m_scene.Permissions.OnDuplicateObject += CanDuplicateObject;
|
||||||
m_scene.Permissions.OnDeleteObject += CanDeleteObject; //MAYBE FULLY IMPLEMENTED
|
m_scene.Permissions.OnDeleteObject += CanDeleteObject; //MAYBE FULLY IMPLEMENTED
|
||||||
|
@ -168,6 +219,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||||
m_scene.Permissions.OnDeleteUserInventory += CanDeleteUserInventory; //NOT YET IMPLEMENTED
|
m_scene.Permissions.OnDeleteUserInventory += CanDeleteUserInventory; //NOT YET IMPLEMENTED
|
||||||
|
|
||||||
m_scene.Permissions.OnTeleport += CanTeleport; //NOT YET IMPLEMENTED
|
m_scene.Permissions.OnTeleport += CanTeleport; //NOT YET IMPLEMENTED
|
||||||
|
m_scene.Permissions.OnUseObjectReturn += CanUseObjectReturn; //NOT YET IMPLEMENTED
|
||||||
|
|
||||||
m_scene.AddCommand(this, "bypass permissions",
|
m_scene.AddCommand(this, "bypass permissions",
|
||||||
"bypass permissions <true / false>",
|
"bypass permissions <true / false>",
|
||||||
|
@ -288,6 +340,16 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||||
m_log.Debug("[PERMISSIONS]: " + permissionCalled + " was called from " + m_scene.RegionInfo.RegionName);
|
m_log.Debug("[PERMISSIONS]: " + permissionCalled + " was called from " + m_scene.RegionInfo.RegionName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Checks if the given group is active and if the user is a group member
|
||||||
|
// with the powers requested (powers = 0 for no powers check)
|
||||||
|
protected bool IsGroupMember(UUID groupID, UUID userID, ulong powers)
|
||||||
|
{
|
||||||
|
IClientAPI client = m_scene.GetScenePresence(userID).ControllingClient;
|
||||||
|
|
||||||
|
return ((groupID == client.ActiveGroupId) && (client.ActiveGroupPowers != 0) &&
|
||||||
|
((powers == 0) || ((client.ActiveGroupPowers & powers) == powers)));
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Parse a user set configuration setting
|
/// Parse a user set configuration setting
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -330,6 +392,8 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
protected bool IsAdministrator(UUID user)
|
protected bool IsAdministrator(UUID user)
|
||||||
{
|
{
|
||||||
|
if (user == UUID.Zero) return false;
|
||||||
|
|
||||||
if (m_scene.RegionInfo.MasterAvatarAssignedUUID != UUID.Zero)
|
if (m_scene.RegionInfo.MasterAvatarAssignedUUID != UUID.Zero)
|
||||||
{
|
{
|
||||||
if (m_RegionOwnerIsGod && (m_scene.RegionInfo.MasterAvatarAssignedUUID == user))
|
if (m_RegionOwnerIsGod && (m_scene.RegionInfo.MasterAvatarAssignedUUID == user))
|
||||||
|
@ -350,10 +414,6 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||||
if (profile.UserProfile.GodLevel >= 200)
|
if (profile.UserProfile.GodLevel >= 200)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
//else
|
|
||||||
//{
|
|
||||||
// m_log.ErrorFormat("[PERMISSIONS]: Could not find user {0} for administrator check", user);
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
@ -361,6 +421,8 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||||
|
|
||||||
protected bool IsEstateManager(UUID user)
|
protected bool IsEstateManager(UUID user)
|
||||||
{
|
{
|
||||||
|
if (user == UUID.Zero) return false;
|
||||||
|
|
||||||
return m_scene.RegionInfo.EstateSettings.IsEstateManager(user);
|
return m_scene.RegionInfo.EstateSettings.IsEstateManager(user);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -432,36 +494,20 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||||
objectOwnerMask |= (uint)PrimFlags.ObjectYouOwner | (uint)PrimFlags.ObjectAnyOwner | (uint)PrimFlags.ObjectOwnerModify;
|
objectOwnerMask |= (uint)PrimFlags.ObjectYouOwner | (uint)PrimFlags.ObjectAnyOwner | (uint)PrimFlags.ObjectOwnerModify;
|
||||||
|
|
||||||
// Customize the GroupMask
|
// Customize the GroupMask
|
||||||
// uint objectGroupMask = ApplyObjectModifyMasks(task.GroupMask, objflags);
|
uint objectGroupMask = ApplyObjectModifyMasks(task.GroupMask, objflags);
|
||||||
|
|
||||||
// Customize the EveryoneMask
|
// Customize the EveryoneMask
|
||||||
uint objectEveryoneMask = ApplyObjectModifyMasks(task.EveryoneMask, objflags);
|
uint objectEveryoneMask = ApplyObjectModifyMasks(task.EveryoneMask, objflags);
|
||||||
|
|
||||||
|
|
||||||
// Hack to allow collaboration until Groups and Group Permissions are implemented
|
|
||||||
if ((objectEveryoneMask & (uint)PrimFlags.ObjectMove) != 0)
|
|
||||||
objectEveryoneMask |= (uint)PrimFlags.ObjectModify;
|
|
||||||
|
|
||||||
if (m_bypassPermissions)
|
if (m_bypassPermissions)
|
||||||
return objectOwnerMask;
|
return objectOwnerMask;
|
||||||
|
|
||||||
// Object owners should be able to edit their own content
|
// Object owners should be able to edit their own content
|
||||||
if (user == objectOwner)
|
if (user == objectOwner)
|
||||||
{
|
|
||||||
return objectOwnerMask;
|
return objectOwnerMask;
|
||||||
}
|
|
||||||
|
|
||||||
//// Users should be able to edit what is over their land.
|
|
||||||
//ILandObject parcel = m_scene.LandChannel.GetLandObject(task.AbsolutePosition.X, task.AbsolutePosition.Y);
|
|
||||||
//if (parcel != null && parcel.landData.OwnerID == user && m_ParcelOwnerIsGod)
|
|
||||||
// return objectOwnerMask;
|
|
||||||
|
|
||||||
//// Admin objects should not be editable by the above
|
|
||||||
//if (IsAdministrator(objectOwner))
|
|
||||||
// return objectEveryoneMask;
|
|
||||||
|
|
||||||
// Estate users should be able to edit anything in the sim
|
// Estate users should be able to edit anything in the sim
|
||||||
if (IsEstateManager(user) && m_RegionOwnerIsGod && (!IsAdministrator(objectOwner)))
|
if (IsEstateManager(user) && m_RegionOwnerIsGod && !IsAdministrator(objectOwner))
|
||||||
return objectOwnerMask;
|
return objectOwnerMask;
|
||||||
|
|
||||||
// Admin should be able to edit anything in the sim (including admin objects)
|
// Admin should be able to edit anything in the sim (including admin objects)
|
||||||
|
@ -472,16 +518,14 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||||
ILandObject parcel = m_scene.LandChannel.GetLandObject(task.AbsolutePosition.X, task.AbsolutePosition.Y);
|
ILandObject parcel = m_scene.LandChannel.GetLandObject(task.AbsolutePosition.X, task.AbsolutePosition.Y);
|
||||||
if (parcel != null && parcel.landData.OwnerID == user && m_ParcelOwnerIsGod)
|
if (parcel != null && parcel.landData.OwnerID == user && m_ParcelOwnerIsGod)
|
||||||
{
|
{
|
||||||
uint responseMask = objectOwnerMask;
|
|
||||||
|
|
||||||
// Admin objects should not be editable by the above
|
// Admin objects should not be editable by the above
|
||||||
if (IsAdministrator(objectOwner))
|
if (!IsAdministrator(objectOwner))
|
||||||
{
|
return objectOwnerMask;
|
||||||
responseMask = objectEveryoneMask;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return responseMask;
|
// Group permissions
|
||||||
}
|
if ( ( task.GroupID != UUID.Zero) && IsGroupMember(task.GroupID, user, 0) )
|
||||||
|
return objectGroupMask;
|
||||||
|
|
||||||
return objectEveryoneMask;
|
return objectEveryoneMask;
|
||||||
}
|
}
|
||||||
|
@ -566,6 +610,13 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||||
permission = false;
|
permission = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Group members should be able to edit group objects
|
||||||
|
if ( (group.GroupID != UUID.Zero) && ((m_scene.GetSceneObjectPart(objId).GroupMask & (uint)PermissionMask.Modify) != 0) && IsGroupMember(group.GroupID, currentUser, 0) )
|
||||||
|
{
|
||||||
|
// Return immediately, so that the administrator can shares group objects
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
// Users should be able to edit what is over their land.
|
// Users should be able to edit what is over their land.
|
||||||
ILandObject parcel = m_scene.LandChannel.GetLandObject(group.AbsolutePosition.X, group.AbsolutePosition.Y);
|
ILandObject parcel = m_scene.LandChannel.GetLandObject(group.AbsolutePosition.X, group.AbsolutePosition.Y);
|
||||||
if ((parcel != null) && (parcel.landData.OwnerID == currentUser))
|
if ((parcel != null) && (parcel.landData.OwnerID == currentUser))
|
||||||
|
@ -632,7 +683,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||||
return permission;
|
return permission;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected bool GenericParcelPermission(UUID user, ILandObject parcel)
|
protected bool GenericParcelPermission(UUID user, ILandObject parcel, ulong groupPowers)
|
||||||
{
|
{
|
||||||
bool permission = false;
|
bool permission = false;
|
||||||
|
|
||||||
|
@ -641,9 +692,9 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||||
permission = true;
|
permission = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (parcel.landData.IsGroupOwned)
|
if( ( parcel.landData.GroupID != UUID.Zero) && IsGroupMember(parcel.landData.GroupID, user, groupPowers) )
|
||||||
{
|
{
|
||||||
// TODO: Need to do some extra checks here. Requires group code.
|
permission = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IsEstateManager(user))
|
if (IsEstateManager(user))
|
||||||
|
@ -659,11 +710,38 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||||
return permission;
|
return permission;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected bool GenericParcelPermission(UUID user, Vector3 pos)
|
protected bool GenericParcelOwnerPermission(UUID user, ILandObject parcel, ulong groupPowers)
|
||||||
|
{
|
||||||
|
bool permission = false;
|
||||||
|
|
||||||
|
if (parcel.landData.OwnerID == user)
|
||||||
|
{
|
||||||
|
permission = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( parcel.landData.IsGroupOwned && IsGroupMember(parcel.landData.GroupID, user, groupPowers) )
|
||||||
|
{
|
||||||
|
permission = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (IsEstateManager(user))
|
||||||
|
{
|
||||||
|
permission = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (IsAdministrator(user))
|
||||||
|
{
|
||||||
|
permission = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return permission;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected bool GenericParcelPermission(UUID user, Vector3 pos, ulong groupPowers)
|
||||||
{
|
{
|
||||||
ILandObject parcel = m_scene.LandChannel.GetLandObject(pos.X, pos.Y);
|
ILandObject parcel = m_scene.LandChannel.GetLandObject(pos.X, pos.Y);
|
||||||
if (parcel == null) return false;
|
if (parcel == null) return false;
|
||||||
return GenericParcelPermission(user, parcel);
|
return GenericParcelPermission(user, parcel, groupPowers);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -673,7 +751,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||||
DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
|
DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
|
||||||
if (m_bypassPermissions) return m_bypassPermissionsValue;
|
if (m_bypassPermissions) return m_bypassPermissionsValue;
|
||||||
|
|
||||||
return GenericParcelPermission(user, parcel);
|
return GenericParcelOwnerPermission(user, parcel, (ulong)GroupPowers.LandRelease);
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool CanReclaimParcel(UUID user, ILandObject parcel, Scene scene)
|
private bool CanReclaimParcel(UUID user, ILandObject parcel, Scene scene)
|
||||||
|
@ -681,7 +759,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||||
DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
|
DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
|
||||||
if (m_bypassPermissions) return m_bypassPermissionsValue;
|
if (m_bypassPermissions) return m_bypassPermissionsValue;
|
||||||
|
|
||||||
return GenericParcelPermission(user, parcel);
|
return GenericParcelOwnerPermission(user, parcel, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool CanDeedParcel(UUID user, ILandObject parcel, Scene scene)
|
private bool CanDeedParcel(UUID user, ILandObject parcel, Scene scene)
|
||||||
|
@ -695,10 +773,24 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||||
ScenePresence sp = scene.GetScenePresence(user);
|
ScenePresence sp = scene.GetScenePresence(user);
|
||||||
IClientAPI client = sp.ControllingClient;
|
IClientAPI client = sp.ControllingClient;
|
||||||
|
|
||||||
if ((client.GetGroupPowers(parcel.landData.GroupID) & (long)GroupPowers.LandDeed) == 0)
|
if ((client.GetGroupPowers(parcel.landData.GroupID) & (ulong)GroupPowers.LandDeed) == 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return GenericParcelPermission(user, parcel);
|
return GenericParcelOwnerPermission(user, parcel, (ulong)GroupPowers.LandDeed);
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool CanDeedObject(UUID user, UUID group, Scene scene)
|
||||||
|
{
|
||||||
|
DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
|
||||||
|
if (m_bypassPermissions) return m_bypassPermissionsValue;
|
||||||
|
|
||||||
|
ScenePresence sp = scene.GetScenePresence(user);
|
||||||
|
IClientAPI client = sp.ControllingClient;
|
||||||
|
|
||||||
|
if((client.GetGroupPowers(group) & (ulong)GroupPowers.DeedObject) == 0)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool IsGod(UUID user, Scene scene)
|
private bool IsGod(UUID user, Scene scene)
|
||||||
|
@ -724,11 +816,17 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||||
if (part == null)
|
if (part == null)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if ((part.OwnerMask & PERM_COPY) == 0)
|
if (part.OwnerID == owner)
|
||||||
|
return ((part.OwnerMask & PERM_COPY) != 0);
|
||||||
|
|
||||||
|
if (part.GroupID != UUID.Zero)
|
||||||
|
{
|
||||||
|
if ((part.OwnerID == part.GroupID) && ((owner != part.LastOwnerID) || ((part.GroupMask & PERM_TRANS) == 0)))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if ((part.ParentGroup.GetEffectivePermissions() & PERM_COPY) == 0)
|
if ((part.GroupMask & PERM_COPY) == 0)
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
//If they can rez, they can duplicate
|
//If they can rez, they can duplicate
|
||||||
return CanRezObject(objectCount, owner, objectPosition, scene);
|
return CanRezObject(objectCount, owner, objectPosition, scene);
|
||||||
|
@ -766,11 +864,6 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||||
part = m_scene.GetSceneObjectPart(objectID);
|
part = m_scene.GetSceneObjectPart(objectID);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: add group support!
|
|
||||||
//
|
|
||||||
if (part.OwnerID != editorID)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
return GenericObjectPermission(editorID, objectID, false);
|
return GenericObjectPermission(editorID, objectID, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -779,7 +872,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||||
DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
|
DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
|
||||||
if (m_bypassPermissions) return m_bypassPermissionsValue;
|
if (m_bypassPermissions) return m_bypassPermissionsValue;
|
||||||
|
|
||||||
return GenericParcelPermission(user, parcel);
|
return GenericParcelOwnerPermission(user, parcel, (ulong)GroupPowers.LandDivideJoin);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -860,10 +953,19 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (part.OwnerID != user)
|
if (part.OwnerID != user)
|
||||||
|
{
|
||||||
|
if (part.GroupID == UUID.Zero)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
if( !IsGroupMember(part.GroupID, user, 0) )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if ((part.GroupMask & (uint)PermissionMask.Modify) == 0)
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
if ((part.OwnerMask & (uint)PermissionMask.Modify) == 0)
|
if ((part.OwnerMask & (uint)PermissionMask.Modify) == 0)
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
TaskInventoryItem ti = part.Inventory.GetInventoryItem(notecard);
|
TaskInventoryItem ti = part.Inventory.GetInventoryItem(notecard);
|
||||||
|
|
||||||
|
@ -871,8 +973,14 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (ti.OwnerID != user)
|
if (ti.OwnerID != user)
|
||||||
|
{
|
||||||
|
if (ti.GroupID == UUID.Zero)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
if( !IsGroupMember(ti.GroupID, user, 0) )
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// Require full perms
|
// Require full perms
|
||||||
if ((ti.CurrentPermissions &
|
if ((ti.CurrentPermissions &
|
||||||
((uint)PermissionMask.Modify |
|
((uint)PermissionMask.Modify |
|
||||||
|
@ -1043,8 +1151,6 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO: check for group rights
|
|
||||||
|
|
||||||
if (!m_scene.Entities.ContainsKey(objectID))
|
if (!m_scene.Entities.ContainsKey(objectID))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
@ -1057,7 +1163,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (GenericParcelPermission(task.OwnerID, newPoint))
|
if (GenericParcelPermission(task.OwnerID, newPoint, 0))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1088,14 +1194,13 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||||
(int)Parcel.ParcelFlags.CreateObjects)
|
(int)Parcel.ParcelFlags.CreateObjects)
|
||||||
permission = true;
|
permission = true;
|
||||||
|
|
||||||
//TODO: check for group rights
|
|
||||||
|
|
||||||
if (IsAdministrator(owner))
|
if (IsAdministrator(owner))
|
||||||
{
|
{
|
||||||
permission = true;
|
permission = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GenericParcelPermission(owner, objectPosition))
|
// Powers are zero, because GroupPowers.AllowRez is not a precondition for rezzing objects
|
||||||
|
if (GenericParcelPermission(owner, objectPosition, 0))
|
||||||
{
|
{
|
||||||
permission = true;
|
permission = true;
|
||||||
}
|
}
|
||||||
|
@ -1125,7 +1230,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||||
DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
|
DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
|
||||||
if (m_bypassPermissions) return m_bypassPermissionsValue;
|
if (m_bypassPermissions) return m_bypassPermissionsValue;
|
||||||
|
|
||||||
return GenericParcelPermission(user, parcel);
|
return GenericParcelOwnerPermission(user, parcel, (ulong)GroupPowers.LandSetSale);
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool CanTakeObject(UUID objectID, UUID stealer, Scene scene)
|
private bool CanTakeObject(UUID objectID, UUID stealer, Scene scene)
|
||||||
|
@ -1171,9 +1276,17 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||||
{
|
{
|
||||||
SceneObjectGroup task = (SceneObjectGroup)m_scene.Entities[objectID];
|
SceneObjectGroup task = (SceneObjectGroup)m_scene.Entities[objectID];
|
||||||
|
|
||||||
|
if (task.OwnerID != userID)
|
||||||
|
{
|
||||||
if ((task.GetEffectivePermissions() & (PERM_COPY | PERM_TRANS)) != (PERM_COPY | PERM_TRANS))
|
if ((task.GetEffectivePermissions() & (PERM_COPY | PERM_TRANS)) != (PERM_COPY | PERM_TRANS))
|
||||||
permission = false;
|
permission = false;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ((task.GetEffectivePermissions() & PERM_COPY) != PERM_COPY)
|
||||||
|
permission = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return permission;
|
return permission;
|
||||||
}
|
}
|
||||||
|
@ -1208,7 +1321,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
// Land owner can terraform too
|
// Land owner can terraform too
|
||||||
if (parcel != null && GenericParcelPermission(user, parcel))
|
if (parcel != null && GenericParcelPermission(user, parcel, (ulong)GroupPowers.AllowEditLand))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
@ -1277,10 +1390,19 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (part.OwnerID != user)
|
if (part.OwnerID != user)
|
||||||
|
{
|
||||||
|
if (part.GroupID == UUID.Zero)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
if( !IsGroupMember(part.GroupID, user, 0) )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if ((part.GroupMask & (uint)PermissionMask.Modify) == 0)
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
if ((part.OwnerMask & (uint)PermissionMask.Modify) == 0)
|
if ((part.OwnerMask & (uint)PermissionMask.Modify) == 0)
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
TaskInventoryItem ti = part.Inventory.GetInventoryItem(script);
|
TaskInventoryItem ti = part.Inventory.GetInventoryItem(script);
|
||||||
|
|
||||||
|
@ -1288,8 +1410,14 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (ti.OwnerID != user)
|
if (ti.OwnerID != user)
|
||||||
|
{
|
||||||
|
if (ti.GroupID == UUID.Zero)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
if( !IsGroupMember(ti.GroupID, user, 0) )
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// Require full perms
|
// Require full perms
|
||||||
if ((ti.CurrentPermissions &
|
if ((ti.CurrentPermissions &
|
||||||
((uint)PermissionMask.Modify |
|
((uint)PermissionMask.Modify |
|
||||||
|
@ -1355,8 +1483,14 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (part.OwnerID != user)
|
if (part.OwnerID != user)
|
||||||
|
{
|
||||||
|
if (part.GroupID == UUID.Zero)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
if( !IsGroupMember(part.GroupID, user, 0) )
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if ((part.OwnerMask & (uint)PermissionMask.Modify) == 0)
|
if ((part.OwnerMask & (uint)PermissionMask.Modify) == 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -1366,8 +1500,14 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (ti.OwnerID != user)
|
if (ti.OwnerID != user)
|
||||||
|
{
|
||||||
|
if (ti.GroupID == UUID.Zero)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
if( !IsGroupMember(ti.GroupID, user, 0) )
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// Notecards are always readable unless no copy
|
// Notecards are always readable unless no copy
|
||||||
//
|
//
|
||||||
if ((ti.CurrentPermissions &
|
if ((ti.CurrentPermissions &
|
||||||
|
@ -1523,5 +1663,66 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||||
// You can reset the scripts in any object you can edit
|
// You can reset the scripts in any object you can edit
|
||||||
return GenericObjectPermission(agentID, prim, false);
|
return GenericObjectPermission(agentID, prim, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private bool CanUseObjectReturn(ILandObject parcel, uint type, IClientAPI client, List<SceneObjectGroup> retlist, Scene scene)
|
||||||
|
{
|
||||||
|
DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
|
||||||
|
if (m_bypassPermissions) return m_bypassPermissionsValue;
|
||||||
|
|
||||||
|
long powers = 0;
|
||||||
|
if (parcel.landData.GroupID != UUID.Zero)
|
||||||
|
client.GetGroupPowers(parcel.landData.GroupID);
|
||||||
|
|
||||||
|
switch (type)
|
||||||
|
{
|
||||||
|
case (uint)ObjectReturnType.Owner:
|
||||||
|
// Don't let group members return owner's objects, ever
|
||||||
|
//
|
||||||
|
if (parcel.landData.IsGroupOwned)
|
||||||
|
{
|
||||||
|
if ((powers & (long)GroupPowers.ReturnGroupOwned) != 0)
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (parcel.landData.OwnerID != client.AgentId)
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return GenericParcelOwnerPermission(client.AgentId, parcel, (ulong)GroupPowers.ReturnGroupOwned);
|
||||||
|
case (uint)ObjectReturnType.Group:
|
||||||
|
if (parcel.landData.OwnerID != client.AgentId)
|
||||||
|
{
|
||||||
|
// If permissionis granted through a group...
|
||||||
|
//
|
||||||
|
if ((powers & (long)GroupPowers.ReturnGroupSet) != 0)
|
||||||
|
{
|
||||||
|
foreach (SceneObjectGroup g in new List<SceneObjectGroup>(retlist))
|
||||||
|
{
|
||||||
|
// check for and remove group owned objects unless
|
||||||
|
// the user also has permissions to return those
|
||||||
|
//
|
||||||
|
if (g.OwnerID == g.GroupID &&
|
||||||
|
((powers & (long)GroupPowers.ReturnGroupOwned) == 0))
|
||||||
|
{
|
||||||
|
retlist.Remove(g);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// And allow the operation
|
||||||
|
//
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return GenericParcelOwnerPermission(client.AgentId, parcel, (ulong)GroupPowers.ReturnGroupSet);
|
||||||
|
case (uint)ObjectReturnType.Other:
|
||||||
|
if ((powers & (long)GroupPowers.ReturnNonGroup) != 0)
|
||||||
|
return true;
|
||||||
|
return GenericParcelOwnerPermission(client.AgentId, parcel, (ulong)GroupPowers.ReturnNonGroup);
|
||||||
|
break;
|
||||||
|
case (uint)ObjectReturnType.List:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return GenericParcelPermission(client.AgentId, parcel, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -287,7 +287,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||||
/// Event handler
|
/// Event handler
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="AgentId">AgentID that logged out</param>
|
/// <param name="AgentId">AgentID that logged out</param>
|
||||||
private void ClientLoggedOut(UUID AgentId)
|
private void ClientLoggedOut(UUID AgentId, Scene scene)
|
||||||
{
|
{
|
||||||
List<ScenePresence> presences = m_scene.GetAvatars();
|
List<ScenePresence> presences = m_scene.GetAvatars();
|
||||||
int rootcount = 0;
|
int rootcount = 0;
|
||||||
|
|
|
@ -57,6 +57,6 @@ using System.Runtime.InteropServices;
|
||||||
//
|
//
|
||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("0.6.4.*")]
|
// [assembly: AssemblyVersion("0.6.5.*")]
|
||||||
[assembly: AssemblyVersion("0.6.4.*")]
|
[assembly: AssemblyVersion("0.6.5.*")]
|
||||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
[assembly: AssemblyFileVersion("0.6.5.0")]
|
||||||
|
|
|
@ -30,8 +30,10 @@ using OpenMetaverse;
|
||||||
|
|
||||||
namespace OpenSim.Region.Framework.Interfaces
|
namespace OpenSim.Region.Framework.Interfaces
|
||||||
{
|
{
|
||||||
|
|
||||||
public interface IDynamicTextureManager
|
public interface IDynamicTextureManager
|
||||||
{
|
{
|
||||||
|
|
||||||
void RegisterRender(string handleType, IDynamicTextureRender render);
|
void RegisterRender(string handleType, IDynamicTextureRender render);
|
||||||
void ReturnData(UUID id, byte[] data);
|
void ReturnData(UUID id, byte[] data);
|
||||||
|
|
||||||
|
|
|
@ -162,7 +162,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
public event IncomingInstantMessage OnUnhandledInstantMessage;
|
public event IncomingInstantMessage OnUnhandledInstantMessage;
|
||||||
|
|
||||||
public delegate void ClientClosed(UUID clientID);
|
public delegate void ClientClosed(UUID clientID, Scene scene);
|
||||||
|
|
||||||
public event ClientClosed OnClientClosed;
|
public event ClientClosed OnClientClosed;
|
||||||
|
|
||||||
|
@ -733,12 +733,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void TriggerClientClosed(UUID ClientID)
|
public void TriggerClientClosed(UUID ClientID, Scene scene)
|
||||||
{
|
{
|
||||||
handlerClientClosed = OnClientClosed;
|
handlerClientClosed = OnClientClosed;
|
||||||
if (handlerClientClosed != null)
|
if (handlerClientClosed != null)
|
||||||
{
|
{
|
||||||
handlerClientClosed(ClientID);
|
handlerClientClosed(ClientID, scene);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1528,10 +1528,14 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (part.OwnerID != remoteClient.AgentId)
|
if (part.OwnerID != remoteClient.AgentId)
|
||||||
|
{
|
||||||
|
// Group permissions
|
||||||
|
if ( (part.GroupID == UUID.Zero) || (remoteClient.GetGroupPowers(part.GroupID) == 0) || ((part.GroupMask & (uint)PermissionMask.Modify) == 0) )
|
||||||
return;
|
return;
|
||||||
|
} else {
|
||||||
if ((part.OwnerMask & (uint)PermissionMask.Modify) == 0)
|
if ((part.OwnerMask & (uint)PermissionMask.Modify) == 0)
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!Permissions.CanCreateObjectInventory(
|
if (!Permissions.CanCreateObjectInventory(
|
||||||
itemBase.InvType, part.UUID, remoteClient.AgentId))
|
itemBase.InvType, part.UUID, remoteClient.AgentId))
|
||||||
|
@ -1603,10 +1607,15 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
// Must own the object, and have modify rights
|
// Must own the object, and have modify rights
|
||||||
if (srcPart.OwnerID != destPart.OwnerID)
|
if (srcPart.OwnerID != destPart.OwnerID)
|
||||||
|
{
|
||||||
|
// Group permissions
|
||||||
|
if ( (destPart.GroupID == UUID.Zero) || (destPart.GroupID != srcPart.GroupID) ||
|
||||||
|
((destPart.GroupMask & (uint)PermissionMask.Modify) == 0) )
|
||||||
return;
|
return;
|
||||||
|
} else {
|
||||||
if ((destPart.OwnerMask & (uint)PermissionMask.Modify) == 0)
|
if ((destPart.OwnerMask & (uint)PermissionMask.Modify) == 0)
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (destPart.ScriptAccessPin != pin)
|
if (destPart.ScriptAccessPin != pin)
|
||||||
{
|
{
|
||||||
|
@ -2262,6 +2271,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
itemId = item.ID;
|
itemId = item.ID;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Brave new fullperm world
|
||||||
|
//
|
||||||
|
itemId = item.ID;
|
||||||
|
}
|
||||||
|
|
||||||
string xmlData = Utils.BytesToString(rezAsset.Data);
|
string xmlData = Utils.BytesToString(rezAsset.Data);
|
||||||
SceneObjectGroup group
|
SceneObjectGroup group
|
||||||
|
@ -2669,17 +2684,56 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
void ObjectOwner(IClientAPI remoteClient, UUID ownerID, UUID groupID, List<uint> localIDs)
|
void ObjectOwner(IClientAPI remoteClient, UUID ownerID, UUID groupID, List<uint> localIDs)
|
||||||
{
|
{
|
||||||
if (!Permissions.IsGod(remoteClient.AgentId))
|
if (!Permissions.IsGod(remoteClient.AgentId))
|
||||||
|
{
|
||||||
|
if (ownerID != UUID.Zero)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (!Permissions.CanDeedObject(remoteClient.AgentId, groupID))
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
List<SceneObjectGroup> groups = new List<SceneObjectGroup>();
|
||||||
|
|
||||||
foreach (uint localID in localIDs)
|
foreach (uint localID in localIDs)
|
||||||
{
|
{
|
||||||
SceneObjectPart part = GetSceneObjectPart(localID);
|
SceneObjectPart part = GetSceneObjectPart(localID);
|
||||||
if (part != null && part.ParentGroup != null)
|
if (!groups.Contains(part.ParentGroup))
|
||||||
|
groups.Add(part.ParentGroup);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (SceneObjectGroup sog in groups)
|
||||||
{
|
{
|
||||||
part.ParentGroup.SetOwnerId(ownerID);
|
if (ownerID != UUID.Zero)
|
||||||
part.Inventory.ChangeInventoryOwner(ownerID);
|
{
|
||||||
part.ParentGroup.SetGroup(groupID, remoteClient);
|
sog.SetOwnerId(ownerID);
|
||||||
}
|
sog.SetGroup(groupID, remoteClient);
|
||||||
|
|
||||||
|
foreach (SceneObjectPart child in sog.Children.Values)
|
||||||
|
child.Inventory.ChangeInventoryOwner(ownerID);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (!Permissions.CanEditObject(sog.UUID, remoteClient.AgentId))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (sog.GroupID != groupID)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
foreach (SceneObjectPart child in sog.Children.Values)
|
||||||
|
{
|
||||||
|
child.LastOwnerID = child.OwnerID;
|
||||||
|
child.Inventory.ChangeInventoryOwner(groupID);
|
||||||
|
}
|
||||||
|
|
||||||
|
sog.SetOwnerId(groupID);
|
||||||
|
sog.ApplyNextOwnerPermissions();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (uint localID in localIDs)
|
||||||
|
{
|
||||||
|
SceneObjectPart part = GetSceneObjectPart(localID);
|
||||||
|
part.GetProperties(remoteClient);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,6 +68,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
public delegate bool AbandonParcelHandler(UUID user, ILandObject parcel, Scene scene);
|
public delegate bool AbandonParcelHandler(UUID user, ILandObject parcel, Scene scene);
|
||||||
public delegate bool ReclaimParcelHandler(UUID user, ILandObject parcel, Scene scene);
|
public delegate bool ReclaimParcelHandler(UUID user, ILandObject parcel, Scene scene);
|
||||||
public delegate bool DeedParcelHandler(UUID user, ILandObject parcel, Scene scene);
|
public delegate bool DeedParcelHandler(UUID user, ILandObject parcel, Scene scene);
|
||||||
|
public delegate bool DeedObjectHandler(UUID user, UUID group, Scene scene);
|
||||||
public delegate bool BuyLandHandler(UUID user, ILandObject parcel, Scene scene);
|
public delegate bool BuyLandHandler(UUID user, ILandObject parcel, Scene scene);
|
||||||
public delegate bool LinkObjectHandler(UUID user, UUID objectID);
|
public delegate bool LinkObjectHandler(UUID user, UUID objectID);
|
||||||
public delegate bool DelinkObjectHandler(UUID user, UUID objectID);
|
public delegate bool DelinkObjectHandler(UUID user, UUID objectID);
|
||||||
|
@ -79,6 +80,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
public delegate bool CopyUserInventoryHandler(UUID itemID, UUID userID);
|
public delegate bool CopyUserInventoryHandler(UUID itemID, UUID userID);
|
||||||
public delegate bool DeleteUserInventoryHandler(UUID itemID, UUID userID);
|
public delegate bool DeleteUserInventoryHandler(UUID itemID, UUID userID);
|
||||||
public delegate bool TeleportHandler(UUID userID, Scene scene);
|
public delegate bool TeleportHandler(UUID userID, Scene scene);
|
||||||
|
public delegate bool UseObjectReturnHandler(ILandObject landData, uint type, IClientAPI client, List<SceneObjectGroup> retlist, Scene scene);
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public class ScenePermissions
|
public class ScenePermissions
|
||||||
|
@ -124,6 +126,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
public event AbandonParcelHandler OnAbandonParcel;
|
public event AbandonParcelHandler OnAbandonParcel;
|
||||||
public event ReclaimParcelHandler OnReclaimParcel;
|
public event ReclaimParcelHandler OnReclaimParcel;
|
||||||
public event DeedParcelHandler OnDeedParcel;
|
public event DeedParcelHandler OnDeedParcel;
|
||||||
|
public event DeedObjectHandler OnDeedObject;
|
||||||
public event BuyLandHandler OnBuyLand;
|
public event BuyLandHandler OnBuyLand;
|
||||||
public event LinkObjectHandler OnLinkObject;
|
public event LinkObjectHandler OnLinkObject;
|
||||||
public event DelinkObjectHandler OnDelinkObject;
|
public event DelinkObjectHandler OnDelinkObject;
|
||||||
|
@ -135,6 +138,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
public event CopyUserInventoryHandler OnCopyUserInventory;
|
public event CopyUserInventoryHandler OnCopyUserInventory;
|
||||||
public event DeleteUserInventoryHandler OnDeleteUserInventory;
|
public event DeleteUserInventoryHandler OnDeleteUserInventory;
|
||||||
public event TeleportHandler OnTeleport;
|
public event TeleportHandler OnTeleport;
|
||||||
|
public event UseObjectReturnHandler OnUseObjectReturn;
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Object Permission Checks
|
#region Object Permission Checks
|
||||||
|
@ -713,6 +717,21 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool CanDeedObject(UUID user, UUID group)
|
||||||
|
{
|
||||||
|
DeedObjectHandler handler = OnDeedObject;
|
||||||
|
if (handler != null)
|
||||||
|
{
|
||||||
|
Delegate[] list = handler.GetInvocationList();
|
||||||
|
foreach (DeedObjectHandler h in list)
|
||||||
|
{
|
||||||
|
if (h(user, group, m_scene) == false)
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
public bool CanBuyLand(UUID user, ILandObject parcel)
|
public bool CanBuyLand(UUID user, ILandObject parcel)
|
||||||
{
|
{
|
||||||
BuyLandHandler handler = OnBuyLand;
|
BuyLandHandler handler = OnBuyLand;
|
||||||
|
@ -910,5 +929,20 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool CanUseObjectReturn(ILandObject landData, uint type , IClientAPI client, List<SceneObjectGroup> retlist)
|
||||||
|
{
|
||||||
|
UseObjectReturnHandler handler = OnUseObjectReturn;
|
||||||
|
if (handler != null)
|
||||||
|
{
|
||||||
|
Delegate[] list = handler.GetInvocationList();
|
||||||
|
foreach (UseObjectReturnHandler h in list)
|
||||||
|
{
|
||||||
|
if (h(landData, type, client, retlist, m_scene) == false)
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2224,7 +2224,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
m_sceneGridService.SendCloseChildAgentConnections(agentID, regions);
|
m_sceneGridService.SendCloseChildAgentConnections(agentID, regions);
|
||||||
|
|
||||||
}
|
}
|
||||||
m_eventManager.TriggerClientClosed(agentID);
|
m_eventManager.TriggerClientClosed(agentID, this);
|
||||||
}
|
}
|
||||||
catch (NullReferenceException)
|
catch (NullReferenceException)
|
||||||
{
|
{
|
||||||
|
|
|
@ -57,6 +57,6 @@ using System.Runtime.InteropServices;
|
||||||
//
|
//
|
||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("0.6.4.*")]
|
// [assembly: AssemblyVersion("0.6.5.*")]
|
||||||
[assembly: AssemblyVersion("0.6.4.*")]
|
[assembly: AssemblyVersion("0.6.5.*")]
|
||||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
[assembly: AssemblyFileVersion("0.6.5.0")]
|
||||||
|
|
|
@ -55,4 +55,4 @@ using System.Runtime.InteropServices;
|
||||||
// You can specify all values by your own or you can build default build and revision
|
// You can specify all values by your own or you can build default build and revision
|
||||||
// numbers with the '*' character (the default):
|
// numbers with the '*' character (the default):
|
||||||
|
|
||||||
[assembly : AssemblyVersion("0.6.4.*")]
|
[assembly : AssemblyVersion("0.6.5.*")]
|
||||||
|
|
|
@ -55,4 +55,4 @@ using System.Runtime.InteropServices;
|
||||||
// You can specify all values by your own or you can build default build and revision
|
// You can specify all values by your own or you can build default build and revision
|
||||||
// numbers with the '*' character (the default):
|
// numbers with the '*' character (the default):
|
||||||
|
|
||||||
[assembly : AssemblyVersion("0.6.4.*")]
|
[assembly : AssemblyVersion("0.6.5.*")]
|
||||||
|
|
|
@ -55,4 +55,4 @@ using System.Runtime.InteropServices;
|
||||||
// You can specify all values by your own or you can build default build and revision
|
// You can specify all values by your own or you can build default build and revision
|
||||||
// numbers with the '*' character (the default):
|
// numbers with the '*' character (the default):
|
||||||
|
|
||||||
[assembly : AssemblyVersion("0.6.4.*")]
|
[assembly : AssemblyVersion("0.6.5.*")]
|
||||||
|
|
|
@ -55,4 +55,4 @@ using System.Runtime.InteropServices;
|
||||||
// You can specify all values by your own or you can build default build and revision
|
// You can specify all values by your own or you can build default build and revision
|
||||||
// numbers with the '*' character (the default):
|
// numbers with the '*' character (the default):
|
||||||
|
|
||||||
[assembly : AssemblyVersion("0.6.4.*")]
|
[assembly : AssemblyVersion("0.6.5.*")]
|
||||||
|
|
|
@ -55,4 +55,4 @@ using System.Runtime.InteropServices;
|
||||||
// You can specify all values by your own or you can build default build and revision
|
// You can specify all values by your own or you can build default build and revision
|
||||||
// numbers with the '*' character (the default):
|
// numbers with the '*' character (the default):
|
||||||
|
|
||||||
[assembly : AssemblyVersion("0.6.4.*")]
|
[assembly : AssemblyVersion("0.6.5.*")]
|
||||||
|
|
|
@ -55,4 +55,4 @@ using System.Runtime.InteropServices;
|
||||||
// You can specify all values by your own or you can build default build and revision
|
// You can specify all values by your own or you can build default build and revision
|
||||||
// numbers with the '*' character (the default):
|
// numbers with the '*' character (the default):
|
||||||
|
|
||||||
[assembly : AssemblyVersion("0.6.4.*")]
|
[assembly : AssemblyVersion("0.6.5.*")]
|
||||||
|
|
|
@ -697,7 +697,7 @@ namespace OpenSim.Region.ReplaceableModules.MoneyModule
|
||||||
/// When the client closes the connection we remove their accounting info from memory to free up resources.
|
/// When the client closes the connection we remove their accounting info from memory to free up resources.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="AgentID"></param>
|
/// <param name="AgentID"></param>
|
||||||
public void ClientClosed(UUID AgentID)
|
public void ClientClosed(UUID AgentID, Scene scene)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -759,7 +759,7 @@ namespace OpenSim.Region.ReplaceableModules.MoneyModule
|
||||||
/// Event Handler for when the client logs out.
|
/// Event Handler for when the client logs out.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="AgentId"></param>
|
/// <param name="AgentId"></param>
|
||||||
private void ClientLoggedOut(UUID AgentId)
|
private void ClientLoggedOut(UUID AgentId, Scene scene)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -770,7 +770,7 @@ namespace OpenSim.Region.ReplaceableModules.MoneyModule
|
||||||
/// <param name="client"></param>
|
/// <param name="client"></param>
|
||||||
public void ClientClosed(IClientAPI client)
|
public void ClientClosed(IClientAPI client)
|
||||||
{
|
{
|
||||||
ClientClosed(client.AgentId);
|
ClientClosed(client.AgentId, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -61,5 +61,5 @@ using System.Runtime.InteropServices;
|
||||||
// You can specify all the values or you can default the Revision and Build Numbers
|
// You can specify all the values or you can default the Revision and Build Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
|
|
||||||
[assembly : AssemblyVersion("0.6.4.*")]
|
[assembly : AssemblyVersion("0.6.5.*")]
|
||||||
[assembly : AssemblyFileVersion("1.0.0.0")]
|
[assembly : AssemblyFileVersion("0.6.5.0")]
|
||||||
|
|
|
@ -73,7 +73,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
|
||||||
// that has been running too long
|
// that has been running too long
|
||||||
public static MaintenanceThread m_MaintenanceThread;
|
public static MaintenanceThread m_MaintenanceThread;
|
||||||
|
|
||||||
public IConfigSource ConfigSource;
|
private IConfigSource m_ConfigSource;
|
||||||
public IConfig ScriptConfigSource;
|
public IConfig ScriptConfigSource;
|
||||||
private bool m_enabled = false;
|
private bool m_enabled = false;
|
||||||
|
|
||||||
|
@ -82,6 +82,11 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
|
||||||
get { return ScriptConfigSource; }
|
get { return ScriptConfigSource; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public IConfigSource ConfigSource
|
||||||
|
{
|
||||||
|
get { return m_ConfigSource; }
|
||||||
|
}
|
||||||
|
|
||||||
// How many seconds between re-reading config-file.
|
// How many seconds between re-reading config-file.
|
||||||
// 0 = never. ScriptEngine will try to adjust to new config changes.
|
// 0 = never. ScriptEngine will try to adjust to new config changes.
|
||||||
public int RefreshConfigFileSeconds {
|
public int RefreshConfigFileSeconds {
|
||||||
|
@ -119,7 +124,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
|
||||||
|
|
||||||
public void Initialise(IConfigSource config)
|
public void Initialise(IConfigSource config)
|
||||||
{
|
{
|
||||||
ConfigSource = config;
|
m_ConfigSource = config;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AddRegion(Scene Sceneworld)
|
public void AddRegion(Scene Sceneworld)
|
||||||
|
|
|
@ -80,6 +80,7 @@ namespace OpenSim.Region.ScriptEngine.Interfaces
|
||||||
void ApiResetScript(UUID itemID);
|
void ApiResetScript(UUID itemID);
|
||||||
void ResetScript(UUID itemID);
|
void ResetScript(UUID itemID);
|
||||||
IConfig Config { get; }
|
IConfig Config { get; }
|
||||||
|
IConfigSource ConfigSource { get; }
|
||||||
string ScriptEngineName { get; }
|
string ScriptEngineName { get; }
|
||||||
IScriptApi GetApi(UUID itemID, string name);
|
IScriptApi GetApi(UUID itemID, string name);
|
||||||
}
|
}
|
||||||
|
|
|
@ -7935,11 +7935,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
public void llSetObjectPermMask(int mask, int value)
|
public void llSetObjectPermMask(int mask, int value)
|
||||||
{
|
{
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
IConfigSource config = new IniConfigSource(Application.iniFilePath);
|
|
||||||
if (config.Configs["XEngine"] == null)
|
|
||||||
config.AddConfig("XEngine");
|
|
||||||
|
|
||||||
if (config.Configs["XEngine"].GetBoolean("AllowGodFunctions", false))
|
if (m_ScriptEngine.Config.GetBoolean("AllowGodFunctions", false))
|
||||||
{
|
{
|
||||||
if (World.Permissions.CanRunConsoleCommand(m_host.OwnerID))
|
if (World.Permissions.CanRunConsoleCommand(m_host.OwnerID))
|
||||||
{
|
{
|
||||||
|
@ -8947,7 +8944,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
Dictionary<string, string> httpHeaders = new Dictionary<string, string>();
|
Dictionary<string, string> httpHeaders = new Dictionary<string, string>();
|
||||||
|
|
||||||
string shard = "OpenSim";
|
string shard = "OpenSim";
|
||||||
IConfigSource config = new IniConfigSource(Application.iniFilePath);
|
IConfigSource config = m_ScriptEngine.ConfigSource;
|
||||||
if (config.Configs["Network"] != null)
|
if (config.Configs["Network"] != null)
|
||||||
{
|
{
|
||||||
shard
|
shard
|
||||||
|
|
|
@ -947,6 +947,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
|
||||||
"Line ({0}): {1}", scriptLine - 1,
|
"Line ({0}): {1}", scriptLine - 1,
|
||||||
e.InnerException.Message);
|
e.InnerException.Message);
|
||||||
|
|
||||||
|
System.Console.WriteLine(e.ToString()+"\n");
|
||||||
return message;
|
return message;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,6 +60,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
||||||
private int m_MaxScriptQueue;
|
private int m_MaxScriptQueue;
|
||||||
private Scene m_Scene;
|
private Scene m_Scene;
|
||||||
private IConfig m_ScriptConfig = null;
|
private IConfig m_ScriptConfig = null;
|
||||||
|
private IConfigSource m_ConfigSource = null;
|
||||||
private ICompiler m_Compiler;
|
private ICompiler m_Compiler;
|
||||||
private int m_MinThreads;
|
private int m_MinThreads;
|
||||||
private int m_MaxThreads ;
|
private int m_MaxThreads ;
|
||||||
|
@ -148,6 +149,11 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
||||||
get { return m_ScriptConfig; }
|
get { return m_ScriptConfig; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public IConfigSource ConfigSource
|
||||||
|
{
|
||||||
|
get { return m_ConfigSource; }
|
||||||
|
}
|
||||||
|
|
||||||
public event ScriptRemoved OnScriptRemoved;
|
public event ScriptRemoved OnScriptRemoved;
|
||||||
public event ObjectRemoved OnObjectRemoved;
|
public event ObjectRemoved OnObjectRemoved;
|
||||||
|
|
||||||
|
@ -160,6 +166,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_ScriptConfig = configSource.Configs["XEngine"];
|
m_ScriptConfig = configSource.Configs["XEngine"];
|
||||||
|
m_ConfigSource = configSource;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AddRegion(Scene scene)
|
public void AddRegion(Scene scene)
|
||||||
|
|
|
@ -386,7 +386,7 @@ namespace OpenSim.Region.UserStatistics
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void OnClientClosed(UUID agentID)
|
public void OnClientClosed(UUID agentID, Scene scene)
|
||||||
{
|
{
|
||||||
lock (m_sessions)
|
lock (m_sessions)
|
||||||
{
|
{
|
||||||
|
|
|
@ -31,6 +31,6 @@ using System.Runtime.InteropServices;
|
||||||
//
|
//
|
||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("0.6.4.*")]
|
// [assembly: AssemblyVersion("0.6.5.*")]
|
||||||
[assembly: AssemblyVersion("0.6.4.*")]
|
[assembly: AssemblyVersion("0.6.5.*")]
|
||||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
[assembly: AssemblyFileVersion("0.6.5.0")]
|
||||||
|
|
|
@ -31,6 +31,6 @@ using System.Runtime.InteropServices;
|
||||||
//
|
//
|
||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("0.6.4.*")]
|
// [assembly: AssemblyVersion("0.6.5.*")]
|
||||||
[assembly: AssemblyVersion("0.6.4.*")]
|
[assembly: AssemblyVersion("0.6.5.*")]
|
||||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
[assembly: AssemblyFileVersion("0.6.5.0")]
|
||||||
|
|
|
@ -31,6 +31,6 @@ using System.Runtime.InteropServices;
|
||||||
//
|
//
|
||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("0.6.4.*")]
|
// [assembly: AssemblyVersion("0.6.5.*")]
|
||||||
[assembly: AssemblyVersion("0.6.4.*")]
|
[assembly: AssemblyVersion("0.6.5.*")]
|
||||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
[assembly: AssemblyFileVersion("0.6.5.0")]
|
||||||
|
|
|
@ -31,6 +31,6 @@ using System.Runtime.InteropServices;
|
||||||
//
|
//
|
||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("0.6.4.*")]
|
// [assembly: AssemblyVersion("0.6.5.*")]
|
||||||
[assembly: AssemblyVersion("0.6.4.*")]
|
[assembly: AssemblyVersion("0.6.5.*")]
|
||||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
[assembly: AssemblyFileVersion("0.6.5.0")]
|
||||||
|
|
|
@ -31,6 +31,6 @@ using System.Runtime.InteropServices;
|
||||||
//
|
//
|
||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("0.6.4.*")]
|
// [assembly: AssemblyVersion("0.6.5.*")]
|
||||||
[assembly: AssemblyVersion("0.6.4.*")]
|
[assembly: AssemblyVersion("0.6.5.*")]
|
||||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
[assembly: AssemblyFileVersion("0.6.5.0")]
|
||||||
|
|
|
@ -31,6 +31,6 @@ using System.Runtime.InteropServices;
|
||||||
//
|
//
|
||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("0.6.4.*")]
|
// [assembly: AssemblyVersion("0.6.5.*")]
|
||||||
[assembly: AssemblyVersion("0.6.4.*")]
|
[assembly: AssemblyVersion("0.6.5.*")]
|
||||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
[assembly: AssemblyFileVersion("0.6.5.0")]
|
||||||
|
|
|
@ -31,6 +31,6 @@ using System.Runtime.InteropServices;
|
||||||
//
|
//
|
||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("0.6.4.*")]
|
// [assembly: AssemblyVersion("0.6.5.*")]
|
||||||
[assembly: AssemblyVersion("0.6.4.*")]
|
[assembly: AssemblyVersion("0.6.5.*")]
|
||||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
[assembly: AssemblyFileVersion("0.6.5.0")]
|
||||||
|
|
|
@ -31,6 +31,6 @@ using System.Runtime.InteropServices;
|
||||||
//
|
//
|
||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("0.6.4.*")]
|
// [assembly: AssemblyVersion("0.6.5.*")]
|
||||||
[assembly: AssemblyVersion("0.6.4.*")]
|
[assembly: AssemblyVersion("0.6.5.*")]
|
||||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
[assembly: AssemblyFileVersion("0.6.5.0")]
|
||||||
|
|
Loading…
Reference in New Issue