diff options
31 files changed, 683 insertions, 87 deletions
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs index 3a4f729..7b931d7 100644 --- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs +++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs | |||
@@ -1702,6 +1702,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1702 | destinationItem.InvType = item.InvType; | 1702 | destinationItem.InvType = item.InvType; |
1703 | destinationItem.CreatorId = item.CreatorId; | 1703 | destinationItem.CreatorId = item.CreatorId; |
1704 | destinationItem.CreatorIdAsUuid = item.CreatorIdAsUuid; | 1704 | destinationItem.CreatorIdAsUuid = item.CreatorIdAsUuid; |
1705 | destinationItem.CreatorData = item.CreatorData; | ||
1705 | destinationItem.NextPermissions = item.NextPermissions; | 1706 | destinationItem.NextPermissions = item.NextPermissions; |
1706 | destinationItem.CurrentPermissions = item.CurrentPermissions; | 1707 | destinationItem.CurrentPermissions = item.CurrentPermissions; |
1707 | destinationItem.BasePermissions = item.BasePermissions; | 1708 | destinationItem.BasePermissions = item.BasePermissions; |
@@ -1754,6 +1755,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1754 | destinationItem.InvType = item.InvType; | 1755 | destinationItem.InvType = item.InvType; |
1755 | destinationItem.CreatorId = item.CreatorId; | 1756 | destinationItem.CreatorId = item.CreatorId; |
1756 | destinationItem.CreatorIdAsUuid = item.CreatorIdAsUuid; | 1757 | destinationItem.CreatorIdAsUuid = item.CreatorIdAsUuid; |
1758 | destinationItem.CreatorData = item.CreatorData; | ||
1757 | destinationItem.NextPermissions = item.NextPermissions; | 1759 | destinationItem.NextPermissions = item.NextPermissions; |
1758 | destinationItem.CurrentPermissions = item.CurrentPermissions; | 1760 | destinationItem.CurrentPermissions = item.CurrentPermissions; |
1759 | destinationItem.BasePermissions = item.BasePermissions; | 1761 | destinationItem.BasePermissions = item.BasePermissions; |
@@ -1861,6 +1863,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1861 | destinationItem.InvType = item.InvType; | 1863 | destinationItem.InvType = item.InvType; |
1862 | destinationItem.CreatorId = item.CreatorId; | 1864 | destinationItem.CreatorId = item.CreatorId; |
1863 | destinationItem.CreatorIdAsUuid = item.CreatorIdAsUuid; | 1865 | destinationItem.CreatorIdAsUuid = item.CreatorIdAsUuid; |
1866 | destinationItem.CreatorData = item.CreatorData; | ||
1864 | destinationItem.NextPermissions = item.NextPermissions; | 1867 | destinationItem.NextPermissions = item.NextPermissions; |
1865 | destinationItem.CurrentPermissions = item.CurrentPermissions; | 1868 | destinationItem.CurrentPermissions = item.CurrentPermissions; |
1866 | destinationItem.BasePermissions = item.BasePermissions; | 1869 | destinationItem.BasePermissions = item.BasePermissions; |
@@ -2144,7 +2147,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
2144 | inventoryItem.InvType = GetIntegerAttribute(item,"invtype",-1); | 2147 | inventoryItem.InvType = GetIntegerAttribute(item,"invtype",-1); |
2145 | inventoryItem.CreatorId = GetStringAttribute(item,"creatorid",""); | 2148 | inventoryItem.CreatorId = GetStringAttribute(item,"creatorid",""); |
2146 | inventoryItem.CreatorIdAsUuid = (UUID)GetStringAttribute(item,"creatoruuid",""); | 2149 | inventoryItem.CreatorIdAsUuid = (UUID)GetStringAttribute(item,"creatoruuid",""); |
2147 | inventoryItem.NextPermissions = GetUnsignedAttribute(perms,"next",0x7fffffff); | 2150 | inventoryItem.CreatorData = GetStringAttribute(item, "creatordata", ""); |
2151 | inventoryItem.NextPermissions = GetUnsignedAttribute(perms, "next", 0x7fffffff); | ||
2148 | inventoryItem.CurrentPermissions = GetUnsignedAttribute(perms,"current",0x7fffffff); | 2152 | inventoryItem.CurrentPermissions = GetUnsignedAttribute(perms,"current",0x7fffffff); |
2149 | inventoryItem.BasePermissions = GetUnsignedAttribute(perms,"base",0x7fffffff); | 2153 | inventoryItem.BasePermissions = GetUnsignedAttribute(perms,"base",0x7fffffff); |
2150 | inventoryItem.EveryOnePermissions = GetUnsignedAttribute(perms,"everyone",0x7fffffff); | 2154 | inventoryItem.EveryOnePermissions = GetUnsignedAttribute(perms,"everyone",0x7fffffff); |
diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs index a4135db..c3cf08c 100644 --- a/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs +++ b/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs | |||
@@ -1295,6 +1295,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory | |||
1295 | rdata.writer.WriteAttributeString("folder", String.Empty, i.Folder.ToString()); | 1295 | rdata.writer.WriteAttributeString("folder", String.Empty, i.Folder.ToString()); |
1296 | rdata.writer.WriteAttributeString("owner", String.Empty, i.Owner.ToString()); | 1296 | rdata.writer.WriteAttributeString("owner", String.Empty, i.Owner.ToString()); |
1297 | rdata.writer.WriteAttributeString("creator", String.Empty, i.CreatorId); | 1297 | rdata.writer.WriteAttributeString("creator", String.Empty, i.CreatorId); |
1298 | rdata.writer.WriteAttributeString("creatordata", String.Empty, i.CreatorData); | ||
1298 | rdata.writer.WriteAttributeString("creationdate", String.Empty, i.CreationDate.ToString()); | 1299 | rdata.writer.WriteAttributeString("creationdate", String.Empty, i.CreationDate.ToString()); |
1299 | rdata.writer.WriteAttributeString("invtype", String.Empty, i.InvType.ToString()); | 1300 | rdata.writer.WriteAttributeString("invtype", String.Empty, i.InvType.ToString()); |
1300 | rdata.writer.WriteAttributeString("assettype", String.Empty, i.AssetType.ToString()); | 1301 | rdata.writer.WriteAttributeString("assettype", String.Empty, i.AssetType.ToString()); |
diff --git a/OpenSim/Data/MySQL/MySQLSimulationData.cs b/OpenSim/Data/MySQL/MySQLSimulationData.cs index ae78814..02997b3 100644 --- a/OpenSim/Data/MySQL/MySQLSimulationData.cs +++ b/OpenSim/Data/MySQL/MySQLSimulationData.cs | |||
@@ -1090,7 +1090,7 @@ namespace OpenSim.Data.MySQL | |||
1090 | 1090 | ||
1091 | // depending on the MySQL connector version, CHAR(36) may be already converted to Guid! | 1091 | // depending on the MySQL connector version, CHAR(36) may be already converted to Guid! |
1092 | prim.UUID = DBGuid.FromDB(row["UUID"]); | 1092 | prim.UUID = DBGuid.FromDB(row["UUID"]); |
1093 | prim.CreatorID = DBGuid.FromDB(row["CreatorID"]); | 1093 | prim.CreatorIdentification = (string)row["CreatorID"]; |
1094 | prim.OwnerID = DBGuid.FromDB(row["OwnerID"]); | 1094 | prim.OwnerID = DBGuid.FromDB(row["OwnerID"]); |
1095 | prim.GroupID = DBGuid.FromDB(row["GroupID"]); | 1095 | prim.GroupID = DBGuid.FromDB(row["GroupID"]); |
1096 | prim.LastOwnerID = DBGuid.FromDB(row["LastOwnerID"]); | 1096 | prim.LastOwnerID = DBGuid.FromDB(row["LastOwnerID"]); |
@@ -1243,7 +1243,7 @@ namespace OpenSim.Data.MySQL | |||
1243 | taskItem.Name = (String)row["name"]; | 1243 | taskItem.Name = (String)row["name"]; |
1244 | taskItem.Description = (String)row["description"]; | 1244 | taskItem.Description = (String)row["description"]; |
1245 | taskItem.CreationDate = Convert.ToUInt32(row["creationDate"]); | 1245 | taskItem.CreationDate = Convert.ToUInt32(row["creationDate"]); |
1246 | taskItem.CreatorID = DBGuid.FromDB(row["creatorID"]); | 1246 | taskItem.CreatorIdentification = (String)row["creatorID"]; |
1247 | taskItem.OwnerID = DBGuid.FromDB(row["ownerID"]); | 1247 | taskItem.OwnerID = DBGuid.FromDB(row["ownerID"]); |
1248 | taskItem.LastOwnerID = DBGuid.FromDB(row["lastOwnerID"]); | 1248 | taskItem.LastOwnerID = DBGuid.FromDB(row["lastOwnerID"]); |
1249 | taskItem.GroupID = DBGuid.FromDB(row["groupID"]); | 1249 | taskItem.GroupID = DBGuid.FromDB(row["groupID"]); |
@@ -1453,7 +1453,7 @@ namespace OpenSim.Data.MySQL | |||
1453 | cmd.Parameters.AddWithValue("TouchName", prim.TouchName); | 1453 | cmd.Parameters.AddWithValue("TouchName", prim.TouchName); |
1454 | // permissions | 1454 | // permissions |
1455 | cmd.Parameters.AddWithValue("ObjectFlags", (uint)prim.Flags); | 1455 | cmd.Parameters.AddWithValue("ObjectFlags", (uint)prim.Flags); |
1456 | cmd.Parameters.AddWithValue("CreatorID", prim.CreatorID.ToString()); | 1456 | cmd.Parameters.AddWithValue("CreatorID", prim.CreatorIdentification.ToString()); |
1457 | cmd.Parameters.AddWithValue("OwnerID", prim.OwnerID.ToString()); | 1457 | cmd.Parameters.AddWithValue("OwnerID", prim.OwnerID.ToString()); |
1458 | cmd.Parameters.AddWithValue("GroupID", prim.GroupID.ToString()); | 1458 | cmd.Parameters.AddWithValue("GroupID", prim.GroupID.ToString()); |
1459 | cmd.Parameters.AddWithValue("LastOwnerID", prim.LastOwnerID.ToString()); | 1459 | cmd.Parameters.AddWithValue("LastOwnerID", prim.LastOwnerID.ToString()); |
@@ -1583,7 +1583,7 @@ namespace OpenSim.Data.MySQL | |||
1583 | cmd.Parameters.AddWithValue("name", taskItem.Name); | 1583 | cmd.Parameters.AddWithValue("name", taskItem.Name); |
1584 | cmd.Parameters.AddWithValue("description", taskItem.Description); | 1584 | cmd.Parameters.AddWithValue("description", taskItem.Description); |
1585 | cmd.Parameters.AddWithValue("creationDate", taskItem.CreationDate); | 1585 | cmd.Parameters.AddWithValue("creationDate", taskItem.CreationDate); |
1586 | cmd.Parameters.AddWithValue("creatorID", taskItem.CreatorID); | 1586 | cmd.Parameters.AddWithValue("creatorID", taskItem.CreatorIdentification); |
1587 | cmd.Parameters.AddWithValue("ownerID", taskItem.OwnerID); | 1587 | cmd.Parameters.AddWithValue("ownerID", taskItem.OwnerID); |
1588 | cmd.Parameters.AddWithValue("lastOwnerID", taskItem.LastOwnerID); | 1588 | cmd.Parameters.AddWithValue("lastOwnerID", taskItem.LastOwnerID); |
1589 | cmd.Parameters.AddWithValue("groupID", taskItem.GroupID); | 1589 | cmd.Parameters.AddWithValue("groupID", taskItem.GroupID); |
diff --git a/OpenSim/Data/MySQL/Resources/InventoryStore.migrations b/OpenSim/Data/MySQL/Resources/InventoryStore.migrations index 3e9bad5..993a5a0 100644 --- a/OpenSim/Data/MySQL/Resources/InventoryStore.migrations +++ b/OpenSim/Data/MySQL/Resources/InventoryStore.migrations | |||
@@ -99,3 +99,11 @@ BEGIN; | |||
99 | alter table inventoryitems modify column creatorID varchar(128) not NULL default '00000000-0000-0000-0000-000000000000'; | 99 | alter table inventoryitems modify column creatorID varchar(128) not NULL default '00000000-0000-0000-0000-000000000000'; |
100 | 100 | ||
101 | COMMIT; | 101 | COMMIT; |
102 | |||
103 | :VERSION 6 # ------------ | ||
104 | |||
105 | BEGIN; | ||
106 | |||
107 | alter table inventoryitems modify column creatorID varchar(255) not NULL default '00000000-0000-0000-0000-000000000000'; | ||
108 | |||
109 | COMMIT; | ||
diff --git a/OpenSim/Data/MySQL/Resources/RegionStore.migrations b/OpenSim/Data/MySQL/Resources/RegionStore.migrations index 5c32209..645f4e8 100644 --- a/OpenSim/Data/MySQL/Resources/RegionStore.migrations +++ b/OpenSim/Data/MySQL/Resources/RegionStore.migrations | |||
@@ -817,3 +817,12 @@ ALTER TABLE `land` ADD COLUMN `MediaLoop` BOOLEAN NOT NULL DEFAULT FALSE; | |||
817 | ALTER TABLE `land` ADD COLUMN `ObscureMusic` BOOLEAN NOT NULL DEFAULT FALSE; | 817 | ALTER TABLE `land` ADD COLUMN `ObscureMusic` BOOLEAN NOT NULL DEFAULT FALSE; |
818 | ALTER TABLE `land` ADD COLUMN `ObscureMedia` BOOLEAN NOT NULL DEFAULT FALSE; | 818 | ALTER TABLE `land` ADD COLUMN `ObscureMedia` BOOLEAN NOT NULL DEFAULT FALSE; |
819 | COMMIT; | 819 | COMMIT; |
820 | |||
821 | :VERSION 37 #--------------------- | ||
822 | |||
823 | BEGIN; | ||
824 | |||
825 | ALTER TABLE `prims` MODIFY COLUMN `CreatorID` VARCHAR(255) NOT NULL DEFAULT ''; | ||
826 | ALTER TABLE `primitems` MODIFY COLUMN `CreatorID` VARCHAR(255) NOT NULL DEFAULT ''; | ||
827 | |||
828 | COMMIT; | ||
diff --git a/OpenSim/Data/SQLite/SQLiteInventoryStore.cs b/OpenSim/Data/SQLite/SQLiteInventoryStore.cs index d606f11..7dc07ec 100644 --- a/OpenSim/Data/SQLite/SQLiteInventoryStore.cs +++ b/OpenSim/Data/SQLite/SQLiteInventoryStore.cs | |||
@@ -156,7 +156,7 @@ namespace OpenSim.Data.SQLite | |||
156 | item.InvType = Convert.ToInt32(row["invType"]); | 156 | item.InvType = Convert.ToInt32(row["invType"]); |
157 | item.Folder = new UUID((string) row["parentFolderID"]); | 157 | item.Folder = new UUID((string) row["parentFolderID"]); |
158 | item.Owner = new UUID((string) row["avatarID"]); | 158 | item.Owner = new UUID((string) row["avatarID"]); |
159 | item.CreatorId = (string)row["creatorsID"]; | 159 | item.CreatorIdentification = (string)row["creatorsID"]; |
160 | item.Name = (string) row["inventoryName"]; | 160 | item.Name = (string) row["inventoryName"]; |
161 | item.Description = (string) row["inventoryDescription"]; | 161 | item.Description = (string) row["inventoryDescription"]; |
162 | 162 | ||
@@ -201,7 +201,7 @@ namespace OpenSim.Data.SQLite | |||
201 | row["invType"] = item.InvType; | 201 | row["invType"] = item.InvType; |
202 | row["parentFolderID"] = item.Folder.ToString(); | 202 | row["parentFolderID"] = item.Folder.ToString(); |
203 | row["avatarID"] = item.Owner.ToString(); | 203 | row["avatarID"] = item.Owner.ToString(); |
204 | row["creatorsID"] = item.CreatorId.ToString(); | 204 | row["creatorsID"] = item.CreatorIdentification.ToString(); |
205 | row["inventoryName"] = item.Name; | 205 | row["inventoryName"] = item.Name; |
206 | row["inventoryDescription"] = item.Description; | 206 | row["inventoryDescription"] = item.Description; |
207 | 207 | ||
diff --git a/OpenSim/Data/SQLite/SQLiteSimulationData.cs b/OpenSim/Data/SQLite/SQLiteSimulationData.cs index bade0a1..0bfd73a 100644 --- a/OpenSim/Data/SQLite/SQLiteSimulationData.cs +++ b/OpenSim/Data/SQLite/SQLiteSimulationData.cs | |||
@@ -1243,7 +1243,7 @@ namespace OpenSim.Data.SQLite | |||
1243 | prim.TouchName = (String) row["TouchName"]; | 1243 | prim.TouchName = (String) row["TouchName"]; |
1244 | // permissions | 1244 | // permissions |
1245 | prim.ObjectFlags = Convert.ToUInt32(row["ObjectFlags"]); | 1245 | prim.ObjectFlags = Convert.ToUInt32(row["ObjectFlags"]); |
1246 | prim.CreatorID = new UUID((String) row["CreatorID"]); | 1246 | prim.CreatorIdentification = (String) row["CreatorID"]; |
1247 | prim.OwnerID = new UUID((String) row["OwnerID"]); | 1247 | prim.OwnerID = new UUID((String) row["OwnerID"]); |
1248 | prim.GroupID = new UUID((String) row["GroupID"]); | 1248 | prim.GroupID = new UUID((String) row["GroupID"]); |
1249 | prim.LastOwnerID = new UUID((String) row["LastOwnerID"]); | 1249 | prim.LastOwnerID = new UUID((String) row["LastOwnerID"]); |
@@ -1385,7 +1385,7 @@ namespace OpenSim.Data.SQLite | |||
1385 | taskItem.Name = (String)row["name"]; | 1385 | taskItem.Name = (String)row["name"]; |
1386 | taskItem.Description = (String)row["description"]; | 1386 | taskItem.Description = (String)row["description"]; |
1387 | taskItem.CreationDate = Convert.ToUInt32(row["creationDate"]); | 1387 | taskItem.CreationDate = Convert.ToUInt32(row["creationDate"]); |
1388 | taskItem.CreatorID = new UUID((String)row["creatorID"]); | 1388 | taskItem.CreatorIdentification = (String)row["creatorID"]; |
1389 | taskItem.OwnerID = new UUID((String)row["ownerID"]); | 1389 | taskItem.OwnerID = new UUID((String)row["ownerID"]); |
1390 | taskItem.LastOwnerID = new UUID((String)row["lastOwnerID"]); | 1390 | taskItem.LastOwnerID = new UUID((String)row["lastOwnerID"]); |
1391 | taskItem.GroupID = new UUID((String)row["groupID"]); | 1391 | taskItem.GroupID = new UUID((String)row["groupID"]); |
@@ -1583,7 +1583,7 @@ namespace OpenSim.Data.SQLite | |||
1583 | row["TouchName"] = prim.TouchName; | 1583 | row["TouchName"] = prim.TouchName; |
1584 | // permissions | 1584 | // permissions |
1585 | row["ObjectFlags"] = prim.ObjectFlags; | 1585 | row["ObjectFlags"] = prim.ObjectFlags; |
1586 | row["CreatorID"] = prim.CreatorID.ToString(); | 1586 | row["CreatorID"] = prim.CreatorIdentification.ToString(); |
1587 | row["OwnerID"] = prim.OwnerID.ToString(); | 1587 | row["OwnerID"] = prim.OwnerID.ToString(); |
1588 | row["GroupID"] = prim.GroupID.ToString(); | 1588 | row["GroupID"] = prim.GroupID.ToString(); |
1589 | row["LastOwnerID"] = prim.LastOwnerID.ToString(); | 1589 | row["LastOwnerID"] = prim.LastOwnerID.ToString(); |
@@ -1716,7 +1716,7 @@ namespace OpenSim.Data.SQLite | |||
1716 | row["name"] = taskItem.Name; | 1716 | row["name"] = taskItem.Name; |
1717 | row["description"] = taskItem.Description; | 1717 | row["description"] = taskItem.Description; |
1718 | row["creationDate"] = taskItem.CreationDate; | 1718 | row["creationDate"] = taskItem.CreationDate; |
1719 | row["creatorID"] = taskItem.CreatorID.ToString(); | 1719 | row["creatorID"] = taskItem.CreatorIdentification.ToString(); |
1720 | row["ownerID"] = taskItem.OwnerID.ToString(); | 1720 | row["ownerID"] = taskItem.OwnerID.ToString(); |
1721 | row["lastOwnerID"] = taskItem.LastOwnerID.ToString(); | 1721 | row["lastOwnerID"] = taskItem.LastOwnerID.ToString(); |
1722 | row["groupID"] = taskItem.GroupID.ToString(); | 1722 | row["groupID"] = taskItem.GroupID.ToString(); |
diff --git a/OpenSim/Data/SQLiteLegacy/SQLiteInventoryStore.cs b/OpenSim/Data/SQLiteLegacy/SQLiteInventoryStore.cs index 726703b..8ca48f9 100644 --- a/OpenSim/Data/SQLiteLegacy/SQLiteInventoryStore.cs +++ b/OpenSim/Data/SQLiteLegacy/SQLiteInventoryStore.cs | |||
@@ -150,7 +150,7 @@ namespace OpenSim.Data.SQLiteLegacy | |||
150 | item.InvType = Convert.ToInt32(row["invType"]); | 150 | item.InvType = Convert.ToInt32(row["invType"]); |
151 | item.Folder = new UUID((string) row["parentFolderID"]); | 151 | item.Folder = new UUID((string) row["parentFolderID"]); |
152 | item.Owner = new UUID((string) row["avatarID"]); | 152 | item.Owner = new UUID((string) row["avatarID"]); |
153 | item.CreatorId = (string)row["creatorsID"]; | 153 | item.CreatorIdentification = (string)row["creatorsID"]; |
154 | item.Name = (string) row["inventoryName"]; | 154 | item.Name = (string) row["inventoryName"]; |
155 | item.Description = (string) row["inventoryDescription"]; | 155 | item.Description = (string) row["inventoryDescription"]; |
156 | 156 | ||
@@ -195,7 +195,7 @@ namespace OpenSim.Data.SQLiteLegacy | |||
195 | row["invType"] = item.InvType; | 195 | row["invType"] = item.InvType; |
196 | row["parentFolderID"] = item.Folder.ToString(); | 196 | row["parentFolderID"] = item.Folder.ToString(); |
197 | row["avatarID"] = item.Owner.ToString(); | 197 | row["avatarID"] = item.Owner.ToString(); |
198 | row["creatorsID"] = item.CreatorId.ToString(); | 198 | row["creatorsID"] = item.CreatorIdentification.ToString(); |
199 | row["inventoryName"] = item.Name; | 199 | row["inventoryName"] = item.Name; |
200 | row["inventoryDescription"] = item.Description; | 200 | row["inventoryDescription"] = item.Description; |
201 | 201 | ||
diff --git a/OpenSim/Data/SQLiteLegacy/SQLiteSimulationData.cs b/OpenSim/Data/SQLiteLegacy/SQLiteSimulationData.cs index 4952cdf..1ad1e66 100644 --- a/OpenSim/Data/SQLiteLegacy/SQLiteSimulationData.cs +++ b/OpenSim/Data/SQLiteLegacy/SQLiteSimulationData.cs | |||
@@ -1198,7 +1198,7 @@ namespace OpenSim.Data.SQLiteLegacy | |||
1198 | prim.TouchName = (String) row["TouchName"]; | 1198 | prim.TouchName = (String) row["TouchName"]; |
1199 | // permissions | 1199 | // permissions |
1200 | prim.Flags = (PrimFlags)Convert.ToUInt32(row["ObjectFlags"]); | 1200 | prim.Flags = (PrimFlags)Convert.ToUInt32(row["ObjectFlags"]); |
1201 | prim.CreatorID = new UUID((String) row["CreatorID"]); | 1201 | prim.CreatorIdentification = (String) row["CreatorID"]; |
1202 | prim.OwnerID = new UUID((String) row["OwnerID"]); | 1202 | prim.OwnerID = new UUID((String) row["OwnerID"]); |
1203 | prim.GroupID = new UUID((String) row["GroupID"]); | 1203 | prim.GroupID = new UUID((String) row["GroupID"]); |
1204 | prim.LastOwnerID = new UUID((String) row["LastOwnerID"]); | 1204 | prim.LastOwnerID = new UUID((String) row["LastOwnerID"]); |
@@ -1334,7 +1334,7 @@ namespace OpenSim.Data.SQLiteLegacy | |||
1334 | taskItem.Name = (String)row["name"]; | 1334 | taskItem.Name = (String)row["name"]; |
1335 | taskItem.Description = (String)row["description"]; | 1335 | taskItem.Description = (String)row["description"]; |
1336 | taskItem.CreationDate = Convert.ToUInt32(row["creationDate"]); | 1336 | taskItem.CreationDate = Convert.ToUInt32(row["creationDate"]); |
1337 | taskItem.CreatorID = new UUID((String)row["creatorID"]); | 1337 | taskItem.CreatorIdentification = (String)row["creatorID"]; |
1338 | taskItem.OwnerID = new UUID((String)row["ownerID"]); | 1338 | taskItem.OwnerID = new UUID((String)row["ownerID"]); |
1339 | taskItem.LastOwnerID = new UUID((String)row["lastOwnerID"]); | 1339 | taskItem.LastOwnerID = new UUID((String)row["lastOwnerID"]); |
1340 | taskItem.GroupID = new UUID((String)row["groupID"]); | 1340 | taskItem.GroupID = new UUID((String)row["groupID"]); |
@@ -1531,7 +1531,7 @@ namespace OpenSim.Data.SQLiteLegacy | |||
1531 | row["TouchName"] = prim.TouchName; | 1531 | row["TouchName"] = prim.TouchName; |
1532 | // permissions | 1532 | // permissions |
1533 | row["ObjectFlags"] = (uint)prim.Flags; | 1533 | row["ObjectFlags"] = (uint)prim.Flags; |
1534 | row["CreatorID"] = prim.CreatorID.ToString(); | 1534 | row["CreatorID"] = prim.CreatorIdentification.ToString(); |
1535 | row["OwnerID"] = prim.OwnerID.ToString(); | 1535 | row["OwnerID"] = prim.OwnerID.ToString(); |
1536 | row["GroupID"] = prim.GroupID.ToString(); | 1536 | row["GroupID"] = prim.GroupID.ToString(); |
1537 | row["LastOwnerID"] = prim.LastOwnerID.ToString(); | 1537 | row["LastOwnerID"] = prim.LastOwnerID.ToString(); |
@@ -1664,7 +1664,7 @@ namespace OpenSim.Data.SQLiteLegacy | |||
1664 | row["name"] = taskItem.Name; | 1664 | row["name"] = taskItem.Name; |
1665 | row["description"] = taskItem.Description; | 1665 | row["description"] = taskItem.Description; |
1666 | row["creationDate"] = taskItem.CreationDate; | 1666 | row["creationDate"] = taskItem.CreationDate; |
1667 | row["creatorID"] = taskItem.CreatorID.ToString(); | 1667 | row["creatorID"] = taskItem.CreatorIdentification.ToString(); |
1668 | row["ownerID"] = taskItem.OwnerID.ToString(); | 1668 | row["ownerID"] = taskItem.OwnerID.ToString(); |
1669 | row["lastOwnerID"] = taskItem.LastOwnerID.ToString(); | 1669 | row["lastOwnerID"] = taskItem.LastOwnerID.ToString(); |
1670 | row["groupID"] = taskItem.GroupID.ToString(); | 1670 | row["groupID"] = taskItem.GroupID.ToString(); |
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs index aeb01e2..ce4fc38 100644 --- a/OpenSim/Framework/InventoryItemBase.cs +++ b/OpenSim/Framework/InventoryItemBase.cs | |||
@@ -117,6 +117,56 @@ namespace OpenSim.Framework | |||
117 | } | 117 | } |
118 | protected UUID m_creatorIdAsUuid = UUID.Zero; | 118 | protected UUID m_creatorIdAsUuid = UUID.Zero; |
119 | 119 | ||
120 | protected string m_creatorData; | ||
121 | public string CreatorData // = <profile url>;<name> | ||
122 | { | ||
123 | get { return m_creatorData; } | ||
124 | set { m_creatorData = value; } | ||
125 | } | ||
126 | |||
127 | /// <summary> | ||
128 | /// Used by the DB layer to retrieve / store the entire user identification. | ||
129 | /// The identification can either be a simple UUID or a string of the form | ||
130 | /// uuid[;profile_url[;name]] | ||
131 | /// </summary> | ||
132 | public string CreatorIdentification | ||
133 | { | ||
134 | get | ||
135 | { | ||
136 | if (m_creatorData != null && m_creatorData != string.Empty) | ||
137 | return m_creatorId + ';' + m_creatorData; | ||
138 | else | ||
139 | return m_creatorId; | ||
140 | } | ||
141 | set | ||
142 | { | ||
143 | if ((value == null) || (value != null && value == string.Empty)) | ||
144 | { | ||
145 | m_creatorData = string.Empty; | ||
146 | return; | ||
147 | } | ||
148 | |||
149 | if (!value.Contains(";")) // plain UUID | ||
150 | { | ||
151 | m_creatorId = value; | ||
152 | } | ||
153 | else // <uuid>[;<endpoint>[;name]] | ||
154 | { | ||
155 | string name = "Unknown User"; | ||
156 | string[] parts = value.Split(';'); | ||
157 | if (parts.Length >= 1) | ||
158 | m_creatorId = parts[0]; | ||
159 | if (parts.Length >= 2) | ||
160 | m_creatorData = parts[1]; | ||
161 | if (parts.Length >= 3) | ||
162 | name = parts[2]; | ||
163 | |||
164 | m_creatorData += ';' + name; | ||
165 | |||
166 | } | ||
167 | } | ||
168 | } | ||
169 | |||
120 | /// <value> | 170 | /// <value> |
121 | /// The description of the inventory item (must be less than 64 characters) | 171 | /// The description of the inventory item (must be less than 64 characters) |
122 | /// </value> | 172 | /// </value> |
diff --git a/OpenSim/Framework/TaskInventoryItem.cs b/OpenSim/Framework/TaskInventoryItem.cs index 53237fc..248502e 100644 --- a/OpenSim/Framework/TaskInventoryItem.cs +++ b/OpenSim/Framework/TaskInventoryItem.cs | |||
@@ -102,6 +102,7 @@ namespace OpenSim.Framework | |||
102 | private uint _baseMask = FULL_MASK_PERMISSIONS_GENERAL; | 102 | private uint _baseMask = FULL_MASK_PERMISSIONS_GENERAL; |
103 | private uint _creationDate = 0; | 103 | private uint _creationDate = 0; |
104 | private UUID _creatorID = UUID.Zero; | 104 | private UUID _creatorID = UUID.Zero; |
105 | private string _creatorData = String.Empty; | ||
105 | private string _description = String.Empty; | 106 | private string _description = String.Empty; |
106 | private uint _everyoneMask = FULL_MASK_PERMISSIONS_GENERAL; | 107 | private uint _everyoneMask = FULL_MASK_PERMISSIONS_GENERAL; |
107 | private uint _flags = 0; | 108 | private uint _flags = 0; |
@@ -160,6 +161,61 @@ namespace OpenSim.Framework | |||
160 | } | 161 | } |
161 | } | 162 | } |
162 | 163 | ||
164 | public string CreatorData // = <profile url>;<name> | ||
165 | { | ||
166 | get { return _creatorData; } | ||
167 | set { _creatorData = value; } | ||
168 | } | ||
169 | |||
170 | /// <summary> | ||
171 | /// Used by the DB layer to retrieve / store the entire user identification. | ||
172 | /// The identification can either be a simple UUID or a string of the form | ||
173 | /// uuid[;profile_url[;name]] | ||
174 | /// </summary> | ||
175 | public string CreatorIdentification | ||
176 | { | ||
177 | get | ||
178 | { | ||
179 | if (_creatorData != null && _creatorData != string.Empty) | ||
180 | return _creatorID.ToString() + ';' + _creatorData; | ||
181 | else | ||
182 | return _creatorID.ToString(); | ||
183 | } | ||
184 | set | ||
185 | { | ||
186 | if ((value == null) || (value != null && value == string.Empty)) | ||
187 | { | ||
188 | _creatorData = string.Empty; | ||
189 | return; | ||
190 | } | ||
191 | |||
192 | if (!value.Contains(";")) // plain UUID | ||
193 | { | ||
194 | UUID uuid = UUID.Zero; | ||
195 | UUID.TryParse(value, out uuid); | ||
196 | _creatorID = uuid; | ||
197 | } | ||
198 | else // <uuid>[;<endpoint>[;name]] | ||
199 | { | ||
200 | string name = "Unknown User"; | ||
201 | string[] parts = value.Split(';'); | ||
202 | if (parts.Length >= 1) | ||
203 | { | ||
204 | UUID uuid = UUID.Zero; | ||
205 | UUID.TryParse(parts[0], out uuid); | ||
206 | _creatorID = uuid; | ||
207 | } | ||
208 | if (parts.Length >= 2) | ||
209 | _creatorData = parts[1]; | ||
210 | if (parts.Length >= 3) | ||
211 | name = parts[2]; | ||
212 | |||
213 | _creatorData += ';' + name; | ||
214 | |||
215 | } | ||
216 | } | ||
217 | } | ||
218 | |||
163 | public string Description { | 219 | public string Description { |
164 | get { | 220 | get { |
165 | return _description; | 221 | return _description; |
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 79e31c1..493d412 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs | |||
@@ -265,9 +265,10 @@ namespace OpenSim | |||
265 | LoadOar); | 265 | LoadOar); |
266 | 266 | ||
267 | m_console.Commands.AddCommand("region", false, "save oar", | 267 | m_console.Commands.AddCommand("region", false, "save oar", |
268 | "save oar [-v|--version=N] [<OAR path>]", | 268 | "save oar [-v|--version=N] [-p|--profile=url] [<OAR path>]", |
269 | "Save a region's data to an OAR archive.", | 269 | "Save a region's data to an OAR archive.", |
270 | "-v|--version=N generates scene objects as per older versions of the serialization (e.g. -v=0)" + Environment.NewLine | 270 | "-v|--version=N generates scene objects as per older versions of the serialization (e.g. -v=0)" + Environment.NewLine |
271 | + "-p|--profile=url adds the url of the profile service to the saved user information" + Environment.NewLine | ||
271 | + "The OAR path must be a filesystem path." | 272 | + "The OAR path must be a filesystem path." |
272 | + " If this is not given then the oar is saved to region.oar in the current directory.", | 273 | + " If this is not given then the oar is saved to region.oar in the current directory.", |
273 | SaveOar); | 274 | SaveOar); |
diff --git a/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs b/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs index 25322a1..a5fcb49 100644 --- a/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs | |||
@@ -115,10 +115,16 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule | |||
115 | // Try to find the avatar wielding the killing object | 115 | // Try to find the avatar wielding the killing object |
116 | killingAvatar = deadAvatar.Scene.GetScenePresence(part.OwnerID); | 116 | killingAvatar = deadAvatar.Scene.GetScenePresence(part.OwnerID); |
117 | if (killingAvatar == null) | 117 | if (killingAvatar == null) |
118 | deadAvatarMessage = String.Format("You impaled yourself on {0} owned by {1}!", part.Name, deadAvatar.Scene.GetUserName(part.OwnerID)); | 118 | { |
119 | IUserManagement userManager = deadAvatar.Scene.RequestModuleInterface<IUserManagement>(); | ||
120 | string userName = "Unkown User"; | ||
121 | if (userManager != null) | ||
122 | userName = userManager.GetUserName(part.OwnerID); | ||
123 | deadAvatarMessage = String.Format("You impaled yourself on {0} owned by {1}!", part.Name, userName); | ||
124 | } | ||
119 | else | 125 | else |
120 | { | 126 | { |
121 | // killingAvatarMessage = String.Format("You fragged {0}!", deadAvatar.Name); | 127 | // killingAvatarMessage = String.Format("You fragged {0}!", deadAvatar.Name); |
122 | deadAvatarMessage = String.Format("You got killed by {0}!", killingAvatar.Name); | 128 | deadAvatarMessage = String.Format("You got killed by {0}!", killingAvatar.Name); |
123 | } | 129 | } |
124 | } | 130 | } |
diff --git a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs new file mode 100644 index 0000000..0d94baa --- /dev/null +++ b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs | |||
@@ -0,0 +1,310 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | using System; | ||
28 | using System.Collections.Generic; | ||
29 | using System.IO; | ||
30 | using System.Reflection; | ||
31 | |||
32 | using OpenSim.Framework; | ||
33 | |||
34 | using OpenSim.Region.Framework; | ||
35 | using OpenSim.Region.Framework.Interfaces; | ||
36 | using OpenSim.Region.Framework.Scenes; | ||
37 | using OpenSim.Services.Interfaces; | ||
38 | |||
39 | using OpenMetaverse; | ||
40 | using log4net; | ||
41 | using Nini.Config; | ||
42 | |||
43 | namespace OpenSim.Region.CoreModules.Framework.UserManagement | ||
44 | { | ||
45 | struct UserData | ||
46 | { | ||
47 | public UUID Id; | ||
48 | public string FirstName; | ||
49 | public string LastName; | ||
50 | public string ProfileURL; | ||
51 | } | ||
52 | |||
53 | public class UserManagementModule : ISharedRegionModule, IUserManagement | ||
54 | { | ||
55 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
56 | |||
57 | private List<Scene> m_Scenes = new List<Scene>(); | ||
58 | |||
59 | // The cache | ||
60 | Dictionary<UUID, UserData> m_UserCache = new Dictionary<UUID, UserData>(); | ||
61 | |||
62 | #region ISharedRegionModule | ||
63 | |||
64 | public void Initialise(IConfigSource config) | ||
65 | { | ||
66 | //m_Enabled = config.Configs["Modules"].GetBoolean("LibraryModule", m_Enabled); | ||
67 | //if (m_Enabled) | ||
68 | //{ | ||
69 | // IConfig libConfig = config.Configs["LibraryService"]; | ||
70 | // if (libConfig != null) | ||
71 | // { | ||
72 | // string dllName = libConfig.GetString("LocalServiceModule", string.Empty); | ||
73 | // m_log.Debug("[LIBRARY MODULE]: Library service dll is " + dllName); | ||
74 | // if (dllName != string.Empty) | ||
75 | // { | ||
76 | // Object[] args = new Object[] { config }; | ||
77 | // m_Library = ServerUtils.LoadPlugin<ILibraryService>(dllName, args); | ||
78 | // } | ||
79 | // } | ||
80 | //} | ||
81 | } | ||
82 | |||
83 | public bool IsSharedModule | ||
84 | { | ||
85 | get { return true; } | ||
86 | } | ||
87 | |||
88 | public string Name | ||
89 | { | ||
90 | get { return "UserManagement Module"; } | ||
91 | } | ||
92 | |||
93 | public Type ReplaceableInterface | ||
94 | { | ||
95 | get { return null; } | ||
96 | } | ||
97 | |||
98 | public void AddRegion(Scene scene) | ||
99 | { | ||
100 | m_Scenes.Add(scene); | ||
101 | |||
102 | scene.RegisterModuleInterface<IUserManagement>(this); | ||
103 | scene.EventManager.OnNewClient += new EventManager.OnNewClientDelegate(EventManager_OnNewClient); | ||
104 | } | ||
105 | |||
106 | public void RemoveRegion(Scene scene) | ||
107 | { | ||
108 | scene.UnregisterModuleInterface<IUserManagement>(this); | ||
109 | m_Scenes.Remove(scene); | ||
110 | } | ||
111 | |||
112 | public void RegionLoaded(Scene scene) | ||
113 | { | ||
114 | } | ||
115 | |||
116 | public void PostInitialise() | ||
117 | { | ||
118 | foreach (Scene s in m_Scenes) | ||
119 | { | ||
120 | // let's sniff all the user names referenced by objects in the scene | ||
121 | m_log.DebugFormat("[USER MANAGEMENT MODULE]: Caching creators' data from {0} ({1} objects)...", s.RegionInfo.RegionName, s.GetEntities().Length); | ||
122 | s.ForEachSOG(delegate(SceneObjectGroup sog) { CacheCreators(sog); }); | ||
123 | } | ||
124 | } | ||
125 | |||
126 | public void Close() | ||
127 | { | ||
128 | m_Scenes.Clear(); | ||
129 | m_UserCache.Clear(); | ||
130 | } | ||
131 | |||
132 | #endregion ISharedRegionModule | ||
133 | |||
134 | |||
135 | #region Event Handlers | ||
136 | |||
137 | void EventManager_OnNewClient(IClientAPI client) | ||
138 | { | ||
139 | client.OnNameFromUUIDRequest += new UUIDNameRequest(HandleUUIDNameRequest); | ||
140 | } | ||
141 | |||
142 | void HandleUUIDNameRequest(UUID uuid, IClientAPI remote_client) | ||
143 | { | ||
144 | if (m_Scenes[0].LibraryService != null && (m_Scenes[0].LibraryService.LibraryRootFolder.Owner == uuid)) | ||
145 | { | ||
146 | remote_client.SendNameReply(uuid, "Mr", "OpenSim"); | ||
147 | } | ||
148 | else | ||
149 | { | ||
150 | string[] names = GetUserNames(uuid); | ||
151 | if (names.Length == 2) | ||
152 | { | ||
153 | remote_client.SendNameReply(uuid, names[0], names[1]); | ||
154 | } | ||
155 | |||
156 | } | ||
157 | } | ||
158 | |||
159 | #endregion Event Handlers | ||
160 | |||
161 | private void CacheCreators(SceneObjectGroup sog) | ||
162 | { | ||
163 | //m_log.DebugFormat("[USER MANAGEMENT MODULE]: processing {0} {1}; {2}", sog.RootPart.Name, sog.RootPart.CreatorData, sog.RootPart.CreatorIdentification); | ||
164 | AddUser(sog.RootPart.CreatorID, sog.RootPart.CreatorData); | ||
165 | |||
166 | foreach (SceneObjectPart sop in sog.Parts) | ||
167 | { | ||
168 | AddUser(sop.CreatorID, sop.CreatorData); | ||
169 | foreach (TaskInventoryItem item in sop.TaskInventory.Values) | ||
170 | AddUser(item.CreatorID, item.CreatorData); | ||
171 | } | ||
172 | } | ||
173 | |||
174 | |||
175 | private string[] GetUserNames(UUID uuid) | ||
176 | { | ||
177 | string[] returnstring = new string[2]; | ||
178 | |||
179 | if (m_UserCache.ContainsKey(uuid)) | ||
180 | { | ||
181 | returnstring[0] = m_UserCache[uuid].FirstName; | ||
182 | returnstring[1] = m_UserCache[uuid].LastName; | ||
183 | return returnstring; | ||
184 | } | ||
185 | |||
186 | UserAccount account = m_Scenes[0].UserAccountService.GetUserAccount(m_Scenes[0].RegionInfo.ScopeID, uuid); | ||
187 | |||
188 | if (account != null) | ||
189 | { | ||
190 | returnstring[0] = account.FirstName; | ||
191 | returnstring[1] = account.LastName; | ||
192 | |||
193 | UserData user = new UserData(); | ||
194 | user.FirstName = account.FirstName; | ||
195 | user.LastName = account.LastName; | ||
196 | |||
197 | lock (m_UserCache) | ||
198 | m_UserCache[uuid] = user; | ||
199 | } | ||
200 | else | ||
201 | { | ||
202 | returnstring[0] = "Unknown"; | ||
203 | returnstring[1] = "User"; | ||
204 | } | ||
205 | |||
206 | return returnstring; | ||
207 | } | ||
208 | |||
209 | #region IUserManagement | ||
210 | |||
211 | public string GetUserName(UUID uuid) | ||
212 | { | ||
213 | string[] names = GetUserNames(uuid); | ||
214 | if (names.Length == 2) | ||
215 | { | ||
216 | string firstname = names[0]; | ||
217 | string lastname = names[1]; | ||
218 | |||
219 | return firstname + " " + lastname; | ||
220 | |||
221 | } | ||
222 | return "(hippos)"; | ||
223 | } | ||
224 | |||
225 | public void AddUser(UUID id, string creatorData) | ||
226 | { | ||
227 | if (m_UserCache.ContainsKey(id)) | ||
228 | return; | ||
229 | |||
230 | UserData user = new UserData(); | ||
231 | user.Id = id; | ||
232 | |||
233 | UserAccount account = m_Scenes[0].UserAccountService.GetUserAccount(m_Scenes[0].RegionInfo.ScopeID, id); | ||
234 | |||
235 | if (account != null) | ||
236 | { | ||
237 | user.FirstName = account.FirstName; | ||
238 | user.LastName = account.LastName; | ||
239 | // user.ProfileURL = we should initialize this to the default | ||
240 | } | ||
241 | else | ||
242 | { | ||
243 | if (creatorData != null && creatorData != string.Empty) | ||
244 | { | ||
245 | //creatorData = <endpoint>;<name> | ||
246 | |||
247 | string[] parts = creatorData.Split(';'); | ||
248 | if (parts.Length >= 1) | ||
249 | { | ||
250 | user.ProfileURL = parts[0]; | ||
251 | try | ||
252 | { | ||
253 | Uri uri = new Uri(parts[0]); | ||
254 | user.LastName = "@" + uri.Authority; | ||
255 | } | ||
256 | catch | ||
257 | { | ||
258 | m_log.DebugFormat("[SCENE]: Unable to parse Uri {0}", parts[0]); | ||
259 | user.LastName = "@unknown"; | ||
260 | } | ||
261 | } | ||
262 | if (parts.Length >= 2) | ||
263 | user.FirstName = parts[1].Replace(' ', '.'); | ||
264 | } | ||
265 | else | ||
266 | { | ||
267 | user.FirstName = "Unknown"; | ||
268 | user.LastName = "User"; | ||
269 | } | ||
270 | } | ||
271 | |||
272 | lock (m_UserCache) | ||
273 | m_UserCache[id] = user; | ||
274 | |||
275 | m_log.DebugFormat("[USER MANAGEMENT MODULE]: Added user {0} {1} {2} {3}", user.Id, user.FirstName, user.LastName, user.ProfileURL); | ||
276 | } | ||
277 | |||
278 | //public void AddUser(UUID uuid, string userData) | ||
279 | //{ | ||
280 | // if (m_UserCache.ContainsKey(uuid)) | ||
281 | // return; | ||
282 | |||
283 | // UserData user = new UserData(); | ||
284 | // user.Id = uuid; | ||
285 | |||
286 | // // userData = <profile url>;<name> | ||
287 | // string[] parts = userData.Split(';'); | ||
288 | // if (parts.Length >= 1) | ||
289 | // user.ProfileURL = parts[0].Trim(); | ||
290 | // if (parts.Length >= 2) | ||
291 | // { | ||
292 | // string[] name = parts[1].Trim().Split(' '); | ||
293 | // if (name.Length >= 1) | ||
294 | // user.FirstName = name[0]; | ||
295 | // if (name.Length >= 2) | ||
296 | // user.LastName = name[1]; | ||
297 | // else | ||
298 | // user.LastName = "?"; | ||
299 | // } | ||
300 | |||
301 | // lock (m_UserCache) | ||
302 | // m_UserCache.Add(uuid, user); | ||
303 | |||
304 | // m_log.DebugFormat("[USER MANAGEMENT MODULE]: Added user {0} {1} {2} {3}", user.Id, user.FirstName, user.LastName, user.ProfileURL); | ||
305 | |||
306 | //} | ||
307 | |||
308 | #endregion IUserManagement | ||
309 | } | ||
310 | } | ||
diff --git a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml index df23eac..cfa4109 100644 --- a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml +++ b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml | |||
@@ -8,6 +8,7 @@ | |||
8 | </Dependencies> | 8 | </Dependencies> |
9 | 9 | ||
10 | <Extension path = "/OpenSim/RegionModules"> | 10 | <Extension path = "/OpenSim/RegionModules"> |
11 | <RegionModule id="UserManagementModule" type="OpenSim.Region.CoreModules.Framework.UserManagement.UserManagementModule" /> | ||
11 | <RegionModule id="EntityTransferModule" type="OpenSim.Region.CoreModules.Framework.EntityTransfer.EntityTransferModule" /> | 12 | <RegionModule id="EntityTransferModule" type="OpenSim.Region.CoreModules.Framework.EntityTransfer.EntityTransferModule" /> |
12 | <RegionModule id="HGEntityTransferModule" type="OpenSim.Region.CoreModules.Framework.EntityTransfer.HGEntityTransferModule" /> | 13 | <RegionModule id="HGEntityTransferModule" type="OpenSim.Region.CoreModules.Framework.EntityTransfer.HGEntityTransferModule" /> |
13 | <RegionModule id="InventoryAccessModule" type="OpenSim.Region.CoreModules.Framework.InventoryAccess.BasicInventoryAccessModule" /> | 14 | <RegionModule id="InventoryAccessModule" type="OpenSim.Region.CoreModules.Framework.InventoryAccess.BasicInventoryAccessModule" /> |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs index ab6be50..c7244c8 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs | |||
@@ -49,6 +49,21 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
49 | 49 | ||
50 | private IInventoryService m_InventoryService; | 50 | private IInventoryService m_InventoryService; |
51 | 51 | ||
52 | private Scene m_Scene; | ||
53 | |||
54 | private IUserManagement m_UserManager; | ||
55 | private IUserManagement UserManager | ||
56 | { | ||
57 | get | ||
58 | { | ||
59 | if (m_UserManager == null) | ||
60 | { | ||
61 | m_UserManager = m_Scene.RequestModuleInterface<IUserManagement>(); | ||
62 | } | ||
63 | return m_UserManager; | ||
64 | } | ||
65 | } | ||
66 | |||
52 | private bool m_Enabled = false; | 67 | private bool m_Enabled = false; |
53 | 68 | ||
54 | public Type ReplaceableInterface | 69 | public Type ReplaceableInterface |
@@ -115,6 +130,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
115 | return; | 130 | return; |
116 | 131 | ||
117 | scene.RegisterModuleInterface<IInventoryService>(this); | 132 | scene.RegisterModuleInterface<IInventoryService>(this); |
133 | |||
134 | if (m_Scene == null) | ||
135 | m_Scene = scene; | ||
118 | } | 136 | } |
119 | 137 | ||
120 | public void RemoveRegion(Scene scene) | 138 | public void RemoveRegion(Scene scene) |
@@ -163,7 +181,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
163 | 181 | ||
164 | public InventoryCollection GetFolderContent(UUID userID, UUID folderID) | 182 | public InventoryCollection GetFolderContent(UUID userID, UUID folderID) |
165 | { | 183 | { |
166 | return m_InventoryService.GetFolderContent(userID, folderID); | 184 | InventoryCollection invCol = m_InventoryService.GetFolderContent(userID, folderID); |
185 | if (UserManager != null) | ||
186 | foreach (InventoryItemBase item in invCol.Items) | ||
187 | UserManager.AddUser(item.CreatorIdAsUuid, item.CreatorData); | ||
188 | |||
189 | return invCol; | ||
167 | } | 190 | } |
168 | 191 | ||
169 | public List<InventoryItemBase> GetFolderItems(UUID userID, UUID folderID) | 192 | public List<InventoryItemBase> GetFolderItems(UUID userID, UUID folderID) |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs index 17d80c7..9213132 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs | |||
@@ -47,9 +47,23 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
47 | 47 | ||
48 | private bool m_Enabled = false; | 48 | private bool m_Enabled = false; |
49 | private bool m_Initialized = false; | 49 | private bool m_Initialized = false; |
50 | // private Scene m_Scene; | 50 | private Scene m_Scene; |
51 | private InventoryServicesConnector m_RemoteConnector; | 51 | private InventoryServicesConnector m_RemoteConnector; |
52 | 52 | ||
53 | private IUserManagement m_UserManager; | ||
54 | private IUserManagement UserManager | ||
55 | { | ||
56 | get | ||
57 | { | ||
58 | if (m_UserManager == null) | ||
59 | { | ||
60 | m_UserManager = m_Scene.RequestModuleInterface<IUserManagement>(); | ||
61 | } | ||
62 | return m_UserManager; | ||
63 | } | ||
64 | } | ||
65 | |||
66 | |||
53 | public Type ReplaceableInterface | 67 | public Type ReplaceableInterface |
54 | { | 68 | { |
55 | get { return null; } | 69 | get { return null; } |
@@ -116,6 +130,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
116 | 130 | ||
117 | scene.RegisterModuleInterface<IInventoryService>(this); | 131 | scene.RegisterModuleInterface<IInventoryService>(this); |
118 | m_cache.AddRegion(scene); | 132 | m_cache.AddRegion(scene); |
133 | |||
134 | if (m_Scene == null) | ||
135 | m_Scene = scene; | ||
119 | } | 136 | } |
120 | 137 | ||
121 | public void RemoveRegion(Scene scene) | 138 | public void RemoveRegion(Scene scene) |
@@ -186,7 +203,10 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
186 | UUID sessionID = GetSessionID(userID); | 203 | UUID sessionID = GetSessionID(userID); |
187 | try | 204 | try |
188 | { | 205 | { |
189 | return m_RemoteConnector.GetFolderContent(userID.ToString(), folderID, sessionID); | 206 | InventoryCollection invCol = m_RemoteConnector.GetFolderContent(userID.ToString(), folderID, sessionID); |
207 | foreach (InventoryItemBase item in invCol.Items) | ||
208 | UserManager.AddUser(item.CreatorIdAsUuid, item.CreatorData); | ||
209 | return invCol; | ||
190 | } | 210 | } |
191 | catch (Exception e) | 211 | catch (Exception e) |
192 | { | 212 | { |
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs index 702eab9..d948b82 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs | |||
@@ -78,6 +78,19 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
78 | /// </summary> | 78 | /// </summary> |
79 | private IDictionary<UUID, bool> m_validUserUuids = new Dictionary<UUID, bool>(); | 79 | private IDictionary<UUID, bool> m_validUserUuids = new Dictionary<UUID, bool>(); |
80 | 80 | ||
81 | private IUserManagement m_UserMan; | ||
82 | private IUserManagement UserManager | ||
83 | { | ||
84 | get | ||
85 | { | ||
86 | if (m_UserMan == null) | ||
87 | { | ||
88 | m_UserMan = m_scene.RequestModuleInterface<IUserManagement>(); | ||
89 | } | ||
90 | return m_UserMan; | ||
91 | } | ||
92 | } | ||
93 | |||
81 | public ArchiveReadRequest(Scene scene, string loadPath, bool merge, bool skipAssets, Guid requestId) | 94 | public ArchiveReadRequest(Scene scene, string loadPath, bool merge, bool skipAssets, Guid requestId) |
82 | { | 95 | { |
83 | m_scene = scene; | 96 | m_scene = scene; |
@@ -251,8 +264,13 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
251 | 264 | ||
252 | foreach (SceneObjectPart part in sceneObject.Parts) | 265 | foreach (SceneObjectPart part in sceneObject.Parts) |
253 | { | 266 | { |
254 | if (!ResolveUserUuid(part.CreatorID)) | 267 | if (part.CreatorData == null || part.CreatorData == string.Empty) |
255 | part.CreatorID = m_scene.RegionInfo.EstateSettings.EstateOwner; | 268 | { |
269 | if (!ResolveUserUuid(part.CreatorID)) | ||
270 | part.CreatorID = m_scene.RegionInfo.EstateSettings.EstateOwner; | ||
271 | } | ||
272 | if (UserManager != null) | ||
273 | UserManager.AddUser(part.CreatorID, part.CreatorData); | ||
256 | 274 | ||
257 | if (!ResolveUserUuid(part.OwnerID)) | 275 | if (!ResolveUserUuid(part.OwnerID)) |
258 | part.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner; | 276 | part.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner; |
@@ -293,10 +311,13 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
293 | { | 311 | { |
294 | kvp.Value.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner; | 312 | kvp.Value.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner; |
295 | } | 313 | } |
296 | if (!ResolveUserUuid(kvp.Value.CreatorID)) | 314 | if (kvp.Value.CreatorData == null || kvp.Value.CreatorData == string.Empty) |
297 | { | 315 | { |
298 | kvp.Value.CreatorID = m_scene.RegionInfo.EstateSettings.EstateOwner; | 316 | if (!ResolveUserUuid(kvp.Value.CreatorID)) |
317 | kvp.Value.CreatorID = m_scene.RegionInfo.EstateSettings.EstateOwner; | ||
299 | } | 318 | } |
319 | if (UserManager != null) | ||
320 | UserManager.AddUser(kvp.Value.CreatorID, kvp.Value.CreatorData); | ||
300 | } | 321 | } |
301 | part.TaskInventory.LockItemsForRead(false); | 322 | part.TaskInventory.LockItemsForRead(false); |
302 | } | 323 | } |
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs index e0ad71e..358d0a7 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs | |||
@@ -126,6 +126,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
126 | 126 | ||
127 | OptionSet ops = new OptionSet(); | 127 | OptionSet ops = new OptionSet(); |
128 | ops.Add("v|version=", delegate(string v) { options["version"] = v; }); | 128 | ops.Add("v|version=", delegate(string v) { options["version"] = v; }); |
129 | ops.Add("p|profile=", delegate(string v) { options["profile"] = v; }); | ||
129 | 130 | ||
130 | List<string> mainParams = ops.Parse(cmdparams); | 131 | List<string> mainParams = ops.Parse(cmdparams); |
131 | 132 | ||
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs index ab142f7..14de4f4 100644 --- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs | |||
@@ -785,8 +785,14 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
785 | for (int i = 0; i < uuidarr.Length; i++) | 785 | for (int i = 0; i < uuidarr.Length; i++) |
786 | { | 786 | { |
787 | // string lookupname = m_scene.CommsManager.UUIDNameRequestString(uuidarr[i]); | 787 | // string lookupname = m_scene.CommsManager.UUIDNameRequestString(uuidarr[i]); |
788 | m_scene.GetUserName(uuidarr[i]); | 788 | |
789 | IUserManagement userManager = m_scene.RequestModuleInterface<IUserManagement>(); | ||
790 | string userName = "Unkown User"; | ||
791 | if (userManager != null) | ||
792 | userName = userManager.GetUserName(uuidarr[i]); | ||
793 | |||
789 | // we drop it. It gets cached though... so we're ready for the next request. | 794 | // we drop it. It gets cached though... so we're ready for the next request. |
795 | // diva commnent 11/21/2010: uh?!? wft? | ||
790 | } | 796 | } |
791 | } | 797 | } |
792 | #endregion | 798 | #endregion |
diff --git a/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs index c06ccb2..568ba19 100644 --- a/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs +++ b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs | |||
@@ -189,6 +189,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell | |||
189 | 189 | ||
190 | InventoryItemBase item = new InventoryItemBase(); | 190 | InventoryItemBase item = new InventoryItemBase(); |
191 | item.CreatorId = part.CreatorID.ToString(); | 191 | item.CreatorId = part.CreatorID.ToString(); |
192 | item.CreatorData = part.CreatorData; | ||
192 | 193 | ||
193 | item.ID = UUID.Random(); | 194 | item.ID = UUID.Random(); |
194 | item.Owner = remoteClient.AgentId; | 195 | item.Owner = remoteClient.AgentId; |
diff --git a/OpenSim/Region/Framework/Interfaces/IUserManagement.cs b/OpenSim/Region/Framework/Interfaces/IUserManagement.cs new file mode 100644 index 0000000..1a5cb7e --- /dev/null +++ b/OpenSim/Region/Framework/Interfaces/IUserManagement.cs | |||
@@ -0,0 +1,13 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | |||
4 | using OpenMetaverse; | ||
5 | |||
6 | namespace OpenSim.Region.Framework.Interfaces | ||
7 | { | ||
8 | public interface IUserManagement | ||
9 | { | ||
10 | string GetUserName(UUID uuid); | ||
11 | void AddUser(UUID uuid, string userData); | ||
12 | } | ||
13 | } | ||
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 1d8b988..36ce245 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -408,6 +408,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
408 | InventoryItemBase itemCopy = new InventoryItemBase(); | 408 | InventoryItemBase itemCopy = new InventoryItemBase(); |
409 | itemCopy.Owner = recipient; | 409 | itemCopy.Owner = recipient; |
410 | itemCopy.CreatorId = item.CreatorId; | 410 | itemCopy.CreatorId = item.CreatorId; |
411 | itemCopy.CreatorData = item.CreatorData; | ||
411 | itemCopy.ID = UUID.Random(); | 412 | itemCopy.ID = UUID.Random(); |
412 | itemCopy.AssetID = item.AssetID; | 413 | itemCopy.AssetID = item.AssetID; |
413 | itemCopy.Description = item.Description; | 414 | itemCopy.Description = item.Description; |
@@ -683,13 +684,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
683 | if (remoteClient.AgentId == oldAgentID) | 684 | if (remoteClient.AgentId == oldAgentID) |
684 | { | 685 | { |
685 | CreateNewInventoryItem( | 686 | CreateNewInventoryItem( |
686 | remoteClient, item.CreatorId, newFolderID, newName, item.Flags, callbackID, asset, (sbyte)item.InvType, | 687 | remoteClient, item.CreatorId, item.CreatorData, newFolderID, newName, item.Flags, callbackID, asset, (sbyte)item.InvType, |
687 | item.BasePermissions, item.CurrentPermissions, item.EveryOnePermissions, item.NextPermissions, item.GroupPermissions, Util.UnixTimeSinceEpoch()); | 688 | item.BasePermissions, item.CurrentPermissions, item.EveryOnePermissions, item.NextPermissions, item.GroupPermissions, Util.UnixTimeSinceEpoch()); |
688 | } | 689 | } |
689 | else | 690 | else |
690 | { | 691 | { |
691 | CreateNewInventoryItem( | 692 | CreateNewInventoryItem( |
692 | remoteClient, item.CreatorId, newFolderID, newName, item.Flags, callbackID, asset, (sbyte)item.InvType, | 693 | remoteClient, item.CreatorId, item.CreatorData, newFolderID, newName, item.Flags, callbackID, asset, (sbyte)item.InvType, |
693 | item.NextPermissions, item.NextPermissions, item.EveryOnePermissions & item.NextPermissions, item.NextPermissions, item.GroupPermissions, Util.UnixTimeSinceEpoch()); | 694 | item.NextPermissions, item.NextPermissions, item.EveryOnePermissions & item.NextPermissions, item.NextPermissions, item.GroupPermissions, Util.UnixTimeSinceEpoch()); |
694 | } | 695 | } |
695 | } | 696 | } |
@@ -757,11 +758,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
757 | /// <param name="asset"></param> | 758 | /// <param name="asset"></param> |
758 | /// <param name="invType"></param> | 759 | /// <param name="invType"></param> |
759 | /// <param name="nextOwnerMask"></param> | 760 | /// <param name="nextOwnerMask"></param> |
760 | private void CreateNewInventoryItem(IClientAPI remoteClient, string creatorID, UUID folderID, string name, uint flags, uint callbackID, | 761 | private void CreateNewInventoryItem(IClientAPI remoteClient, string creatorID, string creatorData, UUID folderID, string name, uint flags, uint callbackID, |
761 | AssetBase asset, sbyte invType, uint nextOwnerMask, int creationDate) | 762 | AssetBase asset, sbyte invType, uint nextOwnerMask, int creationDate) |
762 | { | 763 | { |
763 | CreateNewInventoryItem( | 764 | CreateNewInventoryItem( |
764 | remoteClient, creatorID, folderID, name, flags, callbackID, asset, invType, | 765 | remoteClient, creatorID, creatorData, folderID, name, flags, callbackID, asset, invType, |
765 | (uint)PermissionMask.All, (uint)PermissionMask.All, 0, nextOwnerMask, 0, creationDate); | 766 | (uint)PermissionMask.All, (uint)PermissionMask.All, 0, nextOwnerMask, 0, creationDate); |
766 | } | 767 | } |
767 | 768 | ||
@@ -776,12 +777,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
776 | /// <param name="nextOwnerMask"></param> | 777 | /// <param name="nextOwnerMask"></param> |
777 | /// <param name="creationDate"></param> | 778 | /// <param name="creationDate"></param> |
778 | private void CreateNewInventoryItem( | 779 | private void CreateNewInventoryItem( |
779 | IClientAPI remoteClient, string creatorID, UUID folderID, string name, uint flags, uint callbackID, AssetBase asset, sbyte invType, | 780 | IClientAPI remoteClient, string creatorID, string creatorData, UUID folderID, string name, uint flags, uint callbackID, AssetBase asset, sbyte invType, |
780 | uint baseMask, uint currentMask, uint everyoneMask, uint nextOwnerMask, uint groupMask, int creationDate) | 781 | uint baseMask, uint currentMask, uint everyoneMask, uint nextOwnerMask, uint groupMask, int creationDate) |
781 | { | 782 | { |
782 | InventoryItemBase item = new InventoryItemBase(); | 783 | InventoryItemBase item = new InventoryItemBase(); |
783 | item.Owner = remoteClient.AgentId; | 784 | item.Owner = remoteClient.AgentId; |
784 | item.CreatorId = creatorID; | 785 | item.CreatorId = creatorID; |
786 | item.CreatorData = creatorData; | ||
785 | item.ID = UUID.Random(); | 787 | item.ID = UUID.Random(); |
786 | item.AssetID = asset.FullID; | 788 | item.AssetID = asset.FullID; |
787 | item.Description = asset.Description; | 789 | item.Description = asset.Description; |
@@ -861,7 +863,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
861 | AssetBase asset = CreateAsset(name, description, assetType, data, remoteClient.AgentId); | 863 | AssetBase asset = CreateAsset(name, description, assetType, data, remoteClient.AgentId); |
862 | AssetService.Store(asset); | 864 | AssetService.Store(asset); |
863 | 865 | ||
864 | CreateNewInventoryItem(remoteClient, remoteClient.AgentId.ToString(), folderID, asset.Name, 0, callbackID, asset, invType, nextOwnerMask, creationDate); | 866 | CreateNewInventoryItem(remoteClient, remoteClient.AgentId.ToString(), string.Empty, folderID, asset.Name, 0, callbackID, asset, invType, nextOwnerMask, creationDate); |
865 | } | 867 | } |
866 | else | 868 | else |
867 | { | 869 | { |
@@ -903,7 +905,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
903 | asset.Description = description; | 905 | asset.Description = description; |
904 | 906 | ||
905 | CreateNewInventoryItem( | 907 | CreateNewInventoryItem( |
906 | remoteClient, remoteClient.AgentId.ToString(), folderID, name, 0, callbackID, asset, invType, | 908 | remoteClient, remoteClient.AgentId.ToString(), string.Empty, folderID, name, 0, callbackID, asset, invType, |
907 | (uint)PermissionMask.All, (uint)PermissionMask.All, (uint)PermissionMask.All, | 909 | (uint)PermissionMask.All, (uint)PermissionMask.All, (uint)PermissionMask.All, |
908 | (uint)PermissionMask.All, (uint)PermissionMask.All, Util.UnixTimeSinceEpoch()); | 910 | (uint)PermissionMask.All, (uint)PermissionMask.All, Util.UnixTimeSinceEpoch()); |
909 | } | 911 | } |
@@ -1031,6 +1033,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1031 | 1033 | ||
1032 | agentItem.ID = UUID.Random(); | 1034 | agentItem.ID = UUID.Random(); |
1033 | agentItem.CreatorId = taskItem.CreatorID.ToString(); | 1035 | agentItem.CreatorId = taskItem.CreatorID.ToString(); |
1036 | agentItem.CreatorData = taskItem.CreatorData; | ||
1034 | agentItem.Owner = destAgent; | 1037 | agentItem.Owner = destAgent; |
1035 | agentItem.AssetID = taskItem.AssetID; | 1038 | agentItem.AssetID = taskItem.AssetID; |
1036 | agentItem.Description = taskItem.Description; | 1039 | agentItem.Description = taskItem.Description; |
@@ -1232,6 +1235,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1232 | 1235 | ||
1233 | destTaskItem.ItemID = UUID.Random(); | 1236 | destTaskItem.ItemID = UUID.Random(); |
1234 | destTaskItem.CreatorID = srcTaskItem.CreatorID; | 1237 | destTaskItem.CreatorID = srcTaskItem.CreatorID; |
1238 | destTaskItem.CreatorData = srcTaskItem.CreatorData; | ||
1235 | destTaskItem.AssetID = srcTaskItem.AssetID; | 1239 | destTaskItem.AssetID = srcTaskItem.AssetID; |
1236 | destTaskItem.GroupID = destPart.GroupID; | 1240 | destTaskItem.GroupID = destPart.GroupID; |
1237 | destTaskItem.OwnerID = destPart.OwnerID; | 1241 | destTaskItem.OwnerID = destPart.OwnerID; |
@@ -1637,6 +1641,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1637 | 1641 | ||
1638 | destTaskItem.ItemID = UUID.Random(); | 1642 | destTaskItem.ItemID = UUID.Random(); |
1639 | destTaskItem.CreatorID = srcTaskItem.CreatorID; | 1643 | destTaskItem.CreatorID = srcTaskItem.CreatorID; |
1644 | destTaskItem.CreatorData = srcTaskItem.CreatorData; | ||
1640 | destTaskItem.AssetID = srcTaskItem.AssetID; | 1645 | destTaskItem.AssetID = srcTaskItem.AssetID; |
1641 | destTaskItem.GroupID = destPart.GroupID; | 1646 | destTaskItem.GroupID = destPart.GroupID; |
1642 | destTaskItem.OwnerID = destPart.OwnerID; | 1647 | destTaskItem.OwnerID = destPart.OwnerID; |
@@ -1873,6 +1878,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1873 | 1878 | ||
1874 | InventoryItemBase item = new InventoryItemBase(); | 1879 | InventoryItemBase item = new InventoryItemBase(); |
1875 | item.CreatorId = grp.RootPart.CreatorID.ToString(); | 1880 | item.CreatorId = grp.RootPart.CreatorID.ToString(); |
1881 | item.CreatorData = grp.RootPart.CreatorData; | ||
1876 | item.Owner = remoteClient.AgentId; | 1882 | item.Owner = remoteClient.AgentId; |
1877 | item.ID = UUID.Random(); | 1883 | item.ID = UUID.Random(); |
1878 | item.AssetID = asset.FullID; | 1884 | item.AssetID = asset.FullID; |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs index 21c36d3..ab567fb 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs | |||
@@ -462,22 +462,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
462 | ); | 462 | ); |
463 | } | 463 | } |
464 | 464 | ||
465 | public void HandleUUIDNameRequest(UUID uuid, IClientAPI remote_client) | ||
466 | { | ||
467 | if (LibraryService != null && (LibraryService.LibraryRootFolder.Owner == uuid)) | ||
468 | { | ||
469 | remote_client.SendNameReply(uuid, "Mr", "OpenSim"); | ||
470 | } | ||
471 | else | ||
472 | { | ||
473 | string[] names = GetUserNames(uuid); | ||
474 | if (names.Length == 2) | ||
475 | { | ||
476 | remote_client.SendNameReply(uuid, names[0], names[1]); | ||
477 | } | ||
478 | |||
479 | } | ||
480 | } | ||
481 | 465 | ||
482 | /// <summary> | 466 | /// <summary> |
483 | /// Handle a fetch inventory request from the client | 467 | /// Handle a fetch inventory request from the client |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index a0ae82f..d3a4678 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -188,6 +188,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
188 | private Timer m_mapGenerationTimer = new Timer(); | 188 | private Timer m_mapGenerationTimer = new Timer(); |
189 | private bool m_generateMaptiles; | 189 | private bool m_generateMaptiles; |
190 | 190 | ||
191 | private Dictionary<UUID, string[]> m_UserNamesCache = new Dictionary<UUID, string[]>(); | ||
192 | |||
191 | #endregion Fields | 193 | #endregion Fields |
192 | 194 | ||
193 | #region Properties | 195 | #region Properties |
@@ -814,36 +816,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
814 | return m_simulatorVersion; | 816 | return m_simulatorVersion; |
815 | } | 817 | } |
816 | 818 | ||
817 | public string[] GetUserNames(UUID uuid) | ||
818 | { | ||
819 | string[] returnstring = new string[0]; | ||
820 | |||
821 | UserAccount account = UserAccountService.GetUserAccount(RegionInfo.ScopeID, uuid); | ||
822 | |||
823 | if (account != null) | ||
824 | { | ||
825 | returnstring = new string[2]; | ||
826 | returnstring[0] = account.FirstName; | ||
827 | returnstring[1] = account.LastName; | ||
828 | } | ||
829 | |||
830 | return returnstring; | ||
831 | } | ||
832 | |||
833 | public string GetUserName(UUID uuid) | ||
834 | { | ||
835 | string[] names = GetUserNames(uuid); | ||
836 | if (names.Length == 2) | ||
837 | { | ||
838 | string firstname = names[0]; | ||
839 | string lastname = names[1]; | ||
840 | |||
841 | return firstname + " " + lastname; | ||
842 | |||
843 | } | ||
844 | return "(hippos)"; | ||
845 | } | ||
846 | |||
847 | /// <summary> | 819 | /// <summary> |
848 | /// Another region is up. | 820 | /// Another region is up. |
849 | /// | 821 | /// |
@@ -2907,7 +2879,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2907 | 2879 | ||
2908 | public virtual void SubscribeToClientGridEvents(IClientAPI client) | 2880 | public virtual void SubscribeToClientGridEvents(IClientAPI client) |
2909 | { | 2881 | { |
2910 | client.OnNameFromUUIDRequest += HandleUUIDNameRequest; | 2882 | //client.OnNameFromUUIDRequest += HandleUUIDNameRequest; |
2911 | client.OnMoneyTransferRequest += ProcessMoneyTransferRequest; | 2883 | client.OnMoneyTransferRequest += ProcessMoneyTransferRequest; |
2912 | client.OnAvatarPickerRequest += ProcessAvatarPickerRequest; | 2884 | client.OnAvatarPickerRequest += ProcessAvatarPickerRequest; |
2913 | client.OnSetStartLocationRequest += SetHomeRezPoint; | 2885 | client.OnSetStartLocationRequest += SetHomeRezPoint; |
@@ -3034,7 +3006,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3034 | 3006 | ||
3035 | public virtual void UnSubscribeToClientGridEvents(IClientAPI client) | 3007 | public virtual void UnSubscribeToClientGridEvents(IClientAPI client) |
3036 | { | 3008 | { |
3037 | client.OnNameFromUUIDRequest -= HandleUUIDNameRequest; | 3009 | //client.OnNameFromUUIDRequest -= HandleUUIDNameRequest; |
3038 | client.OnMoneyTransferRequest -= ProcessMoneyTransferRequest; | 3010 | client.OnMoneyTransferRequest -= ProcessMoneyTransferRequest; |
3039 | client.OnAvatarPickerRequest -= ProcessAvatarPickerRequest; | 3011 | client.OnAvatarPickerRequest -= ProcessAvatarPickerRequest; |
3040 | client.OnSetStartLocationRequest -= SetHomeRezPoint; | 3012 | client.OnSetStartLocationRequest -= SetHomeRezPoint; |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index b615d42..f69a30c 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -445,6 +445,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
445 | private DateTime m_expires; | 445 | private DateTime m_expires; |
446 | private DateTime m_rezzed; | 446 | private DateTime m_rezzed; |
447 | private bool m_createSelected = false; | 447 | private bool m_createSelected = false; |
448 | private string m_creatorData = string.Empty; | ||
448 | 449 | ||
449 | public UUID CreatorID | 450 | public UUID CreatorID |
450 | { | 451 | { |
@@ -458,6 +459,61 @@ namespace OpenSim.Region.Framework.Scenes | |||
458 | } | 459 | } |
459 | } | 460 | } |
460 | 461 | ||
462 | public string CreatorData // = <profile url>;<name> | ||
463 | { | ||
464 | get { return m_creatorData; } | ||
465 | set { m_creatorData = value; } | ||
466 | } | ||
467 | |||
468 | /// <summary> | ||
469 | /// Used by the DB layer to retrieve / store the entire user identification. | ||
470 | /// The identification can either be a simple UUID or a string of the form | ||
471 | /// uuid[;profile_url[;name]] | ||
472 | /// </summary> | ||
473 | public string CreatorIdentification | ||
474 | { | ||
475 | get | ||
476 | { | ||
477 | if (m_creatorData != null && m_creatorData != string.Empty) | ||
478 | return _creatorID.ToString() + ';' + m_creatorData; | ||
479 | else | ||
480 | return _creatorID.ToString(); | ||
481 | } | ||
482 | set | ||
483 | { | ||
484 | if ((value == null) || (value != null && value == string.Empty)) | ||
485 | { | ||
486 | m_creatorData = string.Empty; | ||
487 | return; | ||
488 | } | ||
489 | |||
490 | if (!value.Contains(";")) // plain UUID | ||
491 | { | ||
492 | UUID uuid = UUID.Zero; | ||
493 | UUID.TryParse(value, out uuid); | ||
494 | _creatorID = uuid; | ||
495 | } | ||
496 | else // <uuid>[;<endpoint>[;name]] | ||
497 | { | ||
498 | string name = "Unknown User"; | ||
499 | string[] parts = value.Split(';'); | ||
500 | if (parts.Length >= 1) | ||
501 | { | ||
502 | UUID uuid = UUID.Zero; | ||
503 | UUID.TryParse(parts[0], out uuid); | ||
504 | _creatorID = uuid; | ||
505 | } | ||
506 | if (parts.Length >= 2) | ||
507 | m_creatorData = parts[1]; | ||
508 | if (parts.Length >= 3) | ||
509 | name = parts[2]; | ||
510 | |||
511 | m_creatorData += ';' + name; | ||
512 | |||
513 | } | ||
514 | } | ||
515 | } | ||
516 | |||
461 | /// <summary> | 517 | /// <summary> |
462 | /// A relic from when we we thought that prims contained folder objects. In | 518 | /// A relic from when we we thought that prims contained folder objects. In |
463 | /// reality, prim == folder | 519 | /// reality, prim == folder |
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs index dfc69d8..1fe31b0 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | |||
@@ -34,6 +34,7 @@ using System.Xml; | |||
34 | using log4net; | 34 | using log4net; |
35 | using OpenMetaverse; | 35 | using OpenMetaverse; |
36 | using OpenSim.Framework; | 36 | using OpenSim.Framework; |
37 | using OpenSim.Region.Framework.Interfaces; | ||
37 | using OpenSim.Region.Framework.Scenes; | 38 | using OpenSim.Region.Framework.Scenes; |
38 | 39 | ||
39 | namespace OpenSim.Region.Framework.Scenes.Serialization | 40 | namespace OpenSim.Region.Framework.Scenes.Serialization |
@@ -46,6 +47,8 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
46 | public class SceneObjectSerializer | 47 | public class SceneObjectSerializer |
47 | { | 48 | { |
48 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 49 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
50 | |||
51 | private static IUserManagement m_UserManagement; | ||
49 | 52 | ||
50 | /// <summary> | 53 | /// <summary> |
51 | /// Deserialize a scene object from the original xml format | 54 | /// Deserialize a scene object from the original xml format |
@@ -270,6 +273,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
270 | #region SOPXmlProcessors initialization | 273 | #region SOPXmlProcessors initialization |
271 | m_SOPXmlProcessors.Add("AllowedDrop", ProcessAllowedDrop); | 274 | m_SOPXmlProcessors.Add("AllowedDrop", ProcessAllowedDrop); |
272 | m_SOPXmlProcessors.Add("CreatorID", ProcessCreatorID); | 275 | m_SOPXmlProcessors.Add("CreatorID", ProcessCreatorID); |
276 | m_SOPXmlProcessors.Add("CreatorData", ProcessCreatorData); | ||
273 | m_SOPXmlProcessors.Add("FolderID", ProcessFolderID); | 277 | m_SOPXmlProcessors.Add("FolderID", ProcessFolderID); |
274 | m_SOPXmlProcessors.Add("InventorySerial", ProcessInventorySerial); | 278 | m_SOPXmlProcessors.Add("InventorySerial", ProcessInventorySerial); |
275 | m_SOPXmlProcessors.Add("TaskInventory", ProcessTaskInventory); | 279 | m_SOPXmlProcessors.Add("TaskInventory", ProcessTaskInventory); |
@@ -327,6 +331,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
327 | m_TaskInventoryXmlProcessors.Add("BasePermissions", ProcessTIBasePermissions); | 331 | m_TaskInventoryXmlProcessors.Add("BasePermissions", ProcessTIBasePermissions); |
328 | m_TaskInventoryXmlProcessors.Add("CreationDate", ProcessTICreationDate); | 332 | m_TaskInventoryXmlProcessors.Add("CreationDate", ProcessTICreationDate); |
329 | m_TaskInventoryXmlProcessors.Add("CreatorID", ProcessTICreatorID); | 333 | m_TaskInventoryXmlProcessors.Add("CreatorID", ProcessTICreatorID); |
334 | m_TaskInventoryXmlProcessors.Add("CreatorData", ProcessTICreatorData); | ||
330 | m_TaskInventoryXmlProcessors.Add("Description", ProcessTIDescription); | 335 | m_TaskInventoryXmlProcessors.Add("Description", ProcessTIDescription); |
331 | m_TaskInventoryXmlProcessors.Add("EveryonePermissions", ProcessTIEveryonePermissions); | 336 | m_TaskInventoryXmlProcessors.Add("EveryonePermissions", ProcessTIEveryonePermissions); |
332 | m_TaskInventoryXmlProcessors.Add("Flags", ProcessTIFlags); | 337 | m_TaskInventoryXmlProcessors.Add("Flags", ProcessTIFlags); |
@@ -412,6 +417,11 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
412 | obj.CreatorID = ReadUUID(reader, "CreatorID"); | 417 | obj.CreatorID = ReadUUID(reader, "CreatorID"); |
413 | } | 418 | } |
414 | 419 | ||
420 | private static void ProcessCreatorData(SceneObjectPart obj, XmlTextReader reader) | ||
421 | { | ||
422 | obj.CreatorData = reader.ReadElementContentAsString("CreatorData", String.Empty); | ||
423 | } | ||
424 | |||
415 | private static void ProcessFolderID(SceneObjectPart obj, XmlTextReader reader) | 425 | private static void ProcessFolderID(SceneObjectPart obj, XmlTextReader reader) |
416 | { | 426 | { |
417 | obj.FolderID = ReadUUID(reader, "FolderID"); | 427 | obj.FolderID = ReadUUID(reader, "FolderID"); |
@@ -698,6 +708,11 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
698 | item.CreatorID = ReadUUID(reader, "CreatorID"); | 708 | item.CreatorID = ReadUUID(reader, "CreatorID"); |
699 | } | 709 | } |
700 | 710 | ||
711 | private static void ProcessTICreatorData(TaskInventoryItem item, XmlTextReader reader) | ||
712 | { | ||
713 | item.CreatorData = reader.ReadElementContentAsString("CreatorData", String.Empty); | ||
714 | } | ||
715 | |||
701 | private static void ProcessTIDescription(TaskInventoryItem item, XmlTextReader reader) | 716 | private static void ProcessTIDescription(TaskInventoryItem item, XmlTextReader reader) |
702 | { | 717 | { |
703 | item.Description = reader.ReadElementContentAsString("Description", String.Empty); | 718 | item.Description = reader.ReadElementContentAsString("Description", String.Empty); |
@@ -1077,11 +1092,23 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
1077 | writer.WriteAttributeString("xmlns:xsd", "http://www.w3.org/2001/XMLSchema"); | 1092 | writer.WriteAttributeString("xmlns:xsd", "http://www.w3.org/2001/XMLSchema"); |
1078 | 1093 | ||
1079 | writer.WriteElementString("AllowedDrop", sop.AllowedDrop.ToString().ToLower()); | 1094 | writer.WriteElementString("AllowedDrop", sop.AllowedDrop.ToString().ToLower()); |
1095 | |||
1080 | WriteUUID(writer, "CreatorID", sop.CreatorID, options); | 1096 | WriteUUID(writer, "CreatorID", sop.CreatorID, options); |
1097 | |||
1098 | if (sop.CreatorData != null && sop.CreatorData != string.Empty) | ||
1099 | writer.WriteElementString("CreatorData", sop.CreatorData); | ||
1100 | else if (options.ContainsKey("profile")) | ||
1101 | { | ||
1102 | if (m_UserManagement == null) | ||
1103 | m_UserManagement = sop.ParentGroup.Scene.RequestModuleInterface<IUserManagement>(); | ||
1104 | string name = m_UserManagement.GetUserName(sop.CreatorID); | ||
1105 | writer.WriteElementString("CreatorData", (string)options["profile"] + "/" + sop.CreatorID + ";" + name); | ||
1106 | } | ||
1107 | |||
1081 | WriteUUID(writer, "FolderID", sop.FolderID, options); | 1108 | WriteUUID(writer, "FolderID", sop.FolderID, options); |
1082 | writer.WriteElementString("InventorySerial", sop.InventorySerial.ToString()); | 1109 | writer.WriteElementString("InventorySerial", sop.InventorySerial.ToString()); |
1083 | 1110 | ||
1084 | WriteTaskInventory(writer, sop.TaskInventory, options); | 1111 | WriteTaskInventory(writer, sop.TaskInventory, options, sop.ParentGroup.Scene); |
1085 | 1112 | ||
1086 | WriteUUID(writer, "UUID", sop.UUID, options); | 1113 | WriteUUID(writer, "UUID", sop.UUID, options); |
1087 | writer.WriteElementString("LocalId", sop.LocalId.ToString()); | 1114 | writer.WriteElementString("LocalId", sop.LocalId.ToString()); |
@@ -1205,7 +1232,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
1205 | writer.WriteElementString(name, flagsStr); | 1232 | writer.WriteElementString(name, flagsStr); |
1206 | } | 1233 | } |
1207 | 1234 | ||
1208 | static void WriteTaskInventory(XmlTextWriter writer, TaskInventoryDictionary tinv, Dictionary<string, object> options) | 1235 | static void WriteTaskInventory(XmlTextWriter writer, TaskInventoryDictionary tinv, Dictionary<string, object> options, Scene scene) |
1209 | { | 1236 | { |
1210 | if (tinv.Count > 0) // otherwise skip this | 1237 | if (tinv.Count > 0) // otherwise skip this |
1211 | { | 1238 | { |
@@ -1218,7 +1245,20 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
1218 | WriteUUID(writer, "AssetID", item.AssetID, options); | 1245 | WriteUUID(writer, "AssetID", item.AssetID, options); |
1219 | writer.WriteElementString("BasePermissions", item.BasePermissions.ToString()); | 1246 | writer.WriteElementString("BasePermissions", item.BasePermissions.ToString()); |
1220 | writer.WriteElementString("CreationDate", item.CreationDate.ToString()); | 1247 | writer.WriteElementString("CreationDate", item.CreationDate.ToString()); |
1248 | |||
1249 | |||
1221 | WriteUUID(writer, "CreatorID", item.CreatorID, options); | 1250 | WriteUUID(writer, "CreatorID", item.CreatorID, options); |
1251 | |||
1252 | if (item.CreatorData != null && item.CreatorData != string.Empty) | ||
1253 | writer.WriteElementString("CreatorData", item.CreatorData); | ||
1254 | else if (options.ContainsKey("profile")) | ||
1255 | { | ||
1256 | if (m_UserManagement == null) | ||
1257 | m_UserManagement = scene.RequestModuleInterface<IUserManagement>(); | ||
1258 | string name = m_UserManagement.GetUserName(item.CreatorID); | ||
1259 | writer.WriteElementString("CreatorData", (string)options["profile"] + "/" + item.CreatorID + ";" + name); | ||
1260 | } | ||
1261 | |||
1222 | writer.WriteElementString("Description", item.Description); | 1262 | writer.WriteElementString("Description", item.Description); |
1223 | writer.WriteElementString("EveryonePermissions", item.EveryonePermissions.ToString()); | 1263 | writer.WriteElementString("EveryonePermissions", item.EveryonePermissions.ToString()); |
1224 | writer.WriteElementString("Flags", item.Flags.ToString()); | 1264 | writer.WriteElementString("Flags", item.Flags.ToString()); |
diff --git a/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs b/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs index e3d30e5..456b6fc 100644 --- a/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs +++ b/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs | |||
@@ -602,6 +602,7 @@ namespace OpenSim.Server.Handlers.Asset | |||
602 | ret["BasePermissions"] = item.BasePermissions.ToString(); | 602 | ret["BasePermissions"] = item.BasePermissions.ToString(); |
603 | ret["CreationDate"] = item.CreationDate.ToString(); | 603 | ret["CreationDate"] = item.CreationDate.ToString(); |
604 | ret["CreatorId"] = item.CreatorId.ToString(); | 604 | ret["CreatorId"] = item.CreatorId.ToString(); |
605 | ret["CreatorData"] = item.CreatorData.ToString(); | ||
605 | ret["CurrentPermissions"] = item.CurrentPermissions.ToString(); | 606 | ret["CurrentPermissions"] = item.CurrentPermissions.ToString(); |
606 | ret["Description"] = item.Description.ToString(); | 607 | ret["Description"] = item.Description.ToString(); |
607 | ret["EveryOnePermissions"] = item.EveryOnePermissions.ToString(); | 608 | ret["EveryOnePermissions"] = item.EveryOnePermissions.ToString(); |
@@ -647,6 +648,7 @@ namespace OpenSim.Server.Handlers.Asset | |||
647 | item.InvType = int.Parse(data["InvType"].ToString()); | 648 | item.InvType = int.Parse(data["InvType"].ToString()); |
648 | item.Folder = new UUID(data["Folder"].ToString()); | 649 | item.Folder = new UUID(data["Folder"].ToString()); |
649 | item.CreatorId = data["CreatorId"].ToString(); | 650 | item.CreatorId = data["CreatorId"].ToString(); |
651 | item.CreatorData = data["CreatorData"].ToString(); | ||
650 | item.Description = data["Description"].ToString(); | 652 | item.Description = data["Description"].ToString(); |
651 | item.NextPermissions = uint.Parse(data["NextPermissions"].ToString()); | 653 | item.NextPermissions = uint.Parse(data["NextPermissions"].ToString()); |
652 | item.CurrentPermissions = uint.Parse(data["CurrentPermissions"].ToString()); | 654 | item.CurrentPermissions = uint.Parse(data["CurrentPermissions"].ToString()); |
diff --git a/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs b/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs index 403ee15..88fbda3 100644 --- a/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs +++ b/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs | |||
@@ -312,6 +312,7 @@ namespace OpenSim.Services.Connectors | |||
312 | { "InvType", item.InvType.ToString() }, | 312 | { "InvType", item.InvType.ToString() }, |
313 | { "Folder", item.Folder.ToString() }, | 313 | { "Folder", item.Folder.ToString() }, |
314 | { "CreatorId", item.CreatorId.ToString() }, | 314 | { "CreatorId", item.CreatorId.ToString() }, |
315 | { "CreatorData", item.CreatorData.ToString() }, | ||
315 | { "Description", item.Description.ToString() }, | 316 | { "Description", item.Description.ToString() }, |
316 | { "NextPermissions", item.NextPermissions.ToString() }, | 317 | { "NextPermissions", item.NextPermissions.ToString() }, |
317 | { "CurrentPermissions", item.CurrentPermissions.ToString() }, | 318 | { "CurrentPermissions", item.CurrentPermissions.ToString() }, |
@@ -344,6 +345,7 @@ namespace OpenSim.Services.Connectors | |||
344 | { "InvType", item.InvType.ToString() }, | 345 | { "InvType", item.InvType.ToString() }, |
345 | { "Folder", item.Folder.ToString() }, | 346 | { "Folder", item.Folder.ToString() }, |
346 | { "CreatorId", item.CreatorId.ToString() }, | 347 | { "CreatorId", item.CreatorId.ToString() }, |
348 | { "CreatorData", item.CreatorData.ToString() }, | ||
347 | { "Description", item.Description.ToString() }, | 349 | { "Description", item.Description.ToString() }, |
348 | { "NextPermissions", item.NextPermissions.ToString() }, | 350 | { "NextPermissions", item.NextPermissions.ToString() }, |
349 | { "CurrentPermissions", item.CurrentPermissions.ToString() }, | 351 | { "CurrentPermissions", item.CurrentPermissions.ToString() }, |
@@ -556,6 +558,7 @@ namespace OpenSim.Services.Connectors | |||
556 | item.InvType = int.Parse(data["InvType"].ToString()); | 558 | item.InvType = int.Parse(data["InvType"].ToString()); |
557 | item.Folder = new UUID(data["Folder"].ToString()); | 559 | item.Folder = new UUID(data["Folder"].ToString()); |
558 | item.CreatorId = data["CreatorId"].ToString(); | 560 | item.CreatorId = data["CreatorId"].ToString(); |
561 | item.CreatorData = data["CreatorData"].ToString(); | ||
559 | item.Description = data["Description"].ToString(); | 562 | item.Description = data["Description"].ToString(); |
560 | item.NextPermissions = uint.Parse(data["NextPermissions"].ToString()); | 563 | item.NextPermissions = uint.Parse(data["NextPermissions"].ToString()); |
561 | item.CurrentPermissions = uint.Parse(data["CurrentPermissions"].ToString()); | 564 | item.CurrentPermissions = uint.Parse(data["CurrentPermissions"].ToString()); |
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs index 21ad4ab..61f3fbe 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs | |||
@@ -612,6 +612,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
612 | { "Name", item.Name }, | 612 | { "Name", item.Name }, |
613 | { "Description", item.Description }, | 613 | { "Description", item.Description }, |
614 | { "CreatorID", item.CreatorId }, | 614 | { "CreatorID", item.CreatorId }, |
615 | { "CreatorData", item.CreatorData }, | ||
615 | { "ContentType", invContentType }, | 616 | { "ContentType", invContentType }, |
616 | { "ExtraData", OSDParser.SerializeJsonString(extraData) } | 617 | { "ExtraData", OSDParser.SerializeJsonString(extraData) } |
617 | }; | 618 | }; |
@@ -776,6 +777,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
776 | invItem.AssetType = SLUtil.ContentTypeToSLAssetType(item["ContentType"].AsString()); | 777 | invItem.AssetType = SLUtil.ContentTypeToSLAssetType(item["ContentType"].AsString()); |
777 | invItem.CreationDate = item["CreationDate"].AsInteger(); | 778 | invItem.CreationDate = item["CreationDate"].AsInteger(); |
778 | invItem.CreatorId = item["CreatorID"].AsString(); | 779 | invItem.CreatorId = item["CreatorID"].AsString(); |
780 | invItem.CreatorData = item["CreatorData"].AsString(); | ||
779 | invItem.CreatorIdAsUuid = item["CreatorID"].AsUUID(); | 781 | invItem.CreatorIdAsUuid = item["CreatorID"].AsUUID(); |
780 | invItem.Description = item["Description"].AsString(); | 782 | invItem.Description = item["Description"].AsString(); |
781 | invItem.Folder = item["ParentID"].AsUUID(); | 783 | invItem.Folder = item["ParentID"].AsUUID(); |
diff --git a/OpenSim/Services/InventoryService/XInventoryService.cs b/OpenSim/Services/InventoryService/XInventoryService.cs index fb395ec..e602412 100644 --- a/OpenSim/Services/InventoryService/XInventoryService.cs +++ b/OpenSim/Services/InventoryService/XInventoryService.cs | |||
@@ -524,7 +524,7 @@ namespace OpenSim.Services.InventoryService | |||
524 | newItem.ID = item.inventoryID; | 524 | newItem.ID = item.inventoryID; |
525 | newItem.InvType = item.invType; | 525 | newItem.InvType = item.invType; |
526 | newItem.Folder = item.parentFolderID; | 526 | newItem.Folder = item.parentFolderID; |
527 | newItem.CreatorId = item.creatorID; | 527 | newItem.CreatorIdentification = item.creatorID; |
528 | newItem.Description = item.inventoryDescription; | 528 | newItem.Description = item.inventoryDescription; |
529 | newItem.NextPermissions = (uint)item.inventoryNextPermissions; | 529 | newItem.NextPermissions = (uint)item.inventoryNextPermissions; |
530 | newItem.CurrentPermissions = (uint)item.inventoryCurrentPermissions; | 530 | newItem.CurrentPermissions = (uint)item.inventoryCurrentPermissions; |
@@ -555,7 +555,7 @@ namespace OpenSim.Services.InventoryService | |||
555 | newItem.inventoryID = item.ID; | 555 | newItem.inventoryID = item.ID; |
556 | newItem.invType = item.InvType; | 556 | newItem.invType = item.InvType; |
557 | newItem.parentFolderID = item.Folder; | 557 | newItem.parentFolderID = item.Folder; |
558 | newItem.creatorID = item.CreatorId; | 558 | newItem.creatorID = item.CreatorIdentification; |
559 | newItem.inventoryDescription = item.Description; | 559 | newItem.inventoryDescription = item.Description; |
560 | newItem.inventoryNextPermissions = (int)item.NextPermissions; | 560 | newItem.inventoryNextPermissions = (int)item.NextPermissions; |
561 | newItem.inventoryCurrentPermissions = (int)item.CurrentPermissions; | 561 | newItem.inventoryCurrentPermissions = (int)item.CurrentPermissions; |