Compare commits

...

19 Commits

Author SHA1 Message Date
Melanie Thielker f6ba67f1a3 Backport r9921:
Allow "Take Copy" with copy only permissions if you own the object. Trans
is only required when taing an object you don't own, now.
2009-06-24 23:48:41 +00:00
Melanie Thielker 06b16c5b3a Backport the r9917 fix 2009-06-23 22:12:04 +00:00
Melanie Thielker 6de971a570 Adding the r9915 fix 2009-06-23 21:17:47 +00:00
Melanie Thielker e01270036a Backport the r9913 fix 2009-06-23 20:28:07 +00:00
Melanie Thielker 501df1ce2b Backport r9911 patch to stable 2009-06-23 14:38:28 +00:00
Melanie Thielker 3769785d3c Backport the group deed fix 2009-06-21 19:54:13 +00:00
Melanie Thielker 30a76861d4 Cause group deeding to apply next owner perms 2009-06-21 18:35:38 +00:00
Melanie Thielker 7375f3c273 Backporting group permissions to stable. 2009-06-21 18:07:19 +00:00
Melanie Thielker 2f581c0d0d When a shared module hooks OnClientClosed, it has no way of finding
out which client connection has closed. So, in multi-region sims, things
can get messy fast.
This introduces a second parameters, which is a Scene object ref. Minor
adjustments to custom modules may be required due to this change.
2009-06-19 20:51:56 +00:00
Melanie Thielker f8666f3630 Thank you, StrawberryFride, for a patch to port MSSQL fixes to stable 2009-06-11 13:20:32 +00:00
Melanie Thielker 2587170445 Fix a buglet in the last commit 2009-06-06 17:21:04 +00:00
Melanie Thielker be2ed074fa Backport the http request fix to stable 2009-06-06 16:52:58 +00:00
Adam Frisby b74cd49f7c * Applies r9674 to 0.6.5-post-fixes.
* This makes it compatible with the current MajorInterfaceVersion
2009-05-29 03:16:45 +00:00
lbsa71 4b0e34155d Turned 0.6.5-rc1 into 0.6.5-post-fixes 2009-05-25 11:32:02 +00:00
Melanie Thielker 5f4dc6fe61 Add the return object permissions fix 2009-05-24 18:26:25 +00:00
lbsa71 c4e4cd5931 * Re-applied r9613 to "Fix a slight oversight in SceneInventory that would not enable copy to
inventory when permissions are bypassed"
2009-05-20 13:07:52 +00:00
lbsa71 89e7dac649 * Ignored some gens 2009-05-20 09:11:20 +00:00
lbsa71 d217f1e9e7 * Updated version numbers to 0.6.5 2009-05-20 06:41:36 +00:00
lbsa71 319ad737bc Copied r9561 as base for the 0.6.5-rc1 2009-05-20 06:07:04 +00:00
59 changed files with 650 additions and 323 deletions

View File

@ -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")]

View File

@ -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")]

View File

@ -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";

View File

@ -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();
} }

View File

@ -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());
retval.AboutText = (string)reader["profileAboutText"]; if (reader.IsDBNull(reader.GetOrdinal("profileAboutText")))
retval.FirstLifeAboutText = (string)reader["profileFirstText"]; retval.AboutText = "";
else
retval.AboutText = (string)reader["profileAboutText"];
retval.Image = new UUID((Guid)reader["profileImage"]); if (reader.IsDBNull(reader.GetOrdinal("profileFirstText")))
retval.FirstLifeImage = new UUID((Guid)reader["profileFirstImage"]); retval.FirstLifeAboutText = "";
retval.WebLoginKey = new UUID((Guid)reader["webLoginKey"]); else
retval.FirstLifeAboutText = (string)reader["profileFirstText"];
if (reader.IsDBNull(reader.GetOrdinal("profileImage")))
retval.Image = UUID.Zero;
else
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"]);
if (reader.IsDBNull(reader.GetOrdinal("webLoginKey")))
retval.WebLoginKey = UUID.Zero;
else
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
{ {

View File

@ -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")]

View File

@ -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")]

View File

@ -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")]

View File

@ -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")]

View File

@ -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")]

View File

@ -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")]

View File

@ -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")]

View File

@ -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.*")]

View File

@ -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)

View File

@ -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>

View File

@ -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;
} }
} }

View File

@ -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")]

View File

@ -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")]

View File

@ -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;

View File

@ -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")]

View File

@ -3287,7 +3287,10 @@ 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;
objPropDB.OwnerID = OwnerID; if (OwnerID == GroupID)
objPropDB.OwnerID = UUID.Zero;
else
objPropDB.OwnerID = OwnerID;
objPropDB.GroupID = GroupID; objPropDB.GroupID = GroupID;
objPropDB.BaseMask = BaseMask; objPropDB.BaseMask = BaseMask;
objPropDB.OwnerMask = OwnerMask; objPropDB.OwnerMask = OwnerMask;
@ -3332,7 +3335,10 @@ 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;
proper.ObjectData[0].OwnerID = OwnerUUID; if (OwnerUUID == GroupUUID)
proper.ObjectData[0].OwnerID = UUID.Zero;
else
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;
proper.ObjectData[0].SitName = LLUtil.StringToPacketBytes(SitTitle); proper.ObjectData[0].SitName = LLUtil.StringToPacketBytes(SitTitle);
@ -8618,44 +8624,55 @@ 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);
GroupMembersReplyPacket groupMembersReply = (GroupMembersReplyPacket)PacketPool.Instance.GetPacket(PacketType.GroupMembersReply); int memberCount = members.Count;
groupMembersReply.AgentData = while (true)
new GroupMembersReplyPacket.AgentDataBlock();
groupMembersReply.GroupData =
new GroupMembersReplyPacket.GroupDataBlock();
groupMembersReply.MemberData =
new GroupMembersReplyPacket.MemberDataBlock[
members.Count];
groupMembersReply.AgentData.AgentID = AgentId;
groupMembersReply.GroupData.GroupID =
groupMembersRequestPacket.GroupData.GroupID;
groupMembersReply.GroupData.RequestID =
groupMembersRequestPacket.GroupData.RequestID;
groupMembersReply.GroupData.MemberCount = members.Count;
int i = 0;
foreach (GroupMembersData m in members)
{ {
groupMembersReply.MemberData[i] = int blockCount = members.Count;
new GroupMembersReplyPacket.MemberDataBlock(); if (blockCount > 40)
groupMembersReply.MemberData[i].AgentID = blockCount = 40;
m.AgentID;
groupMembersReply.MemberData[i].Contribution =
m.Contribution;
groupMembersReply.MemberData[i].OnlineStatus =
Utils.StringToBytes(m.OnlineStatus);
groupMembersReply.MemberData[i].AgentPowers =
m.AgentPowers;
groupMembersReply.MemberData[i].Title =
Utils.StringToBytes(m.Title);
groupMembersReply.MemberData[i].IsOwner =
m.IsOwner;
i++;
}
OutPacket(groupMembersReply, ThrottleOutPacketType.Task); GroupMembersReplyPacket groupMembersReply = (GroupMembersReplyPacket)PacketPool.Instance.GetPacket(PacketType.GroupMembersReply);
groupMembersReply.AgentData =
new GroupMembersReplyPacket.AgentDataBlock();
groupMembersReply.GroupData =
new GroupMembersReplyPacket.GroupDataBlock();
groupMembersReply.MemberData =
new GroupMembersReplyPacket.MemberDataBlock[
blockCount];
groupMembersReply.AgentData.AgentID = AgentId;
groupMembersReply.GroupData.GroupID =
groupMembersRequestPacket.GroupData.GroupID;
groupMembersReply.GroupData.RequestID =
groupMembersRequestPacket.GroupData.RequestID;
groupMembersReply.GroupData.MemberCount = memberCount;
for (int i = 0 ; i < blockCount ; i++)
{
GroupMembersData m = members[0];
members.RemoveAt(0);
groupMembersReply.MemberData[i] =
new GroupMembersReplyPacket.MemberDataBlock();
groupMembersReply.MemberData[i].AgentID =
m.AgentID;
groupMembersReply.MemberData[i].Contribution =
m.Contribution;
groupMembersReply.MemberData[i].OnlineStatus =
Utils.StringToBytes(m.OnlineStatus);
groupMembersReply.MemberData[i].AgentPowers =
m.AgentPowers;
groupMembersReply.MemberData[i].Title =
Utils.StringToBytes(m.Title);
groupMembersReply.MemberData[i].IsOwner =
m.IsOwner;
}
OutPacket(groupMembersReply, ThrottleOutPacketType.Task);
if (members.Count == 0)
break;
}
} }
break; break;
@ -8741,40 +8758,50 @@ namespace OpenSim.Region.ClientStack.LindenUDP
if (m_GroupsModule != null) if (m_GroupsModule != null)
{ {
GroupRoleMembersReplyPacket groupRoleMembersReply = (GroupRoleMembersReplyPacket)PacketPool.Instance.GetPacket(PacketType.GroupRoleMembersReply);
groupRoleMembersReply.AgentData =
new GroupRoleMembersReplyPacket.AgentDataBlock();
groupRoleMembersReply.AgentData.AgentID =
AgentId;
groupRoleMembersReply.AgentData.GroupID =
groupRoleMembersRequest.GroupData.GroupID;
groupRoleMembersReply.AgentData.RequestID =
groupRoleMembersRequest.GroupData.RequestID;
List<GroupRoleMembersData> mappings = List<GroupRoleMembersData> mappings =
m_GroupsModule.GroupRoleMembersRequest(this, m_GroupsModule.GroupRoleMembersRequest(this,
groupRoleMembersRequest.GroupData.GroupID); groupRoleMembersRequest.GroupData.GroupID);
groupRoleMembersReply.AgentData.TotalPairs = int mappingsCount = mappings.Count;
(uint)mappings.Count;
groupRoleMembersReply.MemberData = while (mappings.Count > 0)
new GroupRoleMembersReplyPacket.MemberDataBlock[mappings.Count];
int i = 0;
foreach (GroupRoleMembersData d in mappings)
{ {
groupRoleMembersReply.MemberData[i] = int pairs = mappings.Count;
new GroupRoleMembersReplyPacket.MemberDataBlock(); if (pairs > 32)
pairs = 32;
groupRoleMembersReply.MemberData[i].RoleID = GroupRoleMembersReplyPacket groupRoleMembersReply = (GroupRoleMembersReplyPacket)PacketPool.Instance.GetPacket(PacketType.GroupRoleMembersReply);
d.RoleID; groupRoleMembersReply.AgentData =
groupRoleMembersReply.MemberData[i].MemberID = new GroupRoleMembersReplyPacket.AgentDataBlock();
d.MemberID; groupRoleMembersReply.AgentData.AgentID =
i++; AgentId;
groupRoleMembersReply.AgentData.GroupID =
groupRoleMembersRequest.GroupData.GroupID;
groupRoleMembersReply.AgentData.RequestID =
groupRoleMembersRequest.GroupData.RequestID;
groupRoleMembersReply.AgentData.TotalPairs =
(uint)mappingsCount;
groupRoleMembersReply.MemberData =
new GroupRoleMembersReplyPacket.MemberDataBlock[pairs];
for (int i = 0 ; i < pairs ; i++)
{
GroupRoleMembersData d = mappings[0];
mappings.RemoveAt(0);
groupRoleMembersReply.MemberData[i] =
new GroupRoleMembersReplyPacket.MemberDataBlock();
groupRoleMembersReply.MemberData[i].RoleID =
d.RoleID;
groupRoleMembersReply.MemberData[i].MemberID =
d.MemberID;
}
OutPacket(groupRoleMembersReply, ThrottleOutPacketType.Task);
} }
OutPacket(groupRoleMembersReply, ThrottleOutPacketType.Task);
} }
break; break;

View File

@ -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")]

View File

@ -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")]

View File

@ -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

View File

@ -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)
{ {

View File

@ -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);

View File

@ -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);

View File

@ -856,7 +856,10 @@ namespace OpenSim.Region.CoreModules.World.Land
} }
foreach (List<SceneObjectGroup> ol in returns.Values) foreach (List<SceneObjectGroup> ol in returns.Values)
m_scene.returnObjects(ol.ToArray(), remote_client.AgentId); {
if (m_scene.Permissions.CanUseObjectReturn(this, type, remote_client, ol))
m_scene.returnObjects(ol.ToArray(), remote_client.AgentId);
}
} }
#endregion #endregion

View File

@ -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,17 +518,15 @@ 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 false; return ((part.OwnerMask & PERM_COPY) != 0);
if ((part.ParentGroup.GetEffectivePermissions() & PERM_COPY) == 0) if (part.GroupID != UUID.Zero)
return false; {
if ((part.OwnerID == part.GroupID) && ((owner != part.LastOwnerID) || ((part.GroupMask & PERM_TRANS) == 0)))
return false;
if ((part.GroupMask & PERM_COPY) == 0)
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)
return false; {
if (part.GroupID == UUID.Zero)
return false;
if ((part.OwnerMask & (uint)PermissionMask.Modify) == 0) 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)
return false; return false;
}
TaskInventoryItem ti = part.Inventory.GetInventoryItem(notecard); TaskInventoryItem ti = part.Inventory.GetInventoryItem(notecard);
@ -871,7 +973,13 @@ 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;
if( !IsGroupMember(ti.GroupID, user, 0) )
return false; return false;
}
// Require full perms // Require full perms
if ((ti.CurrentPermissions & if ((ti.CurrentPermissions &
@ -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)
@ -1141,7 +1246,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;
bool permission = GenericObjectPermission(userID, objectID,false); bool permission = GenericObjectPermission(userID, objectID, false);
if (!permission) if (!permission)
{ {
if (!m_scene.Entities.ContainsKey(objectID)) if (!m_scene.Entities.ContainsKey(objectID))
@ -1171,8 +1276,16 @@ namespace OpenSim.Region.CoreModules.World.Permissions
{ {
SceneObjectGroup task = (SceneObjectGroup)m_scene.Entities[objectID]; SceneObjectGroup task = (SceneObjectGroup)m_scene.Entities[objectID];
if ((task.GetEffectivePermissions() & (PERM_COPY | PERM_TRANS)) != (PERM_COPY | PERM_TRANS)) if (task.OwnerID != userID)
permission = false; {
if ((task.GetEffectivePermissions() & (PERM_COPY | PERM_TRANS)) != (PERM_COPY | PERM_TRANS))
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 ((part.OwnerMask & (uint)PermissionMask.Modify) == 0) if( !IsGroupMember(part.GroupID, user, 0) )
return false; return false;
if ((part.GroupMask & (uint)PermissionMask.Modify) == 0)
return false;
} else {
if ((part.OwnerMask & (uint)PermissionMask.Modify) == 0)
return false;
}
TaskInventoryItem ti = part.Inventory.GetInventoryItem(script); TaskInventoryItem ti = part.Inventory.GetInventoryItem(script);
@ -1288,7 +1410,13 @@ namespace OpenSim.Region.CoreModules.World.Permissions
return false; return false;
if (ti.OwnerID != user) if (ti.OwnerID != user)
return false; {
if (ti.GroupID == UUID.Zero)
return false;
if( !IsGroupMember(ti.GroupID, user, 0) )
return false;
}
// Require full perms // Require full perms
if ((ti.CurrentPermissions & if ((ti.CurrentPermissions &
@ -1355,7 +1483,13 @@ namespace OpenSim.Region.CoreModules.World.Permissions
return false; return false;
if (part.OwnerID != user) if (part.OwnerID != user)
return false; {
if (part.GroupID == UUID.Zero)
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,7 +1500,13 @@ namespace OpenSim.Region.CoreModules.World.Permissions
return false; return false;
if (ti.OwnerID != user) if (ti.OwnerID != user)
return false; {
if (ti.GroupID == UUID.Zero)
return false;
if( !IsGroupMember(ti.GroupID, user, 0) )
return false;
}
// Notecards are always readable unless no copy // Notecards are always readable unless no copy
// //
@ -1379,7 +1519,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
return true; return true;
} }
#endregion #endregion
private bool CanLinkObject(UUID userID, UUID objectID) private bool CanLinkObject(UUID userID, UUID objectID)
{ {
@ -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);
}
} }
} }

View File

@ -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;

View File

@ -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")]

View File

@ -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);

View File

@ -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);
} }
} }

View File

@ -1528,10 +1528,14 @@ namespace OpenSim.Region.Framework.Scenes
return; return;
if (part.OwnerID != remoteClient.AgentId) if (part.OwnerID != remoteClient.AgentId)
return; {
// Group permissions
if ((part.OwnerMask & (uint)PermissionMask.Modify) == 0) 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)
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)
return; {
// Group permissions
if ((destPart.OwnerMask & (uint)PermissionMask.Modify) == 0) if ( (destPart.GroupID == UUID.Zero) || (destPart.GroupID != srcPart.GroupID) ||
return; ((destPart.GroupMask & (uint)PermissionMask.Modify) == 0) )
return;
} else {
if ((destPart.OwnerMask & (uint)PermissionMask.Modify) == 0)
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))
return; {
if (ownerID != UUID.Zero)
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)
{
if (ownerID != UUID.Zero)
{ {
part.ParentGroup.SetOwnerId(ownerID); sog.SetOwnerId(ownerID);
part.Inventory.ChangeInventoryOwner(ownerID); sog.SetGroup(groupID, remoteClient);
part.ParentGroup.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);
} }
} }
} }

View File

@ -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;
}
} }
} }

View File

@ -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)
{ {

View File

@ -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")]

View File

@ -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.*")]

View File

@ -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.*")]

View File

@ -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.*")]

View File

@ -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.*")]

View File

@ -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.*")]

View File

@ -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.*")]

View File

@ -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>

View File

@ -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")]

View File

@ -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)

View File

@ -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);
} }

View File

@ -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

View File

@ -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;
} }
} }

View File

@ -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)

View File

@ -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)
{ {

View File

@ -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")]

View File

@ -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")]

View File

@ -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")]

View File

@ -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")]

View File

@ -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")]

View File

@ -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")]

View File

@ -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")]

View File

@ -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")]