aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Client/MXP/ClientStack/MXPClientView.cs4
-rw-r--r--OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs4
-rw-r--r--OpenSim/Data/MySQL/MySQLGenericTableHandler.cs35
-rw-r--r--OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs21
-rw-r--r--OpenSim/Framework/IClientAPI.cs2
-rw-r--r--OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs14
-rw-r--r--OpenSim/Framework/Servers/VersionInfo.cs2
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs17
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs13
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Profiles/AvatarProfilesModule.cs13
-rw-r--r--OpenSim/Region/CoreModules/Framework/Library/LibraryModule.cs219
-rw-r--r--OpenSim/Region/CoreModules/Framework/Library/LocalInventoryService.cs263
-rw-r--r--OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml1
-rw-r--r--OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs4
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneGraph.cs24
-rw-r--r--OpenSim/Region/Framework/Scenes/UuidGatherer.cs43
-rw-r--r--OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs4
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs2
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IWorld.cs1
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs9
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/World.cs6
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs4
-rw-r--r--OpenSim/Region/Physics/ChOdePlugin/ODEPrim.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs38
-rw-r--r--OpenSim/Tests/Common/Mock/TestClient.cs5
-rw-r--r--bin/Library/.keep0
-rw-r--r--bin/config-include/Standalone.ini2
-rw-r--r--bin/config-include/StandaloneCommon.ini.example4
-rw-r--r--bin/config-include/StandaloneHypergrid.ini2
30 files changed, 744 insertions, 20 deletions
diff --git a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs
index 9f9d151..6e04a40 100644
--- a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs
+++ b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs
@@ -1655,5 +1655,9 @@ namespace OpenSim.Client.MXP.ClientStack
1655 public void SendRebakeAvatarTextures(UUID textureID) 1655 public void SendRebakeAvatarTextures(UUID textureID)
1656 { 1656 {
1657 } 1657 }
1658
1659 public void SendAvatarInterestsReply(UUID avatarID, uint wantMask, string wantText, uint skillsMask, string skillsText, string languages)
1660 {
1661 }
1658 } 1662 }
1659} 1663}
diff --git a/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs b/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs
index 533475f..02b1dee 100644
--- a/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs
+++ b/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs
@@ -1161,5 +1161,9 @@ namespace OpenSim.Client.VWoHTTP.ClientStack
1161 public void SendRebakeAvatarTextures(UUID textureID) 1161 public void SendRebakeAvatarTextures(UUID textureID)
1162 { 1162 {
1163 } 1163 }
1164
1165 public void SendAvatarInterestsReply(UUID avatarID, uint wantMask, string wantText, uint skillsMask, string skillsText, string languages)
1166 {
1167 }
1164 } 1168 }
1165} 1169}
diff --git a/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs b/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs
index 2f5937d..4dfc324 100644
--- a/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs
+++ b/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs
@@ -37,7 +37,7 @@ using OpenSim.Region.Framework.Interfaces;
37 37
38namespace OpenSim.Data.MySQL 38namespace OpenSim.Data.MySQL
39{ 39{
40 public class MySQLGenericTableHandler<T> : MySqlFramework where T: struct 40 public class MySQLGenericTableHandler<T> : MySqlFramework where T: class, new()
41 { 41 {
42 private static readonly ILog m_log = 42 private static readonly ILog m_log =
43 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 43 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@@ -63,7 +63,7 @@ namespace OpenSim.Data.MySQL
63 } 63 }
64 64
65 Type t = typeof(T); 65 Type t = typeof(T);
66 FieldInfo[] fields = t.GetFields(BindingFlags.NonPublic | 66 FieldInfo[] fields = t.GetFields(BindingFlags.Public |
67 BindingFlags.Instance | 67 BindingFlags.Instance |
68 BindingFlags.DeclaredOnly); 68 BindingFlags.DeclaredOnly);
69 69
@@ -165,7 +165,11 @@ namespace OpenSim.Data.MySQL
165 new Dictionary<string, string>(); 165 new Dictionary<string, string>();
166 166
167 foreach (string col in m_ColumnNames) 167 foreach (string col in m_ColumnNames)
168 {
168 data[col] = reader[col].ToString(); 169 data[col] = reader[col].ToString();
170 if (data[col] == null)
171 data[col] = String.Empty;
172 }
169 173
170 m_DataField.SetValue(row, data); 174 m_DataField.SetValue(row, data);
171 } 175 }
@@ -195,6 +199,33 @@ namespace OpenSim.Data.MySQL
195 MySqlCommand cmd = new MySqlCommand(); 199 MySqlCommand cmd = new MySqlCommand();
196 200
197 string query = ""; 201 string query = "";
202 List<String> names = new List<String>();
203 List<String> values = new List<String>();
204
205 foreach (FieldInfo fi in m_Fields.Values)
206 {
207 names.Add(fi.Name);
208 values.Add(fi.GetValue(row).ToString());
209 }
210
211 if (m_DataField != null)
212 {
213 Dictionary<string, string> data =
214 (Dictionary<string, string>)m_DataField.GetValue(row);
215
216 foreach (KeyValuePair<string, string> kvp in data)
217 {
218 names.Add(kvp.Key);
219 values.Add(kvp.Value);
220 }
221 }
222
223 query = String.Format("replace into {0} (`", m_Realm) + String.Join("`,`", names.ToArray()) + "`) values ('" + String.Join("','", values.ToArray()) + "')";
224
225 cmd.CommandText = query;
226
227 if (ExecuteNonQuery(cmd) > 0)
228 return true;
198 229
199 return false; 230 return false;
200 } 231 }
diff --git a/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs b/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs
index 42e6510..74ba0a5 100644
--- a/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs
+++ b/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs
@@ -232,7 +232,26 @@ namespace OpenSim.Framework.Communications.Cache
232 /// <returns></returns> 232 /// <returns></returns>
233 public Dictionary<UUID, InventoryFolderImpl> RequestSelfAndDescendentFolders() 233 public Dictionary<UUID, InventoryFolderImpl> RequestSelfAndDescendentFolders()
234 { 234 {
235 return libraryFolders; 235 Dictionary<UUID, InventoryFolderImpl> fs = new Dictionary<UUID, InventoryFolderImpl>();
236 fs.Add(ID, this);
237 List<InventoryFolderImpl> fis = TraverseFolder(this);
238 foreach (InventoryFolderImpl f in fis)
239 {
240 fs.Add(f.ID, f);
241 }
242 //return libraryFolders;
243 return fs;
244 }
245
246 private List<InventoryFolderImpl> TraverseFolder(InventoryFolderImpl node)
247 {
248 List<InventoryFolderImpl> folders = node.RequestListOfFolderImpls();
249 List<InventoryFolderImpl> subs = new List<InventoryFolderImpl>();
250 foreach (InventoryFolderImpl f in folders)
251 subs.AddRange(TraverseFolder(f));
252
253 folders.AddRange(subs);
254 return folders;
236 } 255 }
237 } 256 }
238} 257}
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index cb136e2..d8743b5 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -1392,5 +1392,7 @@ namespace OpenSim.Framework
1392 bool AddGenericPacketHandler(string MethodName, GenericMessage handler); 1392 bool AddGenericPacketHandler(string MethodName, GenericMessage handler);
1393 1393
1394 void SendRebakeAvatarTextures(UUID textureID); 1394 void SendRebakeAvatarTextures(UUID textureID);
1395
1396 void SendAvatarInterestsReply(UUID avatarID, uint wantMask, string wantText, uint skillsMask, string skillsText, string languages);
1395 } 1397 }
1396} 1398}
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
index 08f1bec..857c584 100644
--- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
@@ -322,15 +322,15 @@ namespace OpenSim.Framework.Servers.HttpServer
322 HandleRequest(req, resp); 322 HandleRequest(req, resp);
323 } 323 }
324 324
325 public void ConvertIHttpClientContextToOSHttp(object stateinfo) 325 // public void ConvertIHttpClientContextToOSHttp(object stateinfo)
326 { 326 // {
327 HttpServerContextObj objstate = (HttpServerContextObj)stateinfo; 327 // HttpServerContextObj objstate = (HttpServerContextObj)stateinfo;
328 328
329 OSHttpRequest request = objstate.oreq; 329 // OSHttpRequest request = objstate.oreq;
330 OSHttpResponse resp = objstate.oresp; 330 // OSHttpResponse resp = objstate.oresp;
331 331
332 HandleRequest(request,resp); 332 // HandleRequest(request,resp);
333 } 333 // }
334 334
335 public virtual void HandleRequest(OSHttpRequest request, OSHttpResponse response) 335 public virtual void HandleRequest(OSHttpRequest request, OSHttpResponse response)
336 { 336 {
diff --git a/OpenSim/Framework/Servers/VersionInfo.cs b/OpenSim/Framework/Servers/VersionInfo.cs
index a7d34f5..f618047 100644
--- a/OpenSim/Framework/Servers/VersionInfo.cs
+++ b/OpenSim/Framework/Servers/VersionInfo.cs
@@ -29,7 +29,7 @@ namespace OpenSim
29{ 29{
30 public class VersionInfo 30 public class VersionInfo
31 { 31 {
32 private const string VERSION_NUMBER = "0.6.91CM"; 32 private const string VERSION_NUMBER = "0.6.8CM";
33 private const Flavour VERSION_FLAVOUR = Flavour.Dev; 33 private const Flavour VERSION_FLAVOUR = Flavour.Dev;
34 public enum Flavour 34 public enum Flavour
35 { 35 {
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index e7ce2e0..3ac4e5e 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -15792,5 +15792,22 @@ namespace OpenSim.Region.ClientStack.LindenUDP
15792 15792
15793 return osdEvent; 15793 return osdEvent;
15794 } 15794 }
15795
15796 public void SendAvatarInterestsReply(UUID avatarID, uint wantMask, string wantText, uint skillsMask, string skillsText, string languages)
15797 {
15798 AvatarInterestsReplyPacket packet = (AvatarInterestsReplyPacket)PacketPool.Instance.GetPacket(PacketType.AvatarInterestsReply);
15799
15800 packet.AgentData = new AvatarInterestsReplyPacket.AgentDataBlock();
15801 packet.AgentData.AgentID = AgentId;
15802 packet.AgentData.AvatarID = avatarID;
15803
15804 packet.PropertiesData = new AvatarInterestsReplyPacket.PropertiesDataBlock();
15805 packet.PropertiesData.WantToMask = wantMask;
15806 packet.PropertiesData.WantToText = Utils.StringToBytes(wantText);
15807 packet.PropertiesData.SkillsMask = skillsMask;
15808 packet.PropertiesData.SkillsText = Utils.StringToBytes(skillsText);
15809 packet.PropertiesData.LanguagesText = Utils.StringToBytes(languages);
15810 OutPacket(packet, ThrottleOutPacketType.Task);
15811 }
15795 } 15812 }
15796} 15813}
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs
index b778389..0ced2f9 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs
@@ -174,7 +174,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
174 174
175 return nodesLoaded; 175 return nodesLoaded;
176 } 176 }
177 177
178 public void Close()
179 {
180 if (m_loadStream != null)
181 m_loadStream.Close();
182 }
183
178 /// <summary> 184 /// <summary>
179 /// Replicate the inventory paths in the archive to the user's inventory as necessary. 185 /// Replicate the inventory paths in the archive to the user's inventory as necessary.
180 /// </summary> 186 /// </summary>
@@ -258,6 +264,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
258 = rawDirsToCreate[i].LastIndexOf( 264 = rawDirsToCreate[i].LastIndexOf(
259 ArchiveConstants.INVENTORY_NODE_NAME_COMPONENT_SEPARATOR); 265 ArchiveConstants.INVENTORY_NODE_NAME_COMPONENT_SEPARATOR);
260 266
267 if (identicalNameIdentifierIndex < 0)
268 {
269 i++;
270 continue;
271 }
261 string newFolderName = rawDirsToCreate[i].Remove(identicalNameIdentifierIndex); 272 string newFolderName = rawDirsToCreate[i].Remove(identicalNameIdentifierIndex);
262 273
263 newFolderName = InventoryArchiveUtils.UnescapeArchivePath(newFolderName); 274 newFolderName = InventoryArchiveUtils.UnescapeArchivePath(newFolderName);
diff --git a/OpenSim/Region/CoreModules/Avatar/Profiles/AvatarProfilesModule.cs b/OpenSim/Region/CoreModules/Avatar/Profiles/AvatarProfilesModule.cs
index 0f58788..8cf58c6 100644
--- a/OpenSim/Region/CoreModules/Avatar/Profiles/AvatarProfilesModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Profiles/AvatarProfilesModule.cs
@@ -43,6 +43,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Profiles
43 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 43 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
44 private Scene m_scene; 44 private Scene m_scene;
45 private IProfileModule m_profileModule = null; 45 private IProfileModule m_profileModule = null;
46 private bool m_enabled = true;
46 47
47 public AvatarProfilesModule() 48 public AvatarProfilesModule()
48 { 49 {
@@ -52,12 +53,24 @@ namespace OpenSim.Region.CoreModules.Avatar.Profiles
52 53
53 public void Initialise(Scene scene, IConfigSource config) 54 public void Initialise(Scene scene, IConfigSource config)
54 { 55 {
56 IConfig profileConfig = config.Configs["Profile"];
57 if (profileConfig != null)
58 {
59 if (profileConfig.GetString("Module", Name) != Name)
60 {
61 m_enabled = false;
62 return;
63 }
64 }
65
55 m_scene = scene; 66 m_scene = scene;
56 m_scene.EventManager.OnNewClient += NewClient; 67 m_scene.EventManager.OnNewClient += NewClient;
57 } 68 }
58 69
59 public void PostInitialise() 70 public void PostInitialise()
60 { 71 {
72 if (!m_enabled)
73 return;
61 m_profileModule = m_scene.RequestModuleInterface<IProfileModule>(); 74 m_profileModule = m_scene.RequestModuleInterface<IProfileModule>();
62 } 75 }
63 76
diff --git a/OpenSim/Region/CoreModules/Framework/Library/LibraryModule.cs b/OpenSim/Region/CoreModules/Framework/Library/LibraryModule.cs
new file mode 100644
index 0000000..6941e00
--- /dev/null
+++ b/OpenSim/Region/CoreModules/Framework/Library/LibraryModule.cs
@@ -0,0 +1,219 @@
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 */
27using System;
28using System.Collections.Generic;
29using System.IO;
30using System.Reflection;
31
32using OpenSim.Framework;
33using OpenSim.Framework.Communications;
34using OpenSim.Framework.Communications.Cache;
35using OpenSim.Region.CoreModules.Avatar.Inventory.Archiver;
36using OpenSim.Region.Framework;
37using OpenSim.Region.Framework.Interfaces;
38using OpenSim.Region.Framework.Scenes;
39using OpenSim.Services.Interfaces;
40
41using OpenMetaverse;
42using log4net;
43using Nini.Config;
44
45namespace OpenSim.Region.CoreModules.Framework.Library
46{
47 public class LibraryModule : ISharedRegionModule
48 {
49 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
50 private static bool m_HasRunOnce = false;
51
52 private bool m_Enabled = false;
53 private string m_LibraryName = "OpenSim Library";
54 private Scene m_Scene;
55
56 #region ISharedRegionModule
57
58 public void Initialise(IConfigSource config)
59 {
60 m_Enabled = config.Configs["Modules"].GetBoolean("LibraryModule", m_Enabled);
61 if (m_Enabled)
62 {
63 IConfig libConfig = config.Configs["LibraryModule"];
64 if (libConfig != null)
65 m_LibraryName = libConfig.GetString("LibraryName", m_LibraryName);
66 }
67 }
68
69 public bool IsSharedModule
70 {
71 get { return true; }
72 }
73
74 public string Name
75 {
76 get { return "Library Module"; }
77 }
78
79 public Type ReplaceableInterface
80 {
81 get { return null; }
82 }
83
84 public void AddRegion(Scene scene)
85 {
86 if (!m_Enabled)
87 return;
88
89 // Store only the first scene
90 if (m_Scene == null)
91 {
92 m_Scene = scene;
93 }
94 }
95
96 public void RemoveRegion(Scene scene)
97 {
98 }
99
100 public void RegionLoaded(Scene scene)
101 {
102 if (!m_Enabled)
103 return;
104
105 // This will never run more than once, even if the region is restarted
106 if (!m_HasRunOnce)
107 {
108 LoadLibrariesFromArchives();
109 //DumpLibrary();
110 m_HasRunOnce = true;
111 }
112 }
113
114 public void PostInitialise()
115 {
116 }
117
118 public void Close()
119 {
120 m_Scene = null;
121 }
122
123 #endregion ISharedRegionModule
124
125 #region LoadLibraries
126 private string pathToLibraries = "Library";
127
128 protected void LoadLibrariesFromArchives()
129 {
130 InventoryFolderImpl lib = m_Scene.CommsManager.UserProfileCacheService.LibraryRoot;
131 if (lib == null)
132 {
133 m_log.Debug("[LIBRARY MODULE]: No library. Ignoring Library Module");
134 return;
135 }
136
137 lib.Name = m_LibraryName;
138
139 RegionInfo regInfo = new RegionInfo();
140 Scene m_MockScene = new Scene(regInfo);
141 m_MockScene.CommsManager = m_Scene.CommsManager;
142 LocalInventoryService invService = new LocalInventoryService((LibraryRootFolder)lib);
143 m_MockScene.RegisterModuleInterface<IInventoryService>(invService);
144 m_MockScene.RegisterModuleInterface<IAssetService>(m_Scene.AssetService);
145
146 UserProfileData profile = new UserProfileData();
147 profile.FirstName = "OpenSim";
148 profile.ID = lib.Owner;
149 profile.SurName = "Library";
150 CachedUserInfo uinfo = new CachedUserInfo(invService, profile);
151
152 foreach (string iarFileName in Directory.GetFiles(pathToLibraries, "*.iar"))
153 {
154 string simpleName = Path.GetFileNameWithoutExtension(iarFileName);
155
156 m_log.InfoFormat("[LIBRARY MODULE]: Loading library archive {0} ({1})...", iarFileName, simpleName);
157 simpleName = GetInventoryPathFromName(simpleName);
158
159 try
160 {
161 InventoryArchiveReadRequest archread = new InventoryArchiveReadRequest(m_MockScene, uinfo, simpleName, iarFileName);
162 List<InventoryNodeBase> nodes = archread.Execute();
163 if (nodes.Count == 0)
164 {
165 // didn't find the subfolder with the given name; place it on the top
166 m_log.InfoFormat("[LIBRARY MODULE]: Didn't find {0} in library. Placing archive on the top level", simpleName);
167 archread.Close();
168 archread = new InventoryArchiveReadRequest(m_MockScene, uinfo, "/", iarFileName);
169 archread.Execute();
170 }
171 archread.Close();
172 }
173 catch (Exception e)
174 {
175 m_log.DebugFormat("[LIBRARY MODULE]: Exception when processing archive {0}: {1}", iarFileName, e.Message);
176 }
177
178 }
179
180 }
181
182 private void DumpLibrary()
183 {
184 InventoryFolderImpl lib = m_Scene.CommsManager.UserProfileCacheService.LibraryRoot;
185
186 m_log.DebugFormat(" - folder {0}", lib.Name);
187 DumpFolder(lib);
188 }
189
190 private void DumpFolder(InventoryFolderImpl folder)
191 {
192 foreach (InventoryItemBase item in folder.Items.Values)
193 {
194 m_log.DebugFormat(" --> item {0}", item.Name);
195 }
196 foreach (InventoryFolderImpl f in folder.RequestListOfFolderImpls())
197 {
198 m_log.DebugFormat(" - folder {0}", f.Name);
199 DumpFolder(f);
200 }
201 }
202
203 private string GetInventoryPathFromName(string name)
204 {
205 string[] parts = name.Split(new char[] { ' ' });
206 if (parts.Length == 3)
207 {
208 name = string.Empty;
209 // cut the last part
210 for (int i = 0; i < parts.Length - 1; i++)
211 name = name + ' ' + parts[i];
212 }
213
214 return name;
215 }
216
217 #endregion LoadLibraries
218 }
219}
diff --git a/OpenSim/Region/CoreModules/Framework/Library/LocalInventoryService.cs b/OpenSim/Region/CoreModules/Framework/Library/LocalInventoryService.cs
new file mode 100644
index 0000000..2c95b5a
--- /dev/null
+++ b/OpenSim/Region/CoreModules/Framework/Library/LocalInventoryService.cs
@@ -0,0 +1,263 @@
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 */
27using System;
28using System.Collections.Generic;
29using System.Reflection;
30
31using OpenSim.Framework;
32using OpenSim.Framework.Communications.Cache;
33using OpenSim.Services.Interfaces;
34
35using OpenMetaverse;
36using log4net;
37
38namespace OpenSim.Region.CoreModules.Framework.Library
39{
40 public class LocalInventoryService : IInventoryService
41 {
42 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
43
44 private LibraryRootFolder m_Library;
45
46 public LocalInventoryService(LibraryRootFolder lib)
47 {
48 m_Library = lib;
49 }
50
51 /// <summary>
52 /// Retrieve the root inventory folder for the given user.
53 /// </summary>
54 /// <param name="userID"></param>
55 /// <returns>null if no root folder was found</returns>
56 public InventoryFolderBase GetRootFolder(UUID userID) { return m_Library; }
57
58 /// <summary>
59 /// Gets everything (folders and items) inside a folder
60 /// </summary>
61 /// <param name="userId"></param>
62 /// <param name="folderID"></param>
63 /// <returns></returns>
64 public InventoryCollection GetFolderContent(UUID userID, UUID folderID)
65 {
66 InventoryFolderImpl folder = null;
67 InventoryCollection inv = new InventoryCollection();
68 inv.UserID = m_Library.Owner;
69
70 if (folderID != m_Library.ID)
71 {
72 folder = m_Library.FindFolder(folderID);
73 if (folder == null)
74 {
75 inv.Folders = new List<InventoryFolderBase>();
76 inv.Items = new List<InventoryItemBase>();
77 return inv;
78 }
79 }
80 else
81 folder = m_Library;
82
83 inv.Folders = folder.RequestListOfFolders();
84 inv.Items = folder.RequestListOfItems();
85
86 m_log.DebugFormat("[LIBRARY MODULE]: Got content for folder {0}", folder.Name);
87 return inv;
88 }
89
90 /// <summary>
91 /// Add a new folder to the user's inventory
92 /// </summary>
93 /// <param name="folder"></param>
94 /// <returns>true if the folder was successfully added</returns>
95 public bool AddFolder(InventoryFolderBase folder)
96 {
97 //m_log.DebugFormat("[LIBRARY MODULE]: Adding folder {0} ({1}) to {2}", folder.Name, folder.ID, folder.ParentID);
98 InventoryFolderImpl parent = m_Library;
99 if (m_Library.ID != folder.ParentID)
100 parent = m_Library.FindFolder(folder.ParentID);
101
102 if (parent == null)
103 {
104 m_log.DebugFormat("[LIBRARY MODULE]: could not add folder {0} because parent folder {1} not found", folder.Name, folder.ParentID);
105 return false;
106 }
107
108 parent.CreateChildFolder(folder.ID, folder.Name, (ushort)folder.Type);
109
110 return true;
111 }
112
113 /// <summary>
114 /// Add a new item to the user's inventory
115 /// </summary>
116 /// <param name="item"></param>
117 /// <returns>true if the item was successfully added</returns>
118 public bool AddItem(InventoryItemBase item)
119 {
120 //m_log.DebugFormat("[LIBRARY MODULE]: Adding item {0} to {1}", item.Name, item.Folder);
121 InventoryFolderImpl folder = m_Library;
122 if (m_Library.ID != item.Folder)
123 folder = m_Library.FindFolder(item.Folder);
124
125 if (folder == null)
126 {
127 m_log.DebugFormat("[LIBRARY MODULE]: could not add item {0} because folder {1} not found", item.Name, item.Folder);
128 return false;
129 }
130
131 folder.Items.Add(item.ID, item);
132 return true;
133 }
134
135 public bool CreateUserInventory(UUID user) { return false; }
136
137 /// <summary>
138 /// Gets the skeleton of the inventory -- folders only
139 /// </summary>
140 /// <param name="userId"></param>
141 /// <returns></returns>
142 public List<InventoryFolderBase> GetInventorySkeleton(UUID userId) { return null; }
143
144 /// <summary>
145 /// Synchronous inventory fetch.
146 /// </summary>
147 /// <param name="userID"></param>
148 /// <returns></returns>
149 public InventoryCollection GetUserInventory(UUID userID) { return null; }
150
151 /// <summary>
152 /// Request the inventory for a user. This is an asynchronous operation that will call the callback when the
153 /// inventory has been received
154 /// </summary>
155 /// <param name="userID"></param>
156 /// <param name="callback"></param>
157 public void GetUserInventory(UUID userID, InventoryReceiptCallback callback) { }
158
159
160 /// <summary>
161 /// Gets the user folder for the given folder-type
162 /// </summary>
163 /// <param name="userID"></param>
164 /// <param name="type"></param>
165 /// <returns></returns>
166 public InventoryFolderBase GetFolderForType(UUID userID, AssetType type) { return null; }
167
168
169 /// <summary>
170 /// Gets the items inside a folder
171 /// </summary>
172 /// <param name="userID"></param>
173 /// <param name="folderID"></param>
174 /// <returns></returns>
175 public List<InventoryItemBase> GetFolderItems(UUID userID, UUID folderID) { return null; }
176
177
178 /// <summary>
179 /// Update a folder in the user's inventory
180 /// </summary>
181 /// <param name="folder"></param>
182 /// <returns>true if the folder was successfully updated</returns>
183 public bool UpdateFolder(InventoryFolderBase folder) { return false; }
184
185 /// <summary>
186 /// Move an inventory folder to a new location
187 /// </summary>
188 /// <param name="folder">A folder containing the details of the new location</param>
189 /// <returns>true if the folder was successfully moved</returns>
190 public bool MoveFolder(InventoryFolderBase folder) { return false; }
191
192 /// <summary>
193 /// Delete an item from the user's inventory
194 /// </summary>
195 /// <param name="item"></param>
196 /// <returns>true if the item was successfully deleted</returns>
197 //bool DeleteItem(InventoryItemBase item);
198 public bool DeleteFolders(UUID userID, List<UUID> folderIDs) { return false; }
199
200 /// <summary>
201 /// Purge an inventory folder of all its items and subfolders.
202 /// </summary>
203 /// <param name="folder"></param>
204 /// <returns>true if the folder was successfully purged</returns>
205 public bool PurgeFolder(InventoryFolderBase folder) { return false; }
206
207
208 /// <summary>
209 /// Update an item in the user's inventory
210 /// </summary>
211 /// <param name="item"></param>
212 /// <returns>true if the item was successfully updated</returns>
213 public bool UpdateItem(InventoryItemBase item) { return false; }
214
215 public bool MoveItems(UUID ownerID, List<InventoryItemBase> items) { return false; }
216
217 /// <summary>
218 /// Delete an item from the user's inventory
219 /// </summary>
220 /// <param name="item"></param>
221 /// <returns>true if the item was successfully deleted</returns>
222 //bool DeleteItem(InventoryItemBase item);
223 public bool DeleteItems(UUID userID, List<UUID> itemIDs) { return false; }
224
225 /// <summary>
226 /// Get an item, given by its UUID
227 /// </summary>
228 /// <param name="item"></param>
229 /// <returns></returns>
230 public InventoryItemBase GetItem(InventoryItemBase item) { return null; }
231
232 /// <summary>
233 /// Get a folder, given by its UUID
234 /// </summary>
235 /// <param name="folder"></param>
236 /// <returns></returns>
237 public InventoryFolderBase GetFolder(InventoryFolderBase folder) { return null; }
238
239 /// <summary>
240 /// Does the given user have an inventory structure?
241 /// </summary>
242 /// <param name="userID"></param>
243 /// <returns></returns>
244 public bool HasInventoryForUser(UUID userID) { return false; }
245
246 /// <summary>
247 /// Get the active gestures of the agent.
248 /// </summary>
249 /// <param name="userId"></param>
250 /// <returns></returns>
251 public List<InventoryItemBase> GetActiveGestures(UUID userId) { return null; }
252
253 /// <summary>
254 /// Get the union of permissions of all inventory items
255 /// that hold the given assetID.
256 /// </summary>
257 /// <param name="userID"></param>
258 /// <param name="assetID"></param>
259 /// <returns>The permissions or 0 if no such asset is found in
260 /// the user's inventory</returns>
261 public int GetAssetPermissions(UUID userID, UUID assetID) { return 0; }
262 }
263}
diff --git a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml
index 9757072..beb2307 100644
--- a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml
+++ b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml
@@ -20,6 +20,7 @@
20 <RegionModule id="CoreAssetCache" type="OpenSim.Region.CoreModules.Asset.CoreAssetCache" /> 20 <RegionModule id="CoreAssetCache" type="OpenSim.Region.CoreModules.Asset.CoreAssetCache" />
21 <RegionModule id="GlynnTuckerAssetCache" type="OpenSim.Region.CoreModules.Asset.GlynnTuckerAssetCache" /> 21 <RegionModule id="GlynnTuckerAssetCache" type="OpenSim.Region.CoreModules.Asset.GlynnTuckerAssetCache" />
22 <RegionModule id="CenomeMemoryAssetCache" type="OpenSim.Region.CoreModules.Asset.CenomeMemoryAssetCache"/> 22 <RegionModule id="CenomeMemoryAssetCache" type="OpenSim.Region.CoreModules.Asset.CenomeMemoryAssetCache"/>
23 <RegionModule id="LibraryModule" type="OpenSim.Region.CoreModules.Framework.Library.LibraryModule"/>
23 <!-- Service connectors OUT modules --> 24 <!-- Service connectors OUT modules -->
24 <RegionModule id="LocalUserServicesConnector" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.User.LocalUserServicesConnector" /> 25 <RegionModule id="LocalUserServicesConnector" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.User.LocalUserServicesConnector" />
25 <RegionModule id="RemoteUserServicesConnector" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.User.RemoteUserServicesConnector" /> 26 <RegionModule id="RemoteUserServicesConnector" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.User.RemoteUserServicesConnector" />
diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
index 816060f..fed8f64 100644
--- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
+++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
@@ -1099,5 +1099,9 @@ namespace OpenSim.Region.Examples.SimpleModule
1099 public void SendRebakeAvatarTextures(UUID textureID) 1099 public void SendRebakeAvatarTextures(UUID textureID)
1100 { 1100 {
1101 } 1101 }
1102
1103 public void SendAvatarInterestsReply(UUID avatarID, uint wantMask, string wantText, uint skillsMask, string skillsText, string languages)
1104 {
1105 }
1102 } 1106 }
1103} 1107}
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index b0fb8b3..998d598 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -222,6 +222,30 @@ namespace OpenSim.Region.Framework.Scenes
222 protected internal bool AddRestoredSceneObject( 222 protected internal bool AddRestoredSceneObject(
223 SceneObjectGroup sceneObject, bool attachToBackup, bool alreadyPersisted) 223 SceneObjectGroup sceneObject, bool attachToBackup, bool alreadyPersisted)
224 { 224 {
225 // KF: Check for out-of-region, move inside and make static.
226 Vector3 npos = new Vector3(sceneObject.RootPart.GroupPosition.X,
227 sceneObject.RootPart.GroupPosition.Y,
228 sceneObject.RootPart.GroupPosition.Z);
229 if (npos.X < 0.0 || npos.Y < 0.0 || npos.Z < 0.0 ||
230 npos.X > Constants.RegionSize ||
231 npos.Y > Constants.RegionSize)
232 {
233 if (npos.X < 0.0) npos.X = 1.0f;
234 if (npos.Y < 0.0) npos.Y = 1.0f;
235 if (npos.Z < 0.0) npos.Z = 0.0f;
236 if (npos.X > Constants.RegionSize) npos.X = Constants.RegionSize - 1.0f;
237 if (npos.Y > Constants.RegionSize) npos.Y = Constants.RegionSize - 1.0f;
238
239 foreach (SceneObjectPart part in sceneObject.Children.Values)
240 {
241 part.GroupPosition = npos;
242 }
243 sceneObject.RootPart.Velocity = Vector3.Zero;
244 sceneObject.RootPart.AngularVelocity = Vector3.Zero;
245 sceneObject.RootPart.Acceleration = Vector3.Zero;
246 sceneObject.RootPart.Velocity = Vector3.Zero;
247 }
248
225 if (!alreadyPersisted) 249 if (!alreadyPersisted)
226 { 250 {
227 sceneObject.ForceInventoryPersistence(); 251 sceneObject.ForceInventoryPersistence();
diff --git a/OpenSim/Region/Framework/Scenes/UuidGatherer.cs b/OpenSim/Region/Framework/Scenes/UuidGatherer.cs
index 930af81..3edb677 100644
--- a/OpenSim/Region/Framework/Scenes/UuidGatherer.cs
+++ b/OpenSim/Region/Framework/Scenes/UuidGatherer.cs
@@ -27,6 +27,7 @@
27 27
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.IO;
30using System.Reflection; 31using System.Reflection;
31using System.Text.RegularExpressions; 32using System.Text.RegularExpressions;
32using System.Threading; 33using System.Threading;
@@ -91,6 +92,10 @@ namespace OpenSim.Region.Framework.Scenes
91 { 92 {
92 GetWearableAssetUuids(assetUuid, assetUuids); 93 GetWearableAssetUuids(assetUuid, assetUuids);
93 } 94 }
95 else if (AssetType.Gesture == assetType)
96 {
97 GetGestureAssetUuids(assetUuid, assetUuids);
98 }
94 else if (AssetType.LSLText == assetType) 99 else if (AssetType.LSLText == assetType)
95 { 100 {
96 GetScriptAssetUuids(assetUuid, assetUuids); 101 GetScriptAssetUuids(assetUuid, assetUuids);
@@ -278,5 +283,41 @@ namespace OpenSim.Region.Framework.Scenes
278 GatherAssetUuids(sog, assetUuids); 283 GatherAssetUuids(sog, assetUuids);
279 } 284 }
280 } 285 }
286
287 protected void GetGestureAssetUuids(UUID gestureUuid, IDictionary<UUID, int> assetUuids)
288 {
289 AssetBase assetBase = GetAsset(gestureUuid);
290
291 MemoryStream ms = new MemoryStream(assetBase.Data);
292 StreamReader sr = new StreamReader(ms);
293
294 sr.ReadLine(); // Unknown (Version?)
295 sr.ReadLine(); // Unknown
296 sr.ReadLine(); // Unknown
297 sr.ReadLine(); // Name
298 sr.ReadLine(); // Comment ?
299 int count = Convert.ToInt32(sr.ReadLine()); // Item count
300
301 for (int i = 0 ; i < count ; i++)
302 {
303 string type = sr.ReadLine();
304 if (type == null)
305 break;
306 string name = sr.ReadLine();
307 if (name == null)
308 break;
309 string id = sr.ReadLine();
310 if (id == null)
311 break;
312 string unknown = sr.ReadLine();
313 if (unknown == null)
314 break;
315
316 // If it can be parsed as a UUID, it is an asset ID
317 UUID uuid;
318 if (UUID.TryParse(id, out uuid))
319 assetUuids[uuid] = 1;
320 }
321 }
281 } 322 }
282} \ No newline at end of file 323}
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
index bdf1574..c333413 100644
--- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
+++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
@@ -1624,5 +1624,9 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
1624 public void SendRebakeAvatarTextures(UUID textureID) 1624 public void SendRebakeAvatarTextures(UUID textureID)
1625 { 1625 {
1626 } 1626 }
1627
1628 public void SendAvatarInterestsReply(UUID avatarID, uint wantMask, string wantText, uint skillsMask, string skillsText, string languages)
1629 {
1630 }
1627 } 1631 }
1628} 1632}
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs
index 19f7210..9d64667 100644
--- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs
@@ -179,6 +179,8 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
179 /// </summary> 179 /// </summary>
180 /// <param name="msg">The message to send to the user</param> 180 /// <param name="msg">The message to send to the user</param>
181 void Say(string msg); 181 void Say(string msg);
182
183 void Say(string msg,int channel);
182 184
183 //// <value> 185 //// <value>
184 /// Grants access to the objects inventory 186 /// Grants access to the objects inventory
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IWorld.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IWorld.cs
index 3c14ed5..3b3b3d0 100644
--- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IWorld.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IWorld.cs
@@ -41,6 +41,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
41 { 41 {
42 public string Text; 42 public string Text;
43 public IEntity Sender; 43 public IEntity Sender;
44 public int Channel;
44 } 45 }
45 46
46 public delegate void OnChatDelegate(IWorld sender, ChatEventArgs e); 47 public delegate void OnChatDelegate(IWorld sender, ChatEventArgs e);
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs
index 143c454..9596d13 100644
--- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs
@@ -384,6 +384,15 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
384 m_rootScene.SimChat(msg, ChatTypeEnum.Say, sop.AbsolutePosition, sop.Name, sop.UUID, false); 384 m_rootScene.SimChat(msg, ChatTypeEnum.Say, sop.AbsolutePosition, sop.Name, sop.UUID, false);
385 } 385 }
386 386
387 public void Say(string msg,int channel)
388 {
389 if (!CanEdit())
390 return;
391
392 SceneObjectPart sop = GetSOP();
393 m_rootScene.SimChat(Utils.StringToBytes(msg), ChatTypeEnum.Say,channel, sop.AbsolutePosition, sop.Name, sop.UUID, false);
394 }
395
387 #endregion 396 #endregion
388 397
389 398
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/World.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/World.cs
index 6fcb5d0..82020cb 100644
--- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/World.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/World.cs
@@ -148,7 +148,8 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
148 ChatEventArgs e = new ChatEventArgs(); 148 ChatEventArgs e = new ChatEventArgs();
149 e.Sender = new SOPObject(m_internalScene, ((SceneObjectPart) chat.SenderObject).LocalId, m_security); 149 e.Sender = new SOPObject(m_internalScene, ((SceneObjectPart) chat.SenderObject).LocalId, m_security);
150 e.Text = chat.Message; 150 e.Text = chat.Message;
151 151 e.Channel = chat.Channel;
152
152 _OnChat(this, e); 153 _OnChat(this, e);
153 return; 154 return;
154 } 155 }
@@ -158,7 +159,8 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
158 ChatEventArgs e = new ChatEventArgs(); 159 ChatEventArgs e = new ChatEventArgs();
159 e.Sender = new SPAvatar(m_internalScene, chat.SenderUUID, m_security); 160 e.Sender = new SPAvatar(m_internalScene, chat.SenderUUID, m_security);
160 e.Text = chat.Message; 161 e.Text = chat.Message;
161 162 e.Channel = chat.Channel;
163
162 _OnChat(this, e); 164 _OnChat(this, e);
163 return; 165 return;
164 } 166 }
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
index 975033a..9ca5a0a 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
@@ -1104,5 +1104,9 @@ namespace OpenSim.Region.OptionalModules.World.NPC
1104 public void SendRebakeAvatarTextures(UUID textureID) 1104 public void SendRebakeAvatarTextures(UUID textureID)
1105 { 1105 {
1106 } 1106 }
1107
1108 public void SendAvatarInterestsReply(UUID avatarID, uint wantMask, string wantText, uint skillsMask, string skillsText, string languages)
1109 {
1110 }
1107 } 1111 }
1108} 1112}
diff --git a/OpenSim/Region/Physics/ChOdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/ChOdePlugin/ODEPrim.cs
index 983431d..0179240 100644
--- a/OpenSim/Region/Physics/ChOdePlugin/ODEPrim.cs
+++ b/OpenSim/Region/Physics/ChOdePlugin/ODEPrim.cs
@@ -215,6 +215,7 @@ namespace OpenSim.Region.Physics.OdePlugin
215 parent_scene.GetTerrainHeightAtXY(((float)Constants.RegionSize * 0.5f), ((float)Constants.RegionSize * 0.5f)) + 0.5f); 215 parent_scene.GetTerrainHeightAtXY(((float)Constants.RegionSize * 0.5f), ((float)Constants.RegionSize * 0.5f)) + 0.5f);
216 m_log.Warn("[PHYSICS]: Got nonFinite Object create Position"); 216 m_log.Warn("[PHYSICS]: Got nonFinite Object create Position");
217 } 217 }
218
218 _position = pos; 219 _position = pos;
219 m_taintposition = pos; 220 m_taintposition = pos;
220 PID_D = parent_scene.bodyPIDD; 221 PID_D = parent_scene.bodyPIDD;
@@ -254,7 +255,8 @@ namespace OpenSim.Region.Physics.OdePlugin
254 _parent_scene = parent_scene; 255 _parent_scene = parent_scene;
255 m_targetSpace = (IntPtr)0; 256 m_targetSpace = (IntPtr)0;
256 257
257 if (pos.Z < 0) 258// if (pos.Z < 0)
259 if (pos.Z < parent_scene.GetTerrainHeightAtXY(pos.X, pos.Y))
258 m_isphysical = false; 260 m_isphysical = false;
259 else 261 else
260 { 262 {
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index cc903e0..c9d6742 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -6606,6 +6606,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6606 // retain pathcurve 6606 // retain pathcurve
6607 shapeBlock.PathCurve = part.Shape.PathCurve; 6607 shapeBlock.PathCurve = part.Shape.PathCurve;
6608 6608
6609 part.Shape.SculptEntry = false;
6609 return shapeBlock; 6610 return shapeBlock;
6610 } 6611 }
6611 6612
@@ -6657,6 +6658,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6657 shapeBlock.PathShearX = (byte)(100 * topshear.x); 6658 shapeBlock.PathShearX = (byte)(100 * topshear.x);
6658 shapeBlock.PathShearY = (byte)(100 * topshear.y); 6659 shapeBlock.PathShearY = (byte)(100 * topshear.y);
6659 6660
6661 part.Shape.SculptEntry = false;
6660 part.UpdateShape(shapeBlock); 6662 part.UpdateShape(shapeBlock);
6661 } 6663 }
6662 6664
@@ -6701,6 +6703,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6701 shapeBlock.ProfileBegin = (ushort)(50000 * dimple.x); 6703 shapeBlock.ProfileBegin = (ushort)(50000 * dimple.x);
6702 shapeBlock.ProfileEnd = (ushort)(50000 * (1 - dimple.y)); 6704 shapeBlock.ProfileEnd = (ushort)(50000 * (1 - dimple.y));
6703 6705
6706 part.Shape.SculptEntry = false;
6704 part.UpdateShape(shapeBlock); 6707 part.UpdateShape(shapeBlock);
6705 } 6708 }
6706 6709
@@ -6824,6 +6827,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6824 } 6827 }
6825 shapeBlock.PathSkew = (sbyte)(100 * skew); 6828 shapeBlock.PathSkew = (sbyte)(100 * skew);
6826 6829
6830 part.Shape.SculptEntry = false;
6827 part.UpdateShape(shapeBlock); 6831 part.UpdateShape(shapeBlock);
6828 } 6832 }
6829 6833
diff --git a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
index 1fc31c5..faf9c40 100644
--- a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
@@ -422,7 +422,8 @@ namespace OpenSim.Region.ScriptEngine.Shared
422 422
423 public int Length 423 public int Length
424 { 424 {
425 get { 425 get
426 {
426 if (m_data == null) 427 if (m_data == null)
427 m_data=new Object[0]; 428 m_data=new Object[0];
428 return m_data.Length; 429 return m_data.Length;
@@ -431,7 +432,40 @@ namespace OpenSim.Region.ScriptEngine.Shared
431 432
432 public int Size 433 public int Size
433 { 434 {
434 get { return 0; } 435 get
436 {
437 if (m_data == null)
438 m_data=new Object[0];
439
440 int size = 0;
441
442 foreach (Object o in m_data)
443 {
444 if (o is LSL_Types.LSLInteger)
445 size += 4;
446 else if (o is LSL_Types.LSLFloat)
447 size += 8;
448 else if (o is LSL_Types.LSLString)
449 size += ((LSL_Types.LSLString)o).m_string.Length;
450 else if (o is LSL_Types.key)
451 size += ((LSL_Types.key)o).value.Length;
452 else if (o is LSL_Types.Vector3)
453 size += 32;
454 else if (o is LSL_Types.Quaternion)
455 size += 64;
456 else if (o is int)
457 size += 4;
458 else if (o is string)
459 size += ((string)o).Length;
460 else if (o is float)
461 size += 8;
462 else if (o is double)
463 size += 16;
464 else
465 throw new Exception("Unknown type in List.Size: " + o.GetType().ToString());
466 }
467 return size;
468 }
435 } 469 }
436 470
437 public object[] Data 471 public object[] Data
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index 5f172c4..266e703 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -1159,6 +1159,9 @@ namespace OpenSim.Tests.Common.Mock
1159 public void SendRebakeAvatarTextures(UUID textureID) 1159 public void SendRebakeAvatarTextures(UUID textureID)
1160 { 1160 {
1161 } 1161 }
1162 1162
1163 public void SendAvatarInterestsReply(UUID avatarID, uint wantMask, string wantText, uint skillsMask, string skillsText, string languages)
1164 {
1165 }
1163 } 1166 }
1164} 1167}
diff --git a/bin/Library/.keep b/bin/Library/.keep
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/bin/Library/.keep
diff --git a/bin/config-include/Standalone.ini b/bin/config-include/Standalone.ini
index a6c089c..cdfdf4b 100644
--- a/bin/config-include/Standalone.ini
+++ b/bin/config-include/Standalone.ini
@@ -13,6 +13,7 @@
13 NeighbourServices = "LocalNeighbourServicesConnector" 13 NeighbourServices = "LocalNeighbourServicesConnector"
14 AuthorizationServices = "LocalAuthorizationServicesConnector" 14 AuthorizationServices = "LocalAuthorizationServicesConnector"
15 GridServices = "LocalGridServicesConnector" 15 GridServices = "LocalGridServicesConnector"
16 LibraryModule = true
16 17
17[AssetService] 18[AssetService]
18 LocalServiceModule = "OpenSim.Services.AssetService.dll:AssetService" 19 LocalServiceModule = "OpenSim.Services.AssetService.dll:AssetService"
@@ -26,3 +27,4 @@
26[GridService] 27[GridService]
27 LocalServiceModule = "OpenSim.Services.GridService.dll:GridService" 28 LocalServiceModule = "OpenSim.Services.GridService.dll:GridService"
28 Realm = "regions" 29 Realm = "regions"
30
diff --git a/bin/config-include/StandaloneCommon.ini.example b/bin/config-include/StandaloneCommon.ini.example
index b0e2de3..1679f93 100644
--- a/bin/config-include/StandaloneCommon.ini.example
+++ b/bin/config-include/StandaloneCommon.ini.example
@@ -39,3 +39,7 @@
39 ;;--- For MySql region storage (alternative) 39 ;;--- For MySql region storage (alternative)
40 ;StorageProvider = "OpenSim.Data.MySQL.dll:MySqlRegionData" 40 ;StorageProvider = "OpenSim.Data.MySQL.dll:MySqlRegionData"
41 ;ConnectionString = "Data Source=localhost;Database=opensim;User ID=opensim;Password=***;" 41 ;ConnectionString = "Data Source=localhost;Database=opensim;User ID=opensim;Password=***;"
42
43[LibraryModule]
44 ; Set this if you want to change the name of the OpenSim Library
45 ;LibraryName = "My World's Library" \ No newline at end of file
diff --git a/bin/config-include/StandaloneHypergrid.ini b/bin/config-include/StandaloneHypergrid.ini
index baff811..909286c 100644
--- a/bin/config-include/StandaloneHypergrid.ini
+++ b/bin/config-include/StandaloneHypergrid.ini
@@ -21,7 +21,7 @@
21 HGAuthServiceInConnector = true 21 HGAuthServiceInConnector = true
22 HypergridServiceInConnector = true 22 HypergridServiceInConnector = true
23 NeighbourServiceInConnector = true 23 NeighbourServiceInConnector = true
24 24 LibraryModule = true
25 25
26[AssetService] 26[AssetService]
27 ; For the AssetServiceInConnector 27 ; For the AssetServiceInConnector