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
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("0.6.4.*")]
|
||||
// [assembly: AssemblyVersion("0.6.5.*")]
|
||||
|
||||
[assembly : AssemblyVersion("0.6.4.*")]
|
||||
[assembly : AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly : AssemblyVersion("0.6.5.*")]
|
||||
[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
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("0.6.4.*")]
|
||||
[assembly: AssemblyVersion("0.6.4.*")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
// [assembly: AssemblyVersion("0.6.5.*")]
|
||||
[assembly: AssemblyVersion("0.6.5.*")]
|
||||
[assembly: AssemblyFileVersion("0.6.5.0")]
|
||||
|
|
|
@ -38,7 +38,7 @@ namespace OpenSim.Data.MSSQL
|
|||
/// <summary>
|
||||
/// A MSSQL Interface for the Asset server
|
||||
/// </summary>
|
||||
internal class MSSQLAssetData : AssetDataBase
|
||||
public class MSSQLAssetData : AssetDataBase
|
||||
{
|
||||
private const string _migrationStore = "AssetStore";
|
||||
|
||||
|
|
|
@ -108,7 +108,7 @@ namespace OpenSim.Data.MSSQL
|
|||
{
|
||||
cmd.Parameters.Add(_Database.CreateParameter("@RegionID", regionID));
|
||||
|
||||
using (IDataReader reader = cmd.ExecuteReader())
|
||||
using (SqlDataReader reader = cmd.ExecuteReader())
|
||||
{
|
||||
if (reader.Read())
|
||||
{
|
||||
|
@ -124,16 +124,11 @@ namespace OpenSim.Data.MSSQL
|
|||
}
|
||||
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);
|
||||
}
|
||||
else
|
||||
{
|
||||
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()));
|
||||
|
||||
//_Log.Debug("[DB ESTATE]: SQL: " + sql);
|
||||
using (SqlConnection connection = _Database.DatabaseConnection())
|
||||
{
|
||||
using (SqlCommand insertCommand = connection.CreateCommand())
|
||||
|
@ -163,28 +157,8 @@ namespace OpenSim.Data.MSSQL
|
|||
foreach (string name in names)
|
||||
{
|
||||
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);
|
||||
idParameter.Direction = ParameterDirection.Output;
|
||||
insertCommand.Parameters.Add(idParameter);
|
||||
|
@ -211,7 +185,6 @@ namespace OpenSim.Data.MSSQL
|
|||
}
|
||||
|
||||
// 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);
|
||||
using (AutoClosingSqlCommand cmd = _Database.Query(sql))
|
||||
|
@ -253,7 +226,7 @@ namespace OpenSim.Data.MSSQL
|
|||
|
||||
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)
|
||||
{
|
||||
sql += name + " = @" + name + ", ";
|
||||
|
@ -266,33 +239,8 @@ namespace OpenSim.Data.MSSQL
|
|||
foreach (string name in names)
|
||||
{
|
||||
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));
|
||||
// SqlParameter idParameter = new SqlParameter("@EstateID", SqlDbType.Int);
|
||||
// idParameter.Value = es.EstateID;
|
||||
// cmd.Parameters.Add(idParameter);
|
||||
|
||||
cmd.ExecuteNonQuery();
|
||||
}
|
||||
|
||||
|
|
|
@ -577,7 +577,6 @@ namespace OpenSim.Data.MSSQL
|
|||
/// <param name="appearance">the appearence</param>
|
||||
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;
|
||||
sql += "DELETE FROM avatarappearance WHERE owner=@owner ";
|
||||
sql += "INSERT INTO avatarappearance ";
|
||||
|
@ -1113,6 +1112,10 @@ ELSE
|
|||
retval.ID = new UUID((Guid)reader["UUID"]);
|
||||
retval.FirstName = (string)reader["username"];
|
||||
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.PasswordSalt = (string)reader["passwordSalt"];
|
||||
|
@ -1127,6 +1130,11 @@ ELSE
|
|||
Convert.ToSingle(reader["homeLookAtY"].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.LastLogin = Convert.ToInt32(reader["lastLogin"].ToString());
|
||||
|
||||
|
@ -1136,12 +1144,42 @@ ELSE
|
|||
retval.CanDoMask = Convert.ToUInt32(reader["profileCanDoMask"].ToString());
|
||||
retval.WantDoMask = Convert.ToUInt32(reader["profileWantDoMask"].ToString());
|
||||
|
||||
retval.AboutText = (string)reader["profileAboutText"];
|
||||
retval.FirstLifeAboutText = (string)reader["profileFirstText"];
|
||||
if (reader.IsDBNull(reader.GetOrdinal("profileAboutText")))
|
||||
retval.AboutText = "";
|
||||
else
|
||||
retval.AboutText = (string)reader["profileAboutText"];
|
||||
|
||||
retval.Image = new UUID((Guid)reader["profileImage"]);
|
||||
retval.FirstLifeImage = new UUID((Guid)reader["profileFirstImage"]);
|
||||
retval.WebLoginKey = new UUID((Guid)reader["webLoginKey"]);
|
||||
if (reader.IsDBNull(reader.GetOrdinal("profileFirstText")))
|
||||
retval.FirstLifeAboutText = "";
|
||||
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
|
||||
{
|
||||
|
|
|
@ -61,5 +61,5 @@ using System.Runtime.InteropServices;
|
|||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly : AssemblyVersion("0.6.4.*")]
|
||||
[assembly : AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly : AssemblyVersion("0.6.5.*")]
|
||||
[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
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly : AssemblyVersion("0.6.4.*")]
|
||||
[assembly : AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly : AssemblyVersion("0.6.5.*")]
|
||||
[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
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly : AssemblyVersion("0.6.4.*")]
|
||||
[assembly : AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly : AssemblyVersion("0.6.5.*")]
|
||||
[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
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly : AssemblyVersion("0.6.4.*")]
|
||||
[assembly : AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly : AssemblyVersion("0.6.5.*")]
|
||||
[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
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly : AssemblyVersion("0.6.4.*")]
|
||||
[assembly : AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly : AssemblyVersion("0.6.5.*")]
|
||||
[assembly : AssemblyFileVersion("0.6.5.0")]
|
||||
|
|
|
@ -59,5 +59,5 @@ using System.Runtime.InteropServices;
|
|||
// Revision
|
||||
//
|
||||
|
||||
[assembly : AssemblyVersion("0.6.4.*")]
|
||||
[assembly : AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly : AssemblyVersion("0.6.5.*")]
|
||||
[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
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly : AssemblyVersion("0.6.4.*")]
|
||||
[assembly : AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly : AssemblyVersion("0.6.5.*")]
|
||||
[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
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
protected string m_creatorId;
|
||||
|
||||
protected string m_creatorId = UUID.Zero.ToString();
|
||||
/// <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).
|
||||
///
|
||||
/// 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>
|
||||
public UUID CreatorIdAsUuid
|
||||
{
|
||||
get
|
||||
{
|
||||
UUID temp = UUID.Zero;
|
||||
UUID.TryParse(CreatorId, out temp);
|
||||
return temp;
|
||||
if (UUID.Zero == m_creatorIdAsUuid)
|
||||
{
|
||||
UUID.TryParse(CreatorId, out m_creatorIdAsUuid);
|
||||
}
|
||||
|
||||
return m_creatorIdAsUuid;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
CreatorId = value.ToString();
|
||||
m_creatorIdAsUuid = value;
|
||||
}
|
||||
}
|
||||
protected UUID m_creatorIdAsUuid = UUID.Zero;
|
||||
|
||||
/// <value>
|
||||
/// The description of the inventory item (must be less than 64 characters)
|
||||
|
|
|
@ -236,10 +236,6 @@ namespace OpenSim.Framework.Servers.HttpServer
|
|||
/// <summary>
|
||||
/// The operation to perform once trust has been established.
|
||||
/// </summary>
|
||||
/// <param name="httpMethod"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="method"></param>
|
||||
/// <param name="tmethod"></param>
|
||||
private RestDeserialiseMethod<TRequest, TResponse> m_method;
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -32,7 +32,7 @@ namespace OpenSim
|
|||
/// <value>
|
||||
/// This is the OpenSim version string. Change this if you are releasing a new OpenSim version.
|
||||
/// </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>
|
||||
/// 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.
|
||||
///
|
||||
/// </value>
|
||||
public readonly static int MajorInterfaceVersion = 3;
|
||||
public readonly static int MajorInterfaceVersion = 4;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -59,5 +59,5 @@ using System.Runtime.InteropServices;
|
|||
// Revision
|
||||
//
|
||||
|
||||
[assembly : AssemblyVersion("0.6.4.*")]
|
||||
[assembly : AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly : AssemblyVersion("0.6.5.*")]
|
||||
[assembly : AssemblyFileVersion("0.6.5.0")]
|
||||
|
|
|
@ -59,5 +59,5 @@ using System.Runtime.InteropServices;
|
|||
// Revision
|
||||
//
|
||||
|
||||
[assembly : AssemblyVersion("0.6.4.*")]
|
||||
[assembly : AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly : AssemblyVersion("0.6.5.*")]
|
||||
[assembly : AssemblyFileVersion("0.6.5.0")]
|
||||
|
|
|
@ -44,6 +44,8 @@ namespace OpenSim.Grid.InventoryServer
|
|||
/// </summary>
|
||||
public class GridInventoryService : InventoryServiceBase
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private bool m_doLookup = false;
|
||||
|
||||
public bool DoLookup
|
||||
|
@ -51,8 +53,7 @@ namespace OpenSim.Grid.InventoryServer
|
|||
get { return m_doLookup; }
|
||||
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 string m_userserver_url;
|
||||
|
|
|
@ -59,5 +59,5 @@ using System.Runtime.InteropServices;
|
|||
// Revision
|
||||
//
|
||||
|
||||
[assembly : AssemblyVersion("0.6.4.*")]
|
||||
[assembly : AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly : AssemblyVersion("0.6.5.*")]
|
||||
[assembly : AssemblyFileVersion("0.6.5.0")]
|
||||
|
|
|
@ -3287,7 +3287,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
ObjectPropertiesFamilyPacket.ObjectDataBlock objPropDB = new ObjectPropertiesFamilyPacket.ObjectDataBlock();
|
||||
objPropDB.RequestFlags = RequestFlags;
|
||||
objPropDB.ObjectID = ObjectUUID;
|
||||
objPropDB.OwnerID = OwnerID;
|
||||
if (OwnerID == GroupID)
|
||||
objPropDB.OwnerID = UUID.Zero;
|
||||
else
|
||||
objPropDB.OwnerID = OwnerID;
|
||||
objPropDB.GroupID = GroupID;
|
||||
objPropDB.BaseMask = BaseMask;
|
||||
objPropDB.OwnerMask = OwnerMask;
|
||||
|
@ -3332,7 +3335,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
// proper.ObjectData[0].LastOwnerID = UUID.Zero;
|
||||
|
||||
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].TextureID = TextureID;
|
||||
proper.ObjectData[0].SitName = LLUtil.StringToPacketBytes(SitTitle);
|
||||
|
@ -8618,44 +8624,55 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
List<GroupMembersData> members =
|
||||
m_GroupsModule.GroupMembersRequest(this, groupMembersRequestPacket.GroupData.GroupID);
|
||||
|
||||
GroupMembersReplyPacket groupMembersReply = (GroupMembersReplyPacket)PacketPool.Instance.GetPacket(PacketType.GroupMembersReply);
|
||||
int memberCount = members.Count;
|
||||
|
||||
groupMembersReply.AgentData =
|
||||
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)
|
||||
while (true)
|
||||
{
|
||||
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;
|
||||
i++;
|
||||
}
|
||||
int blockCount = members.Count;
|
||||
if (blockCount > 40)
|
||||
blockCount = 40;
|
||||
|
||||
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;
|
||||
|
||||
|
@ -8741,40 +8758,50 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
|
||||
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 =
|
||||
m_GroupsModule.GroupRoleMembersRequest(this,
|
||||
groupRoleMembersRequest.GroupData.GroupID);
|
||||
m_GroupsModule.GroupRoleMembersRequest(this,
|
||||
groupRoleMembersRequest.GroupData.GroupID);
|
||||
|
||||
groupRoleMembersReply.AgentData.TotalPairs =
|
||||
(uint)mappings.Count;
|
||||
int mappingsCount = mappings.Count;
|
||||
|
||||
groupRoleMembersReply.MemberData =
|
||||
new GroupRoleMembersReplyPacket.MemberDataBlock[mappings.Count];
|
||||
|
||||
int i = 0;
|
||||
foreach (GroupRoleMembersData d in mappings)
|
||||
while (mappings.Count > 0)
|
||||
{
|
||||
groupRoleMembersReply.MemberData[i] =
|
||||
new GroupRoleMembersReplyPacket.MemberDataBlock();
|
||||
int pairs = mappings.Count;
|
||||
if (pairs > 32)
|
||||
pairs = 32;
|
||||
|
||||
groupRoleMembersReply.MemberData[i].RoleID =
|
||||
d.RoleID;
|
||||
groupRoleMembersReply.MemberData[i].MemberID =
|
||||
d.MemberID;
|
||||
i++;
|
||||
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;
|
||||
|
||||
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;
|
||||
|
||||
|
|
|
@ -61,5 +61,5 @@ using System.Runtime.InteropServices;
|
|||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly : AssemblyVersion("0.6.4.*")]
|
||||
[assembly : AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly : AssemblyVersion("0.6.5.*")]
|
||||
[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
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly : AssemblyVersion("0.6.4.*")]
|
||||
[assembly : AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly : AssemblyVersion("0.6.5.*")]
|
||||
[assembly : AssemblyFileVersion("0.6.5.0")]
|
||||
|
|
|
@ -381,7 +381,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
|||
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
|
||||
// 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);
|
||||
}
|
||||
|
||||
private void OnClientClosed(UUID agentID)
|
||||
private void OnClientClosed(UUID agentID, Scene scene)
|
||||
{
|
||||
lock (m_ClientMap)
|
||||
{
|
||||
|
|
|
@ -368,7 +368,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
|
|||
return false;
|
||||
}
|
||||
|
||||
public void ClientLoggedOut(UUID agentID)
|
||||
public void ClientLoggedOut(UUID agentID, Scene scene)
|
||||
{
|
||||
if (m_AgentRegions.ContainsKey(agentID))
|
||||
m_AgentRegions.Remove(agentID);
|
||||
|
|
|
@ -198,7 +198,7 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue
|
|||
// 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);
|
||||
|
||||
|
|
|
@ -856,7 +856,10 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
}
|
||||
|
||||
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
|
||||
|
|
|
@ -36,6 +36,56 @@ using OpenSim.Framework.Communications.Cache;
|
|||
using OpenSim.Region.Framework.Interfaces;
|
||||
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
|
||||
{
|
||||
public class PermissionsModule : IRegionModule
|
||||
|
@ -129,6 +179,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
|||
m_scene.Permissions.OnAbandonParcel += CanAbandonParcel;
|
||||
m_scene.Permissions.OnReclaimParcel += CanReclaimParcel;
|
||||
m_scene.Permissions.OnDeedParcel += CanDeedParcel;
|
||||
m_scene.Permissions.OnDeedObject += CanDeedObject;
|
||||
m_scene.Permissions.OnIsGod += IsGod;
|
||||
m_scene.Permissions.OnDuplicateObject += CanDuplicateObject;
|
||||
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.OnTeleport += CanTeleport; //NOT YET IMPLEMENTED
|
||||
m_scene.Permissions.OnUseObjectReturn += CanUseObjectReturn; //NOT YET IMPLEMENTED
|
||||
|
||||
m_scene.AddCommand(this, "bypass permissions",
|
||||
"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);
|
||||
}
|
||||
|
||||
// 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>
|
||||
/// Parse a user set configuration setting
|
||||
/// </summary>
|
||||
|
@ -330,6 +392,8 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
|||
/// <returns></returns>
|
||||
protected bool IsAdministrator(UUID user)
|
||||
{
|
||||
if (user == UUID.Zero) return false;
|
||||
|
||||
if (m_scene.RegionInfo.MasterAvatarAssignedUUID != UUID.Zero)
|
||||
{
|
||||
if (m_RegionOwnerIsGod && (m_scene.RegionInfo.MasterAvatarAssignedUUID == user))
|
||||
|
@ -350,10 +414,6 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
|||
if (profile.UserProfile.GodLevel >= 200)
|
||||
return true;
|
||||
}
|
||||
//else
|
||||
//{
|
||||
// m_log.ErrorFormat("[PERMISSIONS]: Could not find user {0} for administrator check", user);
|
||||
//}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -361,6 +421,8 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
|||
|
||||
protected bool IsEstateManager(UUID user)
|
||||
{
|
||||
if (user == UUID.Zero) return false;
|
||||
|
||||
return m_scene.RegionInfo.EstateSettings.IsEstateManager(user);
|
||||
}
|
||||
#endregion
|
||||
|
@ -432,36 +494,20 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
|||
objectOwnerMask |= (uint)PrimFlags.ObjectYouOwner | (uint)PrimFlags.ObjectAnyOwner | (uint)PrimFlags.ObjectOwnerModify;
|
||||
|
||||
// Customize the GroupMask
|
||||
// uint objectGroupMask = ApplyObjectModifyMasks(task.GroupMask, objflags);
|
||||
uint objectGroupMask = ApplyObjectModifyMasks(task.GroupMask, objflags);
|
||||
|
||||
// Customize the EveryoneMask
|
||||
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)
|
||||
return objectOwnerMask;
|
||||
|
||||
// Object owners should be able to edit their own content
|
||||
if (user == objectOwner)
|
||||
{
|
||||
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
|
||||
if (IsEstateManager(user) && m_RegionOwnerIsGod && (!IsAdministrator(objectOwner)))
|
||||
if (IsEstateManager(user) && m_RegionOwnerIsGod && !IsAdministrator(objectOwner))
|
||||
return objectOwnerMask;
|
||||
|
||||
// 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);
|
||||
if (parcel != null && parcel.landData.OwnerID == user && m_ParcelOwnerIsGod)
|
||||
{
|
||||
uint responseMask = objectOwnerMask;
|
||||
|
||||
// Admin objects should not be editable by the above
|
||||
if (IsAdministrator(objectOwner))
|
||||
{
|
||||
responseMask = objectEveryoneMask;
|
||||
}
|
||||
|
||||
return responseMask;
|
||||
if (!IsAdministrator(objectOwner))
|
||||
return objectOwnerMask;
|
||||
}
|
||||
|
||||
// Group permissions
|
||||
if ( ( task.GroupID != UUID.Zero) && IsGroupMember(task.GroupID, user, 0) )
|
||||
return objectGroupMask;
|
||||
|
||||
return objectEveryoneMask;
|
||||
}
|
||||
|
||||
|
@ -566,6 +610,13 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
|||
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.
|
||||
ILandObject parcel = m_scene.LandChannel.GetLandObject(group.AbsolutePosition.X, group.AbsolutePosition.Y);
|
||||
if ((parcel != null) && (parcel.landData.OwnerID == currentUser))
|
||||
|
@ -632,7 +683,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
|||
return permission;
|
||||
}
|
||||
|
||||
protected bool GenericParcelPermission(UUID user, ILandObject parcel)
|
||||
protected bool GenericParcelPermission(UUID user, ILandObject parcel, ulong groupPowers)
|
||||
{
|
||||
bool permission = false;
|
||||
|
||||
|
@ -641,9 +692,9 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
|||
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))
|
||||
|
@ -659,11 +710,38 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
|||
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);
|
||||
if (parcel == null) return false;
|
||||
return GenericParcelPermission(user, parcel);
|
||||
return GenericParcelPermission(user, parcel, groupPowers);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
@ -673,7 +751,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
|||
DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
|
||||
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)
|
||||
|
@ -681,7 +759,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
|||
DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
|
||||
if (m_bypassPermissions) return m_bypassPermissionsValue;
|
||||
|
||||
return GenericParcelPermission(user, parcel);
|
||||
return GenericParcelOwnerPermission(user, parcel, 0);
|
||||
}
|
||||
|
||||
private bool CanDeedParcel(UUID user, ILandObject parcel, Scene scene)
|
||||
|
@ -695,10 +773,24 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
|||
ScenePresence sp = scene.GetScenePresence(user);
|
||||
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 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)
|
||||
|
@ -724,11 +816,17 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
|||
if (part == null)
|
||||
return false;
|
||||
|
||||
if ((part.OwnerMask & PERM_COPY) == 0)
|
||||
return false;
|
||||
if (part.OwnerID == owner)
|
||||
return ((part.OwnerMask & PERM_COPY) != 0);
|
||||
|
||||
if ((part.ParentGroup.GetEffectivePermissions() & PERM_COPY) == 0)
|
||||
return false;
|
||||
if (part.GroupID != UUID.Zero)
|
||||
{
|
||||
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
|
||||
return CanRezObject(objectCount, owner, objectPosition, scene);
|
||||
|
@ -766,11 +864,6 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
|||
part = m_scene.GetSceneObjectPart(objectID);
|
||||
}
|
||||
|
||||
// TODO: add group support!
|
||||
//
|
||||
if (part.OwnerID != editorID)
|
||||
return false;
|
||||
|
||||
return GenericObjectPermission(editorID, objectID, false);
|
||||
}
|
||||
|
||||
|
@ -779,7 +872,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
|||
DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
|
||||
if (m_bypassPermissions) return m_bypassPermissionsValue;
|
||||
|
||||
return GenericParcelPermission(user, parcel);
|
||||
return GenericParcelOwnerPermission(user, parcel, (ulong)GroupPowers.LandDivideJoin);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -860,10 +953,19 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
|||
return false;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
TaskInventoryItem ti = part.Inventory.GetInventoryItem(notecard);
|
||||
|
||||
|
@ -871,7 +973,13 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
|||
return false;
|
||||
|
||||
if (ti.OwnerID != user)
|
||||
{
|
||||
if (ti.GroupID == UUID.Zero)
|
||||
return false;
|
||||
|
||||
if( !IsGroupMember(ti.GroupID, user, 0) )
|
||||
return false;
|
||||
}
|
||||
|
||||
// Require full perms
|
||||
if ((ti.CurrentPermissions &
|
||||
|
@ -1043,8 +1151,6 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
|||
return true;
|
||||
}
|
||||
|
||||
//TODO: check for group rights
|
||||
|
||||
if (!m_scene.Entities.ContainsKey(objectID))
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
@ -1088,14 +1194,13 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
|||
(int)Parcel.ParcelFlags.CreateObjects)
|
||||
permission = true;
|
||||
|
||||
//TODO: check for group rights
|
||||
|
||||
if (IsAdministrator(owner))
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
@ -1125,7 +1230,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
|||
DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
|
||||
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)
|
||||
|
@ -1141,7 +1246,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
|||
DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
|
||||
if (m_bypassPermissions) return m_bypassPermissionsValue;
|
||||
|
||||
bool permission = GenericObjectPermission(userID, objectID,false);
|
||||
bool permission = GenericObjectPermission(userID, objectID, false);
|
||||
if (!permission)
|
||||
{
|
||||
if (!m_scene.Entities.ContainsKey(objectID))
|
||||
|
@ -1171,8 +1276,16 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
|||
{
|
||||
SceneObjectGroup task = (SceneObjectGroup)m_scene.Entities[objectID];
|
||||
|
||||
if ((task.GetEffectivePermissions() & (PERM_COPY | PERM_TRANS)) != (PERM_COPY | PERM_TRANS))
|
||||
permission = false;
|
||||
if (task.OwnerID != userID)
|
||||
{
|
||||
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;
|
||||
|
@ -1208,7 +1321,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
|||
return true;
|
||||
|
||||
// Land owner can terraform too
|
||||
if (parcel != null && GenericParcelPermission(user, parcel))
|
||||
if (parcel != null && GenericParcelPermission(user, parcel, (ulong)GroupPowers.AllowEditLand))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
@ -1277,10 +1390,19 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
|||
return false;
|
||||
|
||||
if (part.OwnerID != user)
|
||||
{
|
||||
if (part.GroupID == UUID.Zero)
|
||||
return false;
|
||||
|
||||
if ((part.OwnerMask & (uint)PermissionMask.Modify) == 0)
|
||||
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)
|
||||
return false;
|
||||
}
|
||||
|
||||
TaskInventoryItem ti = part.Inventory.GetInventoryItem(script);
|
||||
|
||||
|
@ -1288,7 +1410,13 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
|||
return false;
|
||||
|
||||
if (ti.OwnerID != user)
|
||||
return false;
|
||||
{
|
||||
if (ti.GroupID == UUID.Zero)
|
||||
return false;
|
||||
|
||||
if( !IsGroupMember(ti.GroupID, user, 0) )
|
||||
return false;
|
||||
}
|
||||
|
||||
// Require full perms
|
||||
if ((ti.CurrentPermissions &
|
||||
|
@ -1355,7 +1483,13 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
|||
return false;
|
||||
|
||||
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)
|
||||
return false;
|
||||
|
@ -1366,7 +1500,13 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
|||
return false;
|
||||
|
||||
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
|
||||
//
|
||||
|
@ -1379,7 +1519,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
|||
return true;
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
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
|
||||
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
|
||||
/// </summary>
|
||||
/// <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();
|
||||
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
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("0.6.4.*")]
|
||||
[assembly: AssemblyVersion("0.6.4.*")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
// [assembly: AssemblyVersion("0.6.5.*")]
|
||||
[assembly: AssemblyVersion("0.6.5.*")]
|
||||
[assembly: AssemblyFileVersion("0.6.5.0")]
|
||||
|
|
|
@ -30,8 +30,10 @@ using OpenMetaverse;
|
|||
|
||||
namespace OpenSim.Region.Framework.Interfaces
|
||||
{
|
||||
|
||||
public interface IDynamicTextureManager
|
||||
{
|
||||
|
||||
void RegisterRender(string handleType, IDynamicTextureRender render);
|
||||
void ReturnData(UUID id, byte[] data);
|
||||
|
||||
|
|
|
@ -162,7 +162,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
|
||||
public event IncomingInstantMessage OnUnhandledInstantMessage;
|
||||
|
||||
public delegate void ClientClosed(UUID clientID);
|
||||
public delegate void ClientClosed(UUID clientID, Scene scene);
|
||||
|
||||
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;
|
||||
if (handlerClientClosed != null)
|
||||
{
|
||||
handlerClientClosed(ClientID);
|
||||
handlerClientClosed(ClientID, scene);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1528,10 +1528,14 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
return;
|
||||
|
||||
if (part.OwnerID != remoteClient.AgentId)
|
||||
return;
|
||||
|
||||
if ((part.OwnerMask & (uint)PermissionMask.Modify) == 0)
|
||||
return;
|
||||
{
|
||||
// Group permissions
|
||||
if ( (part.GroupID == UUID.Zero) || (remoteClient.GetGroupPowers(part.GroupID) == 0) || ((part.GroupMask & (uint)PermissionMask.Modify) == 0) )
|
||||
return;
|
||||
} else {
|
||||
if ((part.OwnerMask & (uint)PermissionMask.Modify) == 0)
|
||||
return;
|
||||
}
|
||||
|
||||
if (!Permissions.CanCreateObjectInventory(
|
||||
itemBase.InvType, part.UUID, remoteClient.AgentId))
|
||||
|
@ -1603,10 +1607,15 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
|
||||
// Must own the object, and have modify rights
|
||||
if (srcPart.OwnerID != destPart.OwnerID)
|
||||
return;
|
||||
|
||||
if ((destPart.OwnerMask & (uint)PermissionMask.Modify) == 0)
|
||||
return;
|
||||
{
|
||||
// Group permissions
|
||||
if ( (destPart.GroupID == UUID.Zero) || (destPart.GroupID != srcPart.GroupID) ||
|
||||
((destPart.GroupMask & (uint)PermissionMask.Modify) == 0) )
|
||||
return;
|
||||
} else {
|
||||
if ((destPart.OwnerMask & (uint)PermissionMask.Modify) == 0)
|
||||
return;
|
||||
}
|
||||
|
||||
if (destPart.ScriptAccessPin != pin)
|
||||
{
|
||||
|
@ -2262,6 +2271,12 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
itemId = item.ID;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Brave new fullperm world
|
||||
//
|
||||
itemId = item.ID;
|
||||
}
|
||||
|
||||
string xmlData = Utils.BytesToString(rezAsset.Data);
|
||||
SceneObjectGroup group
|
||||
|
@ -2669,17 +2684,56 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
void ObjectOwner(IClientAPI remoteClient, UUID ownerID, UUID groupID, List<uint> localIDs)
|
||||
{
|
||||
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)
|
||||
{
|
||||
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);
|
||||
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 ReclaimParcelHandler(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 LinkObjectHandler(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 DeleteUserInventoryHandler(UUID itemID, UUID userID);
|
||||
public delegate bool TeleportHandler(UUID userID, Scene scene);
|
||||
public delegate bool UseObjectReturnHandler(ILandObject landData, uint type, IClientAPI client, List<SceneObjectGroup> retlist, Scene scene);
|
||||
#endregion
|
||||
|
||||
public class ScenePermissions
|
||||
|
@ -124,6 +126,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
public event AbandonParcelHandler OnAbandonParcel;
|
||||
public event ReclaimParcelHandler OnReclaimParcel;
|
||||
public event DeedParcelHandler OnDeedParcel;
|
||||
public event DeedObjectHandler OnDeedObject;
|
||||
public event BuyLandHandler OnBuyLand;
|
||||
public event LinkObjectHandler OnLinkObject;
|
||||
public event DelinkObjectHandler OnDelinkObject;
|
||||
|
@ -135,6 +138,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
public event CopyUserInventoryHandler OnCopyUserInventory;
|
||||
public event DeleteUserInventoryHandler OnDeleteUserInventory;
|
||||
public event TeleportHandler OnTeleport;
|
||||
public event UseObjectReturnHandler OnUseObjectReturn;
|
||||
#endregion
|
||||
|
||||
#region Object Permission Checks
|
||||
|
@ -713,6 +717,21 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
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)
|
||||
{
|
||||
BuyLandHandler handler = OnBuyLand;
|
||||
|
@ -910,5 +929,20 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
}
|
||||
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_eventManager.TriggerClientClosed(agentID);
|
||||
m_eventManager.TriggerClientClosed(agentID, this);
|
||||
}
|
||||
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
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("0.6.4.*")]
|
||||
[assembly: AssemblyVersion("0.6.4.*")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
// [assembly: AssemblyVersion("0.6.5.*")]
|
||||
[assembly: AssemblyVersion("0.6.5.*")]
|
||||
[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
|
||||
// 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
|
||||
// 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
|
||||
// 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
|
||||
// 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
|
||||
// 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
|
||||
// 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.
|
||||
/// </summary>
|
||||
/// <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.
|
||||
/// </summary>
|
||||
/// <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>
|
||||
public void ClientClosed(IClientAPI client)
|
||||
{
|
||||
ClientClosed(client.AgentId);
|
||||
ClientClosed(client.AgentId, null);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -61,5 +61,5 @@ using System.Runtime.InteropServices;
|
|||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly : AssemblyVersion("0.6.4.*")]
|
||||
[assembly : AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly : AssemblyVersion("0.6.5.*")]
|
||||
[assembly : AssemblyFileVersion("0.6.5.0")]
|
||||
|
|
|
@ -73,7 +73,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
|
|||
// that has been running too long
|
||||
public static MaintenanceThread m_MaintenanceThread;
|
||||
|
||||
public IConfigSource ConfigSource;
|
||||
private IConfigSource m_ConfigSource;
|
||||
public IConfig ScriptConfigSource;
|
||||
private bool m_enabled = false;
|
||||
|
||||
|
@ -82,6 +82,11 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
|
|||
get { return ScriptConfigSource; }
|
||||
}
|
||||
|
||||
public IConfigSource ConfigSource
|
||||
{
|
||||
get { return m_ConfigSource; }
|
||||
}
|
||||
|
||||
// How many seconds between re-reading config-file.
|
||||
// 0 = never. ScriptEngine will try to adjust to new config changes.
|
||||
public int RefreshConfigFileSeconds {
|
||||
|
@ -119,7 +124,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
|
|||
|
||||
public void Initialise(IConfigSource config)
|
||||
{
|
||||
ConfigSource = config;
|
||||
m_ConfigSource = config;
|
||||
}
|
||||
|
||||
public void AddRegion(Scene Sceneworld)
|
||||
|
|
|
@ -80,6 +80,7 @@ namespace OpenSim.Region.ScriptEngine.Interfaces
|
|||
void ApiResetScript(UUID itemID);
|
||||
void ResetScript(UUID itemID);
|
||||
IConfig Config { get; }
|
||||
IConfigSource ConfigSource { get; }
|
||||
string ScriptEngineName { get; }
|
||||
IScriptApi GetApi(UUID itemID, string name);
|
||||
}
|
||||
|
|
|
@ -7935,11 +7935,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
public void llSetObjectPermMask(int mask, int value)
|
||||
{
|
||||
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))
|
||||
{
|
||||
|
@ -8947,7 +8944,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
Dictionary<string, string> httpHeaders = new Dictionary<string, string>();
|
||||
|
||||
string shard = "OpenSim";
|
||||
IConfigSource config = new IniConfigSource(Application.iniFilePath);
|
||||
IConfigSource config = m_ScriptEngine.ConfigSource;
|
||||
if (config.Configs["Network"] != null)
|
||||
{
|
||||
shard
|
||||
|
|
|
@ -947,6 +947,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
|
|||
"Line ({0}): {1}", scriptLine - 1,
|
||||
e.InnerException.Message);
|
||||
|
||||
System.Console.WriteLine(e.ToString()+"\n");
|
||||
return message;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -60,6 +60,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
|||
private int m_MaxScriptQueue;
|
||||
private Scene m_Scene;
|
||||
private IConfig m_ScriptConfig = null;
|
||||
private IConfigSource m_ConfigSource = null;
|
||||
private ICompiler m_Compiler;
|
||||
private int m_MinThreads;
|
||||
private int m_MaxThreads ;
|
||||
|
@ -148,6 +149,11 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
|||
get { return m_ScriptConfig; }
|
||||
}
|
||||
|
||||
public IConfigSource ConfigSource
|
||||
{
|
||||
get { return m_ConfigSource; }
|
||||
}
|
||||
|
||||
public event ScriptRemoved OnScriptRemoved;
|
||||
public event ObjectRemoved OnObjectRemoved;
|
||||
|
||||
|
@ -160,6 +166,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
|||
return;
|
||||
|
||||
m_ScriptConfig = configSource.Configs["XEngine"];
|
||||
m_ConfigSource = configSource;
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
|
|
|
@ -31,6 +31,6 @@ using System.Runtime.InteropServices;
|
|||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("0.6.4.*")]
|
||||
[assembly: AssemblyVersion("0.6.4.*")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
// [assembly: AssemblyVersion("0.6.5.*")]
|
||||
[assembly: AssemblyVersion("0.6.5.*")]
|
||||
[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
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("0.6.4.*")]
|
||||
[assembly: AssemblyVersion("0.6.4.*")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
// [assembly: AssemblyVersion("0.6.5.*")]
|
||||
[assembly: AssemblyVersion("0.6.5.*")]
|
||||
[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
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("0.6.4.*")]
|
||||
[assembly: AssemblyVersion("0.6.4.*")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
// [assembly: AssemblyVersion("0.6.5.*")]
|
||||
[assembly: AssemblyVersion("0.6.5.*")]
|
||||
[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
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("0.6.4.*")]
|
||||
[assembly: AssemblyVersion("0.6.4.*")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
// [assembly: AssemblyVersion("0.6.5.*")]
|
||||
[assembly: AssemblyVersion("0.6.5.*")]
|
||||
[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
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("0.6.4.*")]
|
||||
[assembly: AssemblyVersion("0.6.4.*")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
// [assembly: AssemblyVersion("0.6.5.*")]
|
||||
[assembly: AssemblyVersion("0.6.5.*")]
|
||||
[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
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("0.6.4.*")]
|
||||
[assembly: AssemblyVersion("0.6.4.*")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
// [assembly: AssemblyVersion("0.6.5.*")]
|
||||
[assembly: AssemblyVersion("0.6.5.*")]
|
||||
[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
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("0.6.4.*")]
|
||||
[assembly: AssemblyVersion("0.6.4.*")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
// [assembly: AssemblyVersion("0.6.5.*")]
|
||||
[assembly: AssemblyVersion("0.6.5.*")]
|
||||
[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
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("0.6.4.*")]
|
||||
[assembly: AssemblyVersion("0.6.4.*")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
// [assembly: AssemblyVersion("0.6.5.*")]
|
||||
[assembly: AssemblyVersion("0.6.5.*")]
|
||||
[assembly: AssemblyFileVersion("0.6.5.0")]
|
||||
|
|
Loading…
Reference in New Issue