aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTORS.txt6
-rw-r--r--OpenSim/Framework/UserProfiles.cs14
-rw-r--r--OpenSim/Region/Application/ConfigurationLoader.cs5
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs3
-rw-r--r--OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs458
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs1
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs36
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs11
-rw-r--r--OpenSim/Server/Base/ServicesServerBase.cs148
-rw-r--r--OpenSim/Tools/Configger/ConfigurationLoader.cs6
-rw-r--r--bin/OpenSimDefaults.ini3
-rw-r--r--bin/Robust.HG.ini.example62
-rw-r--r--bin/Robust.ini.example44
13 files changed, 600 insertions, 197 deletions
diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt
index db2f16b..d540c07 100644
--- a/CONTRIBUTORS.txt
+++ b/CONTRIBUTORS.txt
@@ -89,6 +89,7 @@ what it is today.
89* dmiles (Daxtron Labs) 89* dmiles (Daxtron Labs)
90* Dong Jun Lan (IBM) 90* Dong Jun Lan (IBM)
91* DoranZemlja 91* DoranZemlja
92* Drake Arconis
92* dr0b3rts 93* dr0b3rts
93* dslake 94* dslake
94* eeyore 95* eeyore
@@ -107,6 +108,7 @@ what it is today.
107* Flyte Xevious 108* Flyte Xevious
108* Freaky Tech 109* Freaky Tech
109* Garmin Kawaguichi 110* Garmin Kawaguichi
111* Geir Noklebye
110* Glenn Martin (MOSES) 112* Glenn Martin (MOSES)
111* Gryc Ueusp 113* Gryc Ueusp
112* H-H-H (ginge264) 114* H-H-H (ginge264)
@@ -115,6 +117,7 @@ what it is today.
115* Imaze Rhiano 117* Imaze Rhiano
116* Intimidated 118* Intimidated
117* Jak Daniels 119* Jak Daniels
120* Jeff Kelly
118* Jeremy Bongio (IBM) 121* Jeremy Bongio (IBM)
119* jhurliman 122* jhurliman
120* John R Sohn (XenReborn) 123* John R Sohn (XenReborn)
@@ -136,6 +139,7 @@ what it is today.
136* Magnuz Binder 139* Magnuz Binder
137* maimedleech 140* maimedleech
138* Mana Janus 141* Mana Janus
142* Mandarinka Tasty
139* MarcelEdward 143* MarcelEdward
140* Matt Lehmann 144* Matt Lehmann
141* Mic Bowman 145* Mic Bowman
@@ -158,6 +162,7 @@ what it is today.
158* openlifegrid.com 162* openlifegrid.com
159* otakup0pe 163* otakup0pe
160* Pixel Tomsen 164* Pixel Tomsen
165* Quill Littlefeather
161* ralphos 166* ralphos
162* RemedyTomm 167* RemedyTomm
163* Revolution 168* Revolution
@@ -183,6 +188,7 @@ what it is today.
183* TBG Renfold 188* TBG Renfold
184* tglion 189* tglion
185* tlaukkan/Tommil (Tommi S. E. Laukkanen, Bubble Cloud) 190* tlaukkan/Tommil (Tommi S. E. Laukkanen, Bubble Cloud)
191* TomDataWorks
186* TomTheDragon (muckwaddle) 192* TomTheDragon (muckwaddle)
187* tyre 193* tyre
188* Vegaslon <vegaslon@gmail.com> 194* Vegaslon <vegaslon@gmail.com>
diff --git a/OpenSim/Framework/UserProfiles.cs b/OpenSim/Framework/UserProfiles.cs
index 98ab651..6d46fe9 100644
--- a/OpenSim/Framework/UserProfiles.cs
+++ b/OpenSim/Framework/UserProfiles.cs
@@ -27,6 +27,8 @@
27 27
28using System; 28using System;
29using OpenMetaverse; 29using OpenMetaverse;
30using System.Collections.Generic;
31
30 32
31namespace OpenSim.Framework 33namespace OpenSim.Framework
32{ 34{
@@ -122,5 +124,17 @@ namespace OpenSim.Framework
122 public string UserId = UUID.Zero.ToString(); 124 public string UserId = UUID.Zero.ToString();
123 public string DataVal = string.Empty; 125 public string DataVal = string.Empty;
124 } 126 }
127
128 public class UserProfileCacheEntry
129 {
130 public Dictionary<UUID, string> picksList;
131 public Dictionary<UUID, UserProfilePick> picks;
132 public Dictionary<UUID, string> classifiedsLists;
133 public Dictionary<UUID, UserClassifiedAdd> classifieds;
134 public UserProfileProperties props;
135 public string born;
136 public byte[] membershipType;
137 public uint flags;
138 }
125} 139}
126 140
diff --git a/OpenSim/Region/Application/ConfigurationLoader.cs b/OpenSim/Region/Application/ConfigurationLoader.cs
index b19e549..4f141a6 100644
--- a/OpenSim/Region/Application/ConfigurationLoader.cs
+++ b/OpenSim/Region/Application/ConfigurationLoader.cs
@@ -348,13 +348,10 @@ namespace OpenSim
348 config.Set("meshing", "Meshmerizer"); 348 config.Set("meshing", "Meshmerizer");
349 config.Set("physical_prim", true); 349 config.Set("physical_prim", true);
350 config.Set("serverside_object_permissions", true); 350 config.Set("serverside_object_permissions", true);
351 config.Set("storage_prim_inventories", true);
352 config.Set("startup_console_commands_file", String.Empty); 351 config.Set("startup_console_commands_file", String.Empty);
353 config.Set("shutdown_console_commands_file", String.Empty); 352 config.Set("shutdown_console_commands_file", String.Empty);
354 config.Set("DefaultScriptEngine", "XEngine"); 353 config.Set("DefaultScriptEngine", "XEngine");
355 config.Set("clientstack_plugin", "OpenSim.Region.ClientStack.LindenUDP.dll"); 354 config.Set("clientstack_plugin", "OpenSim.Region.ClientStack.LindenUDP.dll");
356 // life doesn't really work without this
357 config.Set("EventQueue", true);
358 } 355 }
359 356
360 { 357 {
@@ -387,4 +384,4 @@ namespace OpenSim
387 m_networkServersInfo.loadFromConfiguration(m_config.Source); 384 m_networkServersInfo.loadFromConfiguration(m_config.Source);
388 } 385 }
389 } 386 }
390} \ No newline at end of file 387}
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs
index 54af246..86aeae8 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs
@@ -70,7 +70,6 @@ namespace OpenSim.Region.ClientStack.Linden.Tests
70 70
71 IConfigSource config = new IniConfigSource(); 71 IConfigSource config = new IniConfigSource();
72 config.AddConfig("Startup"); 72 config.AddConfig("Startup");
73 config.Configs["Startup"].Set("EventQueue", "true");
74 73
75 CapabilitiesModule capsModule = new CapabilitiesModule(); 74 CapabilitiesModule capsModule = new CapabilitiesModule();
76 m_eqgMod = new EventQueueGetModule(); 75 m_eqgMod = new EventQueueGetModule();
@@ -195,4 +194,4 @@ namespace OpenSim.Region.ClientStack.Linden.Tests
195 Assert.That((int)eventsResponse["int_response_code"], Is.EqualTo((int)HttpStatusCode.BadGateway)); 194 Assert.That((int)eventsResponse["int_response_code"], Is.EqualTo((int)HttpStatusCode.BadGateway));
196 } 195 }
197 } 196 }
198} \ No newline at end of file 197}
diff --git a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs
index 57025bf..d232d82 100644
--- a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs
@@ -57,6 +57,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
57 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "UserProfilesModule")] 57 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "UserProfilesModule")]
58 public class UserProfileModule : IProfileModule, INonSharedRegionModule 58 public class UserProfileModule : IProfileModule, INonSharedRegionModule
59 { 59 {
60 const double PROFILECACHEEXPIRE = 300;
60 /// <summary> 61 /// <summary>
61 /// Logging 62 /// Logging
62 /// </summary> 63 /// </summary>
@@ -67,6 +68,8 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
67 // count. The entries are removed when the interest count reaches 0. 68 // count. The entries are removed when the interest count reaches 0.
68 Dictionary<UUID, UUID> m_classifiedCache = new Dictionary<UUID, UUID>(); 69 Dictionary<UUID, UUID> m_classifiedCache = new Dictionary<UUID, UUID>();
69 Dictionary<UUID, int> m_classifiedInterest = new Dictionary<UUID, int>(); 70 Dictionary<UUID, int> m_classifiedInterest = new Dictionary<UUID, int>();
71 ExpiringCache<UUID, UserProfileCacheEntry> m_profilesCache = new ExpiringCache<UUID, UserProfileCacheEntry>();
72 IImprovedAssetCache m_assetCache;
70 73
71 private JsonRpcRequestManager rpc = new JsonRpcRequestManager(); 74 private JsonRpcRequestManager rpc = new JsonRpcRequestManager();
72 private bool m_allowUserProfileWebURLs = true; 75 private bool m_allowUserProfileWebURLs = true;
@@ -128,7 +131,6 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
128 get; private set; 131 get; private set;
129 } 132 }
130 133
131
132 #region IRegionModuleBase implementation 134 #region IRegionModuleBase implementation
133 /// <summary> 135 /// <summary>
134 /// This is called to initialize the region module. For shared modules, this is called exactly once, after 136 /// This is called to initialize the region module. For shared modules, this is called exactly once, after
@@ -185,22 +187,11 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
185 Scene = scene; 187 Scene = scene;
186 Scene.RegisterModuleInterface<IProfileModule>(this); 188 Scene.RegisterModuleInterface<IProfileModule>(this);
187 Scene.EventManager.OnNewClient += OnNewClient; 189 Scene.EventManager.OnNewClient += OnNewClient;
188 Scene.EventManager.OnMakeRootAgent += HandleOnMakeRootAgent; 190 Scene.EventManager.OnClientClosed += OnClientClosed;
189 191
190 UserManagementModule = Scene.RequestModuleInterface<IUserManagement>(); 192 UserManagementModule = Scene.RequestModuleInterface<IUserManagement>();
191 } 193 }
192 194
193 void HandleOnMakeRootAgent (ScenePresence obj)
194 {
195 if(obj.PresenceType == PresenceType.Npc)
196 return;
197
198 Util.FireAndForget(delegate
199 {
200 GetImageAssets(((IScenePresence)obj).UUID);
201 }, null, "UserProfileModule.GetImageAssets");
202 }
203
204 /// <summary> 195 /// <summary>
205 /// Removes the region. 196 /// Removes the region.
206 /// </summary> 197 /// </summary>
@@ -211,6 +202,10 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
211 { 202 {
212 if(!Enabled) 203 if(!Enabled)
213 return; 204 return;
205
206 m_profilesCache.Clear();
207 m_classifiedCache.Clear();
208 m_classifiedInterest.Clear();
214 } 209 }
215 210
216 /// <summary> 211 /// <summary>
@@ -226,6 +221,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
226 { 221 {
227 if(!Enabled) 222 if(!Enabled)
228 return; 223 return;
224 m_assetCache = Scene.RequestModuleInterface<IImprovedAssetCache>();
229 } 225 }
230 226
231 /// <summary> 227 /// <summary>
@@ -297,6 +293,40 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
297 client.OnUserInfoRequest += UserPreferencesRequest; 293 client.OnUserInfoRequest += UserPreferencesRequest;
298 client.OnUpdateUserInfo += UpdateUserPreferences; 294 client.OnUpdateUserInfo += UpdateUserPreferences;
299 } 295 }
296
297 void OnClientClosed(UUID AgentId, Scene scene)
298 {
299 ScenePresence sp = scene.GetScenePresence(AgentId);
300 IClientAPI client = sp.ControllingClient;
301 if (client == null)
302 return;
303
304 //Profile
305 client.OnRequestAvatarProperties -= RequestAvatarProperties;
306 client.OnUpdateAvatarProperties -= AvatarPropertiesUpdate;
307 client.OnAvatarInterestUpdate -= AvatarInterestsUpdate;
308
309 // Classifieds
310// client.r GenericPacketHandler("avatarclassifiedsrequest", ClassifiedsRequest);
311 client.OnClassifiedInfoUpdate -= ClassifiedInfoUpdate;
312 client.OnClassifiedInfoRequest -= ClassifiedInfoRequest;
313 client.OnClassifiedDelete -= ClassifiedDelete;
314
315 // Picks
316// client.AddGenericPacketHandler("avatarpicksrequest", PicksRequest);
317// client.AddGenericPacketHandler("pickinforequest", PickInfoRequest);
318 client.OnPickInfoUpdate -= PickInfoUpdate;
319 client.OnPickDelete -= PickDelete;
320
321 // Notes
322// client.AddGenericPacketHandler("avatarnotesrequest", NotesRequest);
323 client.OnAvatarNotesUpdate -= NotesUpdate;
324
325 // Preferences
326 client.OnUserInfoRequest -= UserPreferencesRequest;
327 client.OnUpdateUserInfo -= UpdateUserPreferences;
328 }
329
300 #endregion Region Event Handlers 330 #endregion Region Event Handlers
301 331
302 #region Classified 332 #region Classified
@@ -332,6 +362,34 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
332 return; 362 return;
333 } 363 }
334 364
365 UserProfileCacheEntry uce = null;
366 lock(m_profilesCache)
367 {
368 if(m_profilesCache.TryGetValue(targetID, out uce) && uce != null)
369 {
370 if(uce.classifiedsLists != null)
371 {
372 foreach(KeyValuePair<UUID,string> kvp in uce.classifiedsLists)
373 {
374 UUID kvpkey = kvp.Key;
375 classifieds[kvpkey] = kvp.Value;
376 lock (m_classifiedCache)
377 {
378 if (!m_classifiedCache.ContainsKey(kvpkey))
379 {
380 m_classifiedCache.Add(kvpkey,targetID);
381 m_classifiedInterest.Add(kvpkey, 0);
382 }
383
384 m_classifiedInterest[kvpkey]++;
385 }
386 }
387 remoteClient.SendAvatarClassifiedReply(targetID, uce.classifiedsLists);
388 return;
389 }
390 }
391 }
392
335 string serverURI = string.Empty; 393 string serverURI = string.Empty;
336 GetUserProfileServerURI(targetID, out serverURI); 394 GetUserProfileServerURI(targetID, out serverURI);
337 if(string.IsNullOrWhiteSpace(serverURI)) 395 if(string.IsNullOrWhiteSpace(serverURI))
@@ -380,6 +438,15 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
380 } 438 }
381 } 439 }
382 440
441 lock(m_profilesCache)
442 {
443 if(!m_profilesCache.TryGetValue(targetID, out uce) || uce == null)
444 uce = new UserProfileCacheEntry();
445 uce.classifiedsLists = classifieds;
446
447 m_profilesCache.AddOrUpdate(targetID, uce, PROFILECACHEEXPIRE);
448 }
449
383 remoteClient.SendAvatarClassifiedReply(targetID, classifieds); 450 remoteClient.SendAvatarClassifiedReply(targetID, classifieds);
384 } 451 }
385 452
@@ -404,9 +471,29 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
404 } 471 }
405 } 472 }
406 } 473 }
407 474
475 UserProfileCacheEntry uce = null;
476 lock(m_profilesCache)
477 {
478 if(m_profilesCache.TryGetValue(target, out uce) && uce != null)
479 {
480 if(uce.classifieds != null && uce.classifieds.ContainsKey(queryClassifiedID))
481 {
482 ad = uce.classifieds[queryClassifiedID];
483 Vector3 gPos = new Vector3();
484 Vector3.TryParse(ad.GlobalPos, out gPos);
485
486 remoteClient.SendClassifiedInfoReply(ad.ClassifiedId, ad.CreatorId, (uint)ad.CreationDate,
487 (uint)ad.ExpirationDate, (uint)ad.Category, ad.Name, ad.Description,
488 ad.ParcelId, (uint)ad.ParentEstate, ad.SnapshotId, ad.SimName,
489 gPos, ad.ParcelName, ad.Flags, ad.Price);
490 return;
491 }
492 }
493 }
494
408 string serverURI = string.Empty; 495 string serverURI = string.Empty;
409 GetUserProfileServerURI(target, out serverURI); 496 bool foreign = GetUserProfileServerURI(target, out serverURI);
410 if(string.IsNullOrWhiteSpace(serverURI)) 497 if(string.IsNullOrWhiteSpace(serverURI))
411 { 498 {
412 return; 499 return;
@@ -424,6 +511,20 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
424 if(ad.CreatorId == UUID.Zero) 511 if(ad.CreatorId == UUID.Zero)
425 return; 512 return;
426 513
514 if(foreign)
515 cacheForeignImage(target, ad.SnapshotId);
516
517 lock(m_profilesCache)
518 {
519 if(!m_profilesCache.TryGetValue(target, out uce) || uce == null)
520 uce = new UserProfileCacheEntry();
521 if(uce.classifieds == null)
522 uce.classifieds = new Dictionary<UUID, UserClassifiedAdd>();
523 uce.classifieds[ad.ClassifiedId] = ad;
524
525 m_profilesCache.AddOrUpdate(target, uce, PROFILECACHEEXPIRE);
526 }
527
427 Vector3 globalPos = new Vector3(); 528 Vector3 globalPos = new Vector3();
428 Vector3.TryParse(ad.GlobalPos, out globalPos); 529 Vector3.TryParse(ad.GlobalPos, out globalPos);
429 530
@@ -479,13 +580,25 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
479 UUID creatorId = remoteClient.AgentId; 580 UUID creatorId = remoteClient.AgentId;
480 ScenePresence p = FindPresence(creatorId); 581 ScenePresence p = FindPresence(creatorId);
481 582
583 UserProfileCacheEntry uce = null;
584 lock(m_profilesCache)
585 m_profilesCache.TryGetValue(remoteClient.AgentId, out uce);
586
482 string serverURI = string.Empty; 587 string serverURI = string.Empty;
483 GetUserProfileServerURI(remoteClient.AgentId, out serverURI); 588 bool foreign = GetUserProfileServerURI(remoteClient.AgentId, out serverURI);
484 if(string.IsNullOrWhiteSpace(serverURI)) 589 if(string.IsNullOrWhiteSpace(serverURI))
485 { 590 {
486 return; 591 return;
487 } 592 }
488 593
594 if(foreign)
595 {
596 remoteClient.SendAgentAlertMessage("Please change classifieds on your home grid", true);
597 if(uce != null && uce.classifiedsLists != null)
598 remoteClient.SendAvatarClassifiedReply(remoteClient.AgentId, uce.classifiedsLists);
599 return;
600 }
601
489 OSDMap parameters = new OSDMap {{"creatorId", OSD.FromUUID(creatorId)}}; 602 OSDMap parameters = new OSDMap {{"creatorId", OSD.FromUUID(creatorId)}};
490 OSD Params = (OSD)parameters; 603 OSD Params = (OSD)parameters;
491 if (!rpc.JsonRpcRequest(ref Params, "avatarclassifiedsrequest", serverURI, UUID.Random().ToString())) 604 if (!rpc.JsonRpcRequest(ref Params, "avatarclassifiedsrequest", serverURI, UUID.Random().ToString()))
@@ -498,17 +611,20 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
498 bool exists = list.Cast<OSDMap>().Where(map => map.ContainsKey("classifieduuid")) 611 bool exists = list.Cast<OSDMap>().Where(map => map.ContainsKey("classifieduuid"))
499 .Any(map => map["classifieduuid"].AsUUID().Equals(queryclassifiedID)); 612 .Any(map => map["classifieduuid"].AsUUID().Equals(queryclassifiedID));
500 613
614 IMoneyModule money = null;
501 if (!exists) 615 if (!exists)
502 { 616 {
503 IMoneyModule money = s.RequestModuleInterface<IMoneyModule>(); 617 money = s.RequestModuleInterface<IMoneyModule>();
504 if (money != null) 618 if (money != null)
505 { 619 {
506 if (!money.AmountCovered(remoteClient.AgentId, queryclassifiedPrice)) 620 if (!money.AmountCovered(remoteClient.AgentId, queryclassifiedPrice))
507 { 621 {
508 remoteClient.SendAgentAlertMessage("You do not have enough money to create this classified.", false); 622 remoteClient.SendAgentAlertMessage("You do not have enough money to create this classified.", false);
623 if(uce != null && uce.classifiedsLists != null)
624 remoteClient.SendAvatarClassifiedReply(remoteClient.AgentId, uce.classifiedsLists);
509 return; 625 return;
510 } 626 }
511 money.ApplyCharge(remoteClient.AgentId, queryclassifiedPrice, MoneyTransactionType.ClassifiedCharge); 627// money.ApplyCharge(remoteClient.AgentId, queryclassifiedPrice, MoneyTransactionType.ClassifiedCharge);
512 } 628 }
513 } 629 }
514 630
@@ -535,7 +651,25 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
535 if(!rpc.JsonRpcRequest(ref Ad, "classified_update", serverURI, UUID.Random().ToString())) 651 if(!rpc.JsonRpcRequest(ref Ad, "classified_update", serverURI, UUID.Random().ToString()))
536 { 652 {
537 remoteClient.SendAgentAlertMessage("Error updating classified", false); 653 remoteClient.SendAgentAlertMessage("Error updating classified", false);
654 if(uce != null && uce.classifiedsLists != null)
655 remoteClient.SendAvatarClassifiedReply(remoteClient.AgentId, uce.classifiedsLists);
656 return;
538 } 657 }
658
659 // only charge if it worked
660 if (money != null)
661 money.ApplyCharge(remoteClient.AgentId, queryclassifiedPrice, MoneyTransactionType.ClassifiedCharge);
662
663 // just flush cache for now
664 lock(m_profilesCache)
665 {
666 if(m_profilesCache.TryGetValue(remoteClient.AgentId, out uce) && uce != null)
667 {
668 uce.classifieds = null;
669 uce.classifiedsLists = null;
670 }
671 }
672
539 } 673 }
540 674
541 /// <summary> 675 /// <summary>
@@ -549,11 +683,18 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
549 /// </param> 683 /// </param>
550 public void ClassifiedDelete(UUID queryClassifiedID, IClientAPI remoteClient) 684 public void ClassifiedDelete(UUID queryClassifiedID, IClientAPI remoteClient)
551 { 685 {
686
552 string serverURI = string.Empty; 687 string serverURI = string.Empty;
553 GetUserProfileServerURI(remoteClient.AgentId, out serverURI); 688 bool foreign = GetUserProfileServerURI(remoteClient.AgentId, out serverURI);
554 if(string.IsNullOrWhiteSpace(serverURI)) 689 if(string.IsNullOrWhiteSpace(serverURI))
555 return; 690 return;
556 691
692 if(foreign)
693 {
694 remoteClient.SendAgentAlertMessage("Please change classifieds on your home grid", true);
695 return;
696 }
697
557 UUID classifiedId; 698 UUID classifiedId;
558 if(!UUID.TryParse(queryClassifiedID.ToString(), out classifiedId)) 699 if(!UUID.TryParse(queryClassifiedID.ToString(), out classifiedId))
559 return; 700 return;
@@ -568,6 +709,17 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
568 return; 709 return;
569 } 710 }
570 711
712 // flush cache
713 UserProfileCacheEntry uce = null;
714 lock(m_profilesCache)
715 {
716 if(m_profilesCache.TryGetValue(remoteClient.AgentId, out uce) && uce != null)
717 {
718 uce.classifieds = null;
719 uce.classifiedsLists = null;
720 }
721 }
722
571 parameters = (OSDMap)Params; 723 parameters = (OSDMap)Params;
572 } 724 }
573 #endregion Classified 725 #endregion Classified
@@ -605,6 +757,19 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
605 return; 757 return;
606 } 758 }
607 759
760 UserProfileCacheEntry uce = null;
761 lock(m_profilesCache)
762 {
763 if(m_profilesCache.TryGetValue(targetId, out uce) && uce != null)
764 {
765 if(uce != null && uce.picksList != null)
766 {
767 remoteClient.SendAvatarPicksReply(targetId, uce.picksList);
768 return;
769 }
770 }
771 }
772
608 string serverURI = string.Empty; 773 string serverURI = string.Empty;
609 GetUserProfileServerURI(targetId, out serverURI); 774 GetUserProfileServerURI(targetId, out serverURI);
610 if(string.IsNullOrWhiteSpace(serverURI)) 775 if(string.IsNullOrWhiteSpace(serverURI))
@@ -637,6 +802,16 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
637 string name = m["name"].AsString(); 802 string name = m["name"].AsString();
638 picks[cid] = name; 803 picks[cid] = name;
639 } 804 }
805
806 lock(m_profilesCache)
807 {
808 if(!m_profilesCache.TryGetValue(targetId, out uce) || uce == null)
809 uce = new UserProfileCacheEntry();
810 uce.picksList = picks;
811
812 m_profilesCache.AddOrUpdate(targetId, uce, PROFILECACHEEXPIRE);
813 }
814
640 remoteClient.SendAvatarPicksReply(targetId, picks); 815 remoteClient.SendAvatarPicksReply(targetId, picks);
641 } 816 }
642 817
@@ -667,8 +842,27 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
667 if(!UUID.TryParse (args [1], out pick.PickId)) 842 if(!UUID.TryParse (args [1], out pick.PickId))
668 return; 843 return;
669 844
845 IClientAPI remoteClient = (IClientAPI)sender;
846 UserProfileCacheEntry uce = null;
847 lock(m_profilesCache)
848 {
849 if(m_profilesCache.TryGetValue(targetID, out uce) && uce != null)
850 {
851 if(uce != null && uce.picks != null && uce.picks.ContainsKey(pick.PickId))
852 {
853 pick = uce.picks[pick.PickId];
854 Vector3 gPos = new Vector3(Vector3.Zero);
855 Vector3.TryParse(pick.GlobalPos, out gPos);
856 remoteClient.SendPickInfoReply(pick.PickId,pick.CreatorId,pick.TopPick,pick.ParcelId,pick.Name,
857 pick.Desc,pick.SnapshotId,pick.ParcelName,pick.OriginalName,pick.SimName,
858 gPos,pick.SortOrder,pick.Enabled);
859 return;
860 }
861 }
862 }
863
670 string serverURI = string.Empty; 864 string serverURI = string.Empty;
671 GetUserProfileServerURI (targetID, out serverURI); 865 bool foreign = GetUserProfileServerURI (targetID, out serverURI);
672 if(string.IsNullOrWhiteSpace(serverURI)) 866 if(string.IsNullOrWhiteSpace(serverURI))
673 { 867 {
674 return; 868 return;
@@ -676,8 +870,6 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
676 870
677 string theirGatekeeperURI; 871 string theirGatekeeperURI;
678 GetUserGatekeeperURI(targetID, out theirGatekeeperURI); 872 GetUserGatekeeperURI(targetID, out theirGatekeeperURI);
679
680 IClientAPI remoteClient = (IClientAPI)sender;
681 873
682 object Pick = (object)pick; 874 object Pick = (object)pick;
683 if (!rpc.JsonRpcRequest (ref Pick, "pickinforequest", serverURI, UUID.Random ().ToString ())) { 875 if (!rpc.JsonRpcRequest (ref Pick, "pickinforequest", serverURI, UUID.Random ().ToString ())) {
@@ -686,6 +878,8 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
686 return; 878 return;
687 } 879 }
688 pick = (UserProfilePick)Pick; 880 pick = (UserProfilePick)Pick;
881 if(foreign)
882 cacheForeignImage(targetID, pick.SnapshotId);
689 883
690 Vector3 globalPos = new Vector3(Vector3.Zero); 884 Vector3 globalPos = new Vector3(Vector3.Zero);
691 Vector3.TryParse(pick.GlobalPos, out globalPos); 885 Vector3.TryParse(pick.GlobalPos, out globalPos);
@@ -716,6 +910,18 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
716 910
717 m_log.DebugFormat("[PROFILES]: PickInfoRequest: {0} : {1}", pick.Name.ToString(), pick.SnapshotId.ToString()); 911 m_log.DebugFormat("[PROFILES]: PickInfoRequest: {0} : {1}", pick.Name.ToString(), pick.SnapshotId.ToString());
718 912
913 pick.GlobalPos = globalPos.ToString();
914 lock(m_profilesCache)
915 {
916 if(!m_profilesCache.TryGetValue(targetID, out uce) || uce == null)
917 uce = new UserProfileCacheEntry();
918 if(uce.picks == null)
919 uce.picks = new Dictionary<UUID, UserProfilePick>();
920 uce.picks[pick.PickId] = pick;
921
922 m_profilesCache.AddOrUpdate(targetID, uce, PROFILECACHEEXPIRE);
923 }
924
719 // Pull the rabbit out of the hat 925 // Pull the rabbit out of the hat
720 remoteClient.SendPickInfoReply(pick.PickId,pick.CreatorId,pick.TopPick,pick.ParcelId,pick.Name, 926 remoteClient.SendPickInfoReply(pick.PickId,pick.CreatorId,pick.TopPick,pick.ParcelId,pick.Name,
721 pick.Desc,pick.SnapshotId,pick.ParcelName,pick.OriginalName,pick.SimName, 927 pick.Desc,pick.SnapshotId,pick.ParcelName,pick.OriginalName,pick.SimName,
@@ -754,7 +960,6 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
754 /// </param> 960 /// </param>
755 public void PickInfoUpdate(IClientAPI remoteClient, UUID pickID, UUID creatorID, bool topPick, string name, string desc, UUID snapshotID, int sortOrder, bool enabled) 961 public void PickInfoUpdate(IClientAPI remoteClient, UUID pickID, UUID creatorID, bool topPick, string name, string desc, UUID snapshotID, int sortOrder, bool enabled)
756 { 962 {
757 //TODO: See how this works with NPC, May need to test
758 m_log.DebugFormat("[PROFILES]: Start PickInfoUpdate Name: {0} PickId: {1} SnapshotId: {2}", name, pickID.ToString(), snapshotID.ToString()); 963 m_log.DebugFormat("[PROFILES]: Start PickInfoUpdate Name: {0} PickId: {1} SnapshotId: {2}", name, pickID.ToString(), snapshotID.ToString());
759 964
760 UserProfilePick pick = new UserProfilePick(); 965 UserProfilePick pick = new UserProfilePick();
@@ -774,15 +979,19 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
774 avaPos.Z); 979 avaPos.Z);
775 980
776 string landParcelName = "My Parcel"; 981 string landParcelName = "My Parcel";
777 UUID landParcelID = p.currentParcelUUID; 982// UUID landParcelID = p.currentParcelUUID;
778 983
984 // to locate parcels we use a fake id that encodes the region handle
985 // since we do not have a global locator
986 // this fails on HG
987 UUID landParcelID = Util.BuildFakeParcelID(remoteClient.Scene.RegionInfo.RegionHandle, (uint)avaPos.X, (uint)avaPos.Y);
779 ILandObject land = p.Scene.LandChannel.GetLandObject(avaPos.X, avaPos.Y); 988 ILandObject land = p.Scene.LandChannel.GetLandObject(avaPos.X, avaPos.Y);
780 989
781 if (land != null) 990 if (land != null)
782 { 991 {
783 // If land found, use parcel uuid from here because the value from SP will be blank if the avatar hasnt moved 992 // If land found, use parcel uuid from here because the value from SP will be blank if the avatar hasnt moved
784 landParcelName = land.LandData.Name; 993 landParcelName = land.LandData.Name;
785 landParcelID = land.LandData.GlobalID; 994// landParcelID = land.LandData.GlobalID;
786 } 995 }
787 else 996 else
788 { 997 {
@@ -791,7 +1000,6 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
791 avaPos.X, avaPos.Y, p.Scene.Name); 1000 avaPos.X, avaPos.Y, p.Scene.Name);
792 } 1001 }
793 1002
794
795 pick.PickId = pickID; 1003 pick.PickId = pickID;
796 pick.CreatorId = creatorID; 1004 pick.CreatorId = creatorID;
797 pick.TopPick = topPick; 1005 pick.TopPick = topPick;
@@ -814,6 +1022,24 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
814 return; 1022 return;
815 } 1023 }
816 1024
1025 UserProfileCacheEntry uce = null;
1026 lock(m_profilesCache)
1027 {
1028 if(!m_profilesCache.TryGetValue(remoteClient.AgentId, out uce) || uce == null)
1029 uce = new UserProfileCacheEntry();
1030 if(uce.picks == null)
1031 uce.picks = new Dictionary<UUID, UserProfilePick>();
1032 if(uce.picksList == null)
1033 uce.picksList = new Dictionary<UUID, string>();
1034 uce.picks[pick.PickId] = pick;
1035 uce.picksList[pick.PickId] = pick.Name;
1036 m_profilesCache.AddOrUpdate(remoteClient.AgentId, uce, PROFILECACHEEXPIRE);
1037 }
1038 remoteClient.SendAvatarPicksReply(remoteClient.AgentId, uce.picksList);
1039 remoteClient.SendPickInfoReply(pick.PickId,pick.CreatorId,pick.TopPick,pick.ParcelId,pick.Name,
1040 pick.Desc,pick.SnapshotId,pick.ParcelName,pick.OriginalName,pick.SimName,
1041 posGlobal,pick.SortOrder,pick.Enabled);
1042
817 m_log.DebugFormat("[PROFILES]: Finish PickInfoUpdate {0} {1}", pick.Name, pick.PickId.ToString()); 1043 m_log.DebugFormat("[PROFILES]: Finish PickInfoUpdate {0} {1}", pick.Name, pick.PickId.ToString());
818 } 1044 }
819 1045
@@ -844,6 +1070,23 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
844 "Error picks delete", false); 1070 "Error picks delete", false);
845 return; 1071 return;
846 } 1072 }
1073
1074 UserProfileCacheEntry uce = null;
1075 lock(m_profilesCache)
1076 {
1077 if(m_profilesCache.TryGetValue(remoteClient.AgentId, out uce) && uce != null)
1078 {
1079 if(uce.picks != null && uce.picks.ContainsKey(queryPickID))
1080 uce.picks.Remove(queryPickID);
1081 if(uce.picksList != null && uce.picksList.ContainsKey(queryPickID))
1082 uce.picksList.Remove(queryPickID);
1083 m_profilesCache.AddOrUpdate(remoteClient.AgentId, uce, PROFILECACHEEXPIRE);
1084 }
1085 }
1086 if(uce != null && uce.picksList != null)
1087 remoteClient.SendAvatarPicksReply(remoteClient.AgentId, uce.picksList);
1088 else
1089 remoteClient.SendAvatarPicksReply(remoteClient.AgentId, new Dictionary<UUID, string>());
847 } 1090 }
848 #endregion Picks 1091 #endregion Picks
849 1092
@@ -1025,6 +1268,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
1025 /// </param> 1268 /// </param>
1026 public void AvatarInterestsUpdate(IClientAPI remoteClient, uint wantmask, string wanttext, uint skillsmask, string skillstext, string languages) 1269 public void AvatarInterestsUpdate(IClientAPI remoteClient, uint wantmask, string wanttext, uint skillsmask, string skillstext, string languages)
1027 { 1270 {
1271
1028 UserProfileProperties prop = new UserProfileProperties(); 1272 UserProfileProperties prop = new UserProfileProperties();
1029 1273
1030 prop.UserId = remoteClient.AgentId; 1274 prop.UserId = remoteClient.AgentId;
@@ -1046,6 +1290,17 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
1046 "Error updating interests", false); 1290 "Error updating interests", false);
1047 return; 1291 return;
1048 } 1292 }
1293
1294 // flush cache
1295 UserProfileCacheEntry uce = null;
1296 lock(m_profilesCache)
1297 {
1298 if(m_profilesCache.TryGetValue(remoteClient.AgentId, out uce) && uce != null)
1299 {
1300 uce.props = null;
1301 }
1302 }
1303
1049 } 1304 }
1050 1305
1051 public void RequestAvatarProperties(IClientAPI remoteClient, UUID avatarID) 1306 public void RequestAvatarProperties(IClientAPI remoteClient, UUID avatarID)
@@ -1067,6 +1322,27 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
1067 0, "Getting into trouble", "Droidspeak"); 1322 0, "Getting into trouble", "Droidspeak");
1068 return; 1323 return;
1069 } 1324 }
1325 UserProfileProperties props;
1326 UserProfileCacheEntry uce = null;
1327 lock(m_profilesCache)
1328 {
1329 if(m_profilesCache.TryGetValue(avatarID, out uce) && uce != null)
1330 {
1331 if(uce.props != null)
1332 {
1333 props = uce.props;
1334 remoteClient.SendAvatarProperties(props.UserId, props.AboutText,
1335 uce.born, uce.membershipType , props.FirstLifeText, uce.flags,
1336 props.FirstLifeImageId, props.ImageId, props.WebUrl, props.PartnerId);
1337
1338
1339 remoteClient.SendAvatarInterestsReply(props.UserId, (uint)props.WantToMask,
1340 props.WantToText, (uint)props.SkillsMask,
1341 props.SkillsText, props.Language);
1342 return;
1343 }
1344 }
1345 }
1070 1346
1071 string serverURI = string.Empty; 1347 string serverURI = string.Empty;
1072 bool foreign = GetUserProfileServerURI(avatarID, out serverURI); 1348 bool foreign = GetUserProfileServerURI(avatarID, out serverURI);
@@ -1118,13 +1394,13 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
1118 } 1394 }
1119 } 1395 }
1120 1396
1121 UserProfileProperties props = new UserProfileProperties(); 1397 props = new UserProfileProperties();
1122 props.UserId = avatarID; 1398 props.UserId = avatarID;
1123 1399
1124 string result = string.Empty; 1400 string result = string.Empty;
1125 if(!GetProfileData(ref props, foreign, out result)) 1401 if(!GetProfileData(ref props, foreign, serverURI, out result))
1126 { 1402 {
1127 props.AboutText ="Profile not avaible at this time. User may still be unknown to this grid"; 1403 props.AboutText ="Profile not available at this time. User may still be unknown to this grid";
1128 } 1404 }
1129 1405
1130 // if on same region force online 1406 // if on same region force online
@@ -1134,10 +1410,21 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
1134 if(!m_allowUserProfileWebURLs) 1410 if(!m_allowUserProfileWebURLs)
1135 props.WebUrl =""; 1411 props.WebUrl ="";
1136 1412
1413 lock(m_profilesCache)
1414 {
1415 if(!m_profilesCache.TryGetValue(props.UserId, out uce) || uce == null)
1416 uce = new UserProfileCacheEntry();
1417 uce.props = props;
1418 uce.born = born;
1419 uce.membershipType = membershipType;
1420 uce.flags = flags;
1421
1422 m_profilesCache.AddOrUpdate(props.UserId, uce, PROFILECACHEEXPIRE);
1423 }
1424
1137 remoteClient.SendAvatarProperties(props.UserId, props.AboutText, born, membershipType , props.FirstLifeText, flags, 1425 remoteClient.SendAvatarProperties(props.UserId, props.AboutText, born, membershipType , props.FirstLifeText, flags,
1138 props.FirstLifeImageId, props.ImageId, props.WebUrl, props.PartnerId); 1426 props.FirstLifeImageId, props.ImageId, props.WebUrl, props.PartnerId);
1139 1427
1140
1141 remoteClient.SendAvatarInterestsReply(props.UserId, (uint)props.WantToMask, props.WantToText, (uint)props.SkillsMask, 1428 remoteClient.SendAvatarInterestsReply(props.UserId, (uint)props.WantToMask, props.WantToText, (uint)props.SkillsMask,
1142 props.SkillsText, props.Language); 1429 props.SkillsText, props.Language);
1143 } 1430 }
@@ -1155,6 +1442,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
1155 { 1442 {
1156 if (remoteClient.AgentId == newProfile.ID) 1443 if (remoteClient.AgentId == newProfile.ID)
1157 { 1444 {
1445
1158 UserProfileProperties prop = new UserProfileProperties(); 1446 UserProfileProperties prop = new UserProfileProperties();
1159 1447
1160 prop.UserId = remoteClient.AgentId; 1448 prop.UserId = remoteClient.AgentId;
@@ -1179,6 +1467,16 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
1179 return; 1467 return;
1180 } 1468 }
1181 1469
1470 // flush cache
1471 UserProfileCacheEntry uce = null;
1472 lock(m_profilesCache)
1473 {
1474 if(m_profilesCache.TryGetValue(remoteClient.AgentId, out uce) && uce != null)
1475 {
1476 uce.props = null;
1477 }
1478 }
1479
1182 RequestAvatarProperties(remoteClient, newProfile.ID); 1480 RequestAvatarProperties(remoteClient, newProfile.ID);
1183 } 1481 }
1184 } 1482 }
@@ -1189,24 +1487,8 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
1189 /// <returns> 1487 /// <returns>
1190 /// The profile data. 1488 /// The profile data.
1191 /// </returns> 1489 /// </returns>
1192 bool GetProfileData(ref UserProfileProperties properties, bool foreign, out string message) 1490 bool GetProfileData(ref UserProfileProperties properties, bool foreign, string serverURI, out string message)
1193 { 1491 {
1194 // Can't handle NPC yet...
1195 ScenePresence p = FindPresence(properties.UserId);
1196
1197 if (null != p)
1198 {
1199 if (p.PresenceType == PresenceType.Npc)
1200 {
1201 message = "Id points to NPC";
1202 return false;
1203 }
1204 }
1205
1206 string serverURI = string.Empty;
1207 GetUserProfileServerURI(properties.UserId, out serverURI);
1208 // This is checking a friend on the home grid
1209 // Not HG friend
1210 if (String.IsNullOrEmpty(serverURI)) 1492 if (String.IsNullOrEmpty(serverURI))
1211 { 1493 {
1212 message = "User profile service unknown at this time"; 1494 message = "User profile service unknown at this time";
@@ -1247,10 +1529,14 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
1247 1529
1248 return false; 1530 return false;
1249 } 1531 }
1250 // else, continue below
1251 } 1532 }
1252 1533
1253 properties = (UserProfileProperties)Prop; 1534 properties = (UserProfileProperties)Prop;
1535 if(foreign)
1536 {
1537 cacheForeignImage(properties.UserId, properties.ImageId);
1538 cacheForeignImage(properties.UserId, properties.FirstLifeImageId);
1539 }
1254 1540
1255 message = "Success"; 1541 message = "Success";
1256 return true; 1542 return true;
@@ -1258,49 +1544,6 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
1258 #endregion Avatar Properties 1544 #endregion Avatar Properties
1259 1545
1260 #region Utils 1546 #region Utils
1261 bool GetImageAssets(UUID avatarId)
1262 {
1263 string profileServerURI = string.Empty;
1264 string assetServerURI = string.Empty;
1265
1266 bool foreign = GetUserProfileServerURI(avatarId, out profileServerURI);
1267
1268 if(!foreign)
1269 return true;
1270
1271 assetServerURI = UserManagementModule.GetUserServerURL(avatarId, "AssetServerURI");
1272
1273 if(string.IsNullOrEmpty(profileServerURI) || string.IsNullOrEmpty(assetServerURI))
1274 return false;
1275
1276 OSDMap parameters= new OSDMap();
1277 parameters.Add("avatarId", OSD.FromUUID(avatarId));
1278 OSD Params = (OSD)parameters;
1279 if(!rpc.JsonRpcRequest(ref Params, "image_assets_request", profileServerURI, UUID.Random().ToString()))
1280 {
1281 return false;
1282 }
1283
1284 parameters = (OSDMap)Params;
1285
1286 if (parameters.ContainsKey("result"))
1287 {
1288 OSDArray list = (OSDArray)parameters["result"];
1289
1290 foreach (OSD asset in list)
1291 {
1292 OSDString assetId = (OSDString)asset;
1293
1294 Scene.AssetService.Get(string.Format("{0}/{1}", assetServerURI, assetId.AsString()));
1295 }
1296 return true;
1297 }
1298 else
1299 {
1300 m_log.ErrorFormat("[PROFILES]: Problematic response for image_assets_request from {0}", profileServerURI);
1301 return false;
1302 }
1303 }
1304 1547
1305 /// <summary> 1548 /// <summary>
1306 /// Gets the user account data. 1549 /// Gets the user account data.
@@ -1451,6 +1694,27 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
1451 } 1694 }
1452 } 1695 }
1453 1696
1697 void cacheForeignImage(UUID agent, UUID imageID)
1698 {
1699 if(imageID == null || imageID == UUID.Zero)
1700 return;
1701
1702 string assetServerURI = UserManagementModule.GetUserServerURL(agent, "AssetServerURI");
1703 if(string.IsNullOrWhiteSpace(assetServerURI))
1704 return;
1705
1706 string imageIDstr = imageID.ToString();
1707
1708
1709 if(m_assetCache != null && m_assetCache.Check(imageIDstr))
1710 return;
1711
1712 if(Scene.AssetService.Get(imageIDstr) != null)
1713 return;
1714
1715 Scene.AssetService.Get(string.Format("{0}/{1}", assetServerURI, imageIDstr));
1716 }
1717
1454 /// <summary> 1718 /// <summary>
1455 /// Finds the presence. 1719 /// Finds the presence.
1456 /// </summary> 1720 /// </summary>
@@ -1519,9 +1783,8 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
1519 webRequest.ContentType = "application/json-rpc"; 1783 webRequest.ContentType = "application/json-rpc";
1520 webRequest.Method = "POST"; 1784 webRequest.Method = "POST";
1521 1785
1522 Stream dataStream = webRequest.GetRequestStream(); 1786 using(Stream dataStream = webRequest.GetRequestStream())
1523 dataStream.Write(content, 0, content.Length); 1787 dataStream.Write(content,0,content.Length);
1524 dataStream.Close();
1525 1788
1526 WebResponse webResponse = null; 1789 WebResponse webResponse = null;
1527 try 1790 try
@@ -1601,9 +1864,8 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
1601 webRequest.ContentType = "application/json-rpc"; 1864 webRequest.ContentType = "application/json-rpc";
1602 webRequest.Method = "POST"; 1865 webRequest.Method = "POST";
1603 1866
1604 Stream dataStream = webRequest.GetRequestStream(); 1867 using(Stream dataStream = webRequest.GetRequestStream())
1605 dataStream.Write(content, 0, content.Length); 1868 dataStream.Write(content,0,content.Length);
1606 dataStream.Close();
1607 1869
1608 WebResponse webResponse = null; 1870 WebResponse webResponse = null;
1609 try 1871 try
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs
index 568cd34..ada407f 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs
@@ -271,7 +271,6 @@ namespace OpenSim.Region.Framework.Scenes.Tests
271 IConfigSource configSource = new IniConfigSource(); 271 IConfigSource configSource = new IniConfigSource();
272 IConfig config = configSource.AddConfig("Startup"); 272 IConfig config = configSource.AddConfig("Startup");
273 config.Set("serverside_object_permissions", true); 273 config.Set("serverside_object_permissions", true);
274 config.Set("EventQueue", true);
275 274
276 EntityTransferModule etm = new EntityTransferModule(); 275 EntityTransferModule etm = new EntityTransferModule();
277 276
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index eeaec42..5269bf9 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -233,7 +233,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
233 protected int m_maxHitsPerPrimInCastRay = 16; 233 protected int m_maxHitsPerPrimInCastRay = 16;
234 protected int m_maxHitsPerObjectInCastRay = 16; 234 protected int m_maxHitsPerObjectInCastRay = 16;
235 protected bool m_detectExitsInCastRay = false; 235 protected bool m_detectExitsInCastRay = false;
236 protected bool m_filterPartsInCastRay = false;
237 protected bool m_doAttachmentsInCastRay = false; 236 protected bool m_doAttachmentsInCastRay = false;
238 protected int m_msThrottleInCastRay = 200; 237 protected int m_msThrottleInCastRay = 200;
239 protected int m_msPerRegionInCastRay = 40; 238 protected int m_msPerRegionInCastRay = 40;
@@ -391,7 +390,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
391 m_maxHitsPerPrimInCastRay = lslConfig.GetInt("MaxHitsPerPrimInLlCastRay", m_maxHitsPerPrimInCastRay); 390 m_maxHitsPerPrimInCastRay = lslConfig.GetInt("MaxHitsPerPrimInLlCastRay", m_maxHitsPerPrimInCastRay);
392 m_maxHitsPerObjectInCastRay = lslConfig.GetInt("MaxHitsPerObjectInLlCastRay", m_maxHitsPerObjectInCastRay); 391 m_maxHitsPerObjectInCastRay = lslConfig.GetInt("MaxHitsPerObjectInLlCastRay", m_maxHitsPerObjectInCastRay);
393 m_detectExitsInCastRay = lslConfig.GetBoolean("DetectExitHitsInLlCastRay", m_detectExitsInCastRay); 392 m_detectExitsInCastRay = lslConfig.GetBoolean("DetectExitHitsInLlCastRay", m_detectExitsInCastRay);
394 m_filterPartsInCastRay = lslConfig.GetBoolean("FilterPartsInLlCastRay", m_filterPartsInCastRay);
395 m_doAttachmentsInCastRay = lslConfig.GetBoolean("DoAttachmentsInLlCastRay", m_doAttachmentsInCastRay); 393 m_doAttachmentsInCastRay = lslConfig.GetBoolean("DoAttachmentsInLlCastRay", m_doAttachmentsInCastRay);
396 m_msThrottleInCastRay = lslConfig.GetInt("ThrottleTimeInMsInLlCastRay", m_msThrottleInCastRay); 394 m_msThrottleInCastRay = lslConfig.GetInt("ThrottleTimeInMsInLlCastRay", m_msThrottleInCastRay);
397 m_msPerRegionInCastRay = lslConfig.GetInt("AvailableTimeInMsPerRegionInLlCastRay", m_msPerRegionInCastRay); 395 m_msPerRegionInCastRay = lslConfig.GetInt("AvailableTimeInMsPerRegionInLlCastRay", m_msPerRegionInCastRay);
@@ -15063,8 +15061,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
15063 return; 15061 return;
15064 if (isPhantom && notdetectPhantom) 15062 if (isPhantom && notdetectPhantom)
15065 return; 15063 return;
15066 if (m_filterPartsInCastRay)
15067 return;
15068 if (isAttachment && !m_doAttachmentsInCastRay) 15064 if (isAttachment && !m_doAttachmentsInCastRay)
15069 return; 15065 return;
15070 15066
@@ -15072,25 +15068,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
15072 // Iterate over all prims/parts in object/group 15068 // Iterate over all prims/parts in object/group
15073 foreach(SceneObjectPart part in group.Parts) 15069 foreach(SceneObjectPart part in group.Parts)
15074 { 15070 {
15075 // Check part filters if configured 15071 // ignore PhysicsShapeType.None as physics engines do
15076 if (m_filterPartsInCastRay) 15072 // or we will get into trouble in future
15077 { 15073 if(part.PhysicsShapeType == (byte)PhysicsShapeType.None)
15078 // ignore PhysicsShapeType.None as physics engines do 15074 continue;
15079 // or we will get into trouble in future 15075 isPhysical = (part.PhysActor != null && part.PhysActor.IsPhysical);
15080 if(part.PhysicsShapeType == (byte)PhysicsShapeType.None) 15076 isNonphysical = !isPhysical;
15081 continue; 15077 isPhantom = ((part.Flags & PrimFlags.Phantom) != 0) ||
15082 isPhysical = (part.PhysActor != null && part.PhysActor.IsPhysical); 15078 (part.VolumeDetectActive);
15083 isNonphysical = !isPhysical;
15084 isPhantom = ((part.Flags & PrimFlags.Phantom) != 0) ||
15085 (part.VolumeDetectActive);
15086 15079
15087 if (isPhysical && rejectPhysical) 15080 if (isPhysical && rejectPhysical)
15088 continue; 15081 continue;
15089 if (isNonphysical && rejectNonphysical) 15082 if (isNonphysical && rejectNonphysical)
15090 continue; 15083 continue;
15091 if (isPhantom && notdetectPhantom) 15084 if (isPhantom && notdetectPhantom)
15092 continue; 15085 continue;
15093 }
15094 15086
15095 // Parse prim/part and project ray if passed filters 15087 // Parse prim/part and project ray if passed filters
15096 Vector3 scalePart = part.Scale; 15088 Vector3 scalePart = part.Scale;
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index c83682e..5638f01 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -310,7 +310,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
310 foreach (string id in ids) 310 foreach (string id in ids)
311 { 311 {
312 string current = id.Trim(); 312 string current = id.Trim();
313 if (current.ToUpper() == "PARCEL_GROUP_MEMBER" || current.ToUpper() == "PARCEL_OWNER" || current.ToUpper() == "ESTATE_MANAGER" || current.ToUpper() == "ESTATE_OWNER") 313 if (current.ToUpper() == "PARCEL_GROUP_MEMBER" || current.ToUpper() == "PARCEL_OWNER" || current.ToUpper() == "ESTATE_MANAGER" || current.ToUpper() == "ESTATE_OWNER" || current.ToUpper() == "GRID_GOD")
314 { 314 {
315 if (!perms.AllowedOwnerClasses.Contains(current)) 315 if (!perms.AllowedOwnerClasses.Contains(current))
316 perms.AllowedOwnerClasses.Add(current.ToUpper()); 316 perms.AllowedOwnerClasses.Add(current.ToUpper());
@@ -415,6 +415,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
415 } 415 }
416 } 416 }
417 417
418 //Only gods may use the function
419 if (m_FunctionPerms[function].AllowedOwnerClasses.Contains("GRID_GOD"))
420 {
421 if (World.Permissions.IsGridGod(ownerID))
422 {
423 return String.Empty;
424 }
425 }
426
418 if (!m_FunctionPerms[function].AllowedCreators.Contains(m_item.CreatorID)) 427 if (!m_FunctionPerms[function].AllowedCreators.Contains(m_item.CreatorID))
419 return( 428 return(
420 String.Format("{0} permission denied. Script creator is not in the list of users allowed to execute this function and prim owner also has no permission.", 429 String.Format("{0} permission denied. Script creator is not in the list of users allowed to execute this function and prim owner also has no permission.",
diff --git a/OpenSim/Server/Base/ServicesServerBase.cs b/OpenSim/Server/Base/ServicesServerBase.cs
index a7cffd7..e18594f 100644
--- a/OpenSim/Server/Base/ServicesServerBase.cs
+++ b/OpenSim/Server/Base/ServicesServerBase.cs
@@ -55,11 +55,7 @@ namespace OpenSim.Server.Base
55 // 55 //
56 protected string[] m_Arguments; 56 protected string[] m_Arguments;
57 57
58 public string ConfigDirectory 58 protected string m_configDirectory = ".";
59 {
60 get;
61 private set;
62 }
63 59
64 // Run flag 60 // Run flag
65 // 61 //
@@ -101,31 +97,24 @@ namespace OpenSim.Server.Base
101 logConfig =startupConfig.GetString("logconfig", logConfig); 97 logConfig =startupConfig.GetString("logconfig", logConfig);
102 } 98 }
103 99
104 // Find out of the file name is a URI and remote load it if possible. 100 Config = ReadConfigSource(iniFile);
105 // Load it as a local file otherwise.
106 Uri configUri;
107 101
108 try 102 List<string> sources = new List<string>();
103 sources.Add(iniFile);
104
105 int sourceIndex = 1;
106
107 while (AddIncludes(Config, sources))
109 { 108 {
110 if (Uri.TryCreate(iniFile, UriKind.Absolute, out configUri) && 109 for ( ; sourceIndex < sources.Count ; ++sourceIndex)
111 configUri.Scheme == Uri.UriSchemeHttp)
112 { 110 {
113 XmlReader r = XmlReader.Create(iniFile); 111 IConfigSource s = ReadConfigSource(sources[sourceIndex]);
114 Config = new XmlConfigSource(r); 112 Config.Merge(s);
115 }
116 else
117 {
118 Config = new IniConfigSource(iniFile);
119 } 113 }
120 } 114 }
121 catch (Exception e)
122 {
123 System.Console.WriteLine("Error reading from config source. {0}", e.Message);
124 Environment.Exit(1);
125 }
126 115
127 // Merge OpSys env vars 116 // Merge OpSys env vars
128 m_log.Info("[CONFIG]: Loading environment variables for Config"); 117 Console.WriteLine("[CONFIG]: Loading environment variables for Config");
129 Util.MergeEnvironmentToConfig(Config); 118 Util.MergeEnvironmentToConfig(Config);
130 119
131 // Merge the configuration from the command line into the loaded file 120 // Merge the configuration from the command line into the loaded file
@@ -141,7 +130,7 @@ namespace OpenSim.Server.Base
141 130
142 if (startupConfig != null) 131 if (startupConfig != null)
143 { 132 {
144 ConfigDirectory = startupConfig.GetString("ConfigDirectory", "."); 133 m_configDirectory = startupConfig.GetString("ConfigDirectory", m_configDirectory);
145 134
146 prompt = startupConfig.GetString("Prompt", prompt); 135 prompt = startupConfig.GetString("Prompt", prompt);
147 } 136 }
@@ -241,5 +230,114 @@ namespace OpenSim.Server.Base
241 protected virtual void Initialise() 230 protected virtual void Initialise()
242 { 231 {
243 } 232 }
233
234 /// <summary>
235 /// Adds the included files as ini configuration files
236 /// </summary>
237 /// <param name="sources">List of URL strings or filename strings</param>
238 private bool AddIncludes(IConfigSource configSource, List<string> sources)
239 {
240 bool sourcesAdded = false;
241
242 //loop over config sources
243 foreach (IConfig config in configSource.Configs)
244 {
245 // Look for Include-* in the key name
246 string[] keys = config.GetKeys();
247 foreach (string k in keys)
248 {
249 if (k.StartsWith("Include-"))
250 {
251 // read the config file to be included.
252 string file = config.GetString(k);
253 if (IsUri(file))
254 {
255 if (!sources.Contains(file))
256 {
257 sourcesAdded = true;
258 sources.Add(file);
259 }
260 }
261 else
262 {
263 string basepath = Path.GetFullPath(m_configDirectory);
264 // Resolve relative paths with wildcards
265 string chunkWithoutWildcards = file;
266 string chunkWithWildcards = string.Empty;
267 int wildcardIndex = file.IndexOfAny(new char[] { '*', '?' });
268 if (wildcardIndex != -1)
269 {
270 chunkWithoutWildcards = file.Substring(0, wildcardIndex);
271 chunkWithWildcards = file.Substring(wildcardIndex);
272 }
273 string path = Path.Combine(basepath, chunkWithoutWildcards);
274 path = Path.GetFullPath(path) + chunkWithWildcards;
275 string[] paths = Util.Glob(path);
276
277 // If the include path contains no wildcards, then warn the user that it wasn't found.
278 if (wildcardIndex == -1 && paths.Length == 0)
279 {
280 Console.WriteLine("[CONFIG]: Could not find include file {0}", path);
281 }
282 else
283 {
284 foreach (string p in paths)
285 {
286 if (!sources.Contains(p))
287 {
288 sourcesAdded = true;
289 sources.Add(p);
290 }
291 }
292 }
293 }
294 }
295 }
296 }
297
298 return sourcesAdded;
299 }
300
301 /// <summary>
302 /// Check if we can convert the string to a URI
303 /// </summary>
304 /// <param name="file">String uri to the remote resource</param>
305 /// <returns>true if we can convert the string to a Uri object</returns>
306 bool IsUri(string file)
307 {
308 Uri configUri;
309
310 return Uri.TryCreate(file, UriKind.Absolute,
311 out configUri) && configUri.Scheme == Uri.UriSchemeHttp;
312 }
313
314 IConfigSource ReadConfigSource(string iniFile)
315 {
316 // Find out of the file name is a URI and remote load it if possible.
317 // Load it as a local file otherwise.
318 Uri configUri;
319 IConfigSource s = null;
320
321 try
322 {
323 if (Uri.TryCreate(iniFile, UriKind.Absolute, out configUri) &&
324 configUri.Scheme == Uri.UriSchemeHttp)
325 {
326 XmlReader r = XmlReader.Create(iniFile);
327 s = new XmlConfigSource(r);
328 }
329 else
330 {
331 s = new IniConfigSource(iniFile);
332 }
333 }
334 catch (Exception e)
335 {
336 System.Console.WriteLine("Error reading from config source. {0}", e.Message);
337 Environment.Exit(1);
338 }
339
340 return s;
341 }
244 } 342 }
245} \ No newline at end of file 343}
diff --git a/OpenSim/Tools/Configger/ConfigurationLoader.cs b/OpenSim/Tools/Configger/ConfigurationLoader.cs
index 4190f10..fa3a5bf 100644
--- a/OpenSim/Tools/Configger/ConfigurationLoader.cs
+++ b/OpenSim/Tools/Configger/ConfigurationLoader.cs
@@ -264,21 +264,17 @@ namespace OpenSim.Tools.Configger
264 config.Set("region_info_source", "filesystem"); 264 config.Set("region_info_source", "filesystem");
265 config.Set("allow_regionless", false); 265 config.Set("allow_regionless", false);
266 266
267 config.Set("gridmode", false);
268 config.Set("physics", "OpenDynamicsEngine"); 267 config.Set("physics", "OpenDynamicsEngine");
269 config.Set("meshing", "Meshmerizer"); 268 config.Set("meshing", "Meshmerizer");
270 config.Set("physical_prim", true); 269 config.Set("physical_prim", true);
271 config.Set("serverside_object_permissions", true); 270 config.Set("serverside_object_permissions", true);
272 config.Set("storage_prim_inventories", true);
273 config.Set("startup_console_commands_file", String.Empty); 271 config.Set("startup_console_commands_file", String.Empty);
274 config.Set("shutdown_console_commands_file", String.Empty); 272 config.Set("shutdown_console_commands_file", String.Empty);
275 config.Set("DefaultScriptEngine", "XEngine"); 273 config.Set("DefaultScriptEngine", "XEngine");
276 config.Set("clientstack_plugin", "OpenSim.Region.ClientStack.LindenUDP.dll"); 274 config.Set("clientstack_plugin", "OpenSim.Region.ClientStack.LindenUDP.dll");
277 // life doesn't really work without this
278 config.Set("EventQueue", true);
279 } 275 }
280 276
281 return defaultConfig; 277 return defaultConfig;
282 } 278 }
283 } 279 }
284} \ No newline at end of file 280}
diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini
index fa491fc..0203300 100644
--- a/bin/OpenSimDefaults.ini
+++ b/bin/OpenSimDefaults.ini
@@ -1649,9 +1649,6 @@
1649 ; Report ray intersections with surfaces on exits from a prim as hits in llCastRay V3 if true 1649 ; Report ray intersections with surfaces on exits from a prim as hits in llCastRay V3 if true
1650 DetectExitHitsInLlCastRay = false 1650 DetectExitHitsInLlCastRay = false
1651 1651
1652 ; Filter on parts instead of groups in llCastRay V3 if true
1653 FilterPartsInLlCastRay = false
1654
1655 ; Detect attachments in llCastRay V3 if true 1652 ; Detect attachments in llCastRay V3 if true
1656 DoAttachmentsInLlCastRay = false 1653 DoAttachmentsInLlCastRay = false
1657 1654
diff --git a/bin/Robust.HG.ini.example b/bin/Robust.HG.ini.example
index 0382d4b..84cce86 100644
--- a/bin/Robust.HG.ini.example
+++ b/bin/Robust.HG.ini.example
@@ -58,7 +58,7 @@
58 ; Modular configurations 58 ; Modular configurations
59 ; Set path to directory for modular ini files... 59 ; Set path to directory for modular ini files...
60 ; The Robust.exe process must have R/W access to the location 60 ; The Robust.exe process must have R/W access to the location
61 ConfigDirectory = "." 61 ConfigDirectory = "robust-include"
62 62
63 ; Console commands can be saved to a file, so the command history persists after a restart. (default is true) 63 ; Console commands can be saved to a file, so the command history persists after a restart. (default is true)
64 ConsoleHistoryFileEnabled = true 64 ConsoleHistoryFileEnabled = true
@@ -102,7 +102,13 @@
102 ;; Uncomment this if you want Groups V2 to work 102 ;; Uncomment this if you want Groups V2 to work
103 ; GroupsServiceConnector = "${Const|PrivatePort}/OpenSim.Addons.Groups.dll:GroupsServiceRobustConnector" 103 ; GroupsServiceConnector = "${Const|PrivatePort}/OpenSim.Addons.Groups.dll:GroupsServiceRobustConnector"
104 ;; Uncomment to provide bakes caching 104 ;; Uncomment to provide bakes caching
105 ;BakedTextureService = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:XBakesConnector" 105 ; BakedTextureService = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:XBakesConnector"
106
107 ;; Uncomment for UserProfiles see [UserProfilesService] to configure...
108 ; UserProfilesServiceConnector = "${Const|PublicPort}/OpenSim.Server.Handlers.dll:UserProfilesConnector"
109
110 ;; Uncomment if you want to have centralized estate data
111 ; EstateDataService = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:EstateDataRobustConnector"
106 112
107 ;; Additions for Hypergrid 113 ;; Additions for Hypergrid
108 114
@@ -116,12 +122,6 @@
116 ;; Uncomment this if you want Groups V2, HG to work 122 ;; Uncomment this if you want Groups V2, HG to work
117 ; HGGroupsServiceConnector = "${Const|PublicPort}/OpenSim.Addons.Groups.dll:HGGroupsServiceRobustConnector" 123 ; HGGroupsServiceConnector = "${Const|PublicPort}/OpenSim.Addons.Groups.dll:HGGroupsServiceRobustConnector"
118 124
119 ;; Uncomment for UserProfiles see [UserProfilesService] to configure...
120 ; UserProfilesServiceConnector = "${Const|PublicPort}/OpenSim.Server.Handlers.dll:UserProfilesConnector"
121
122 ;; Uncomment if you want to have centralized estate data
123 ; EstateDataService = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:EstateDataRobustConnector"
124
125; * This is common for all services, it's the network setup for the entire 125; * This is common for all services, it's the network setup for the entire
126; * server instance, if none is specified above 126; * server instance, if none is specified above
127; * 127; *
@@ -264,6 +264,18 @@
264 DefaultAssetLoader = "OpenSim.Framework.AssetLoader.Filesystem.dll" 264 DefaultAssetLoader = "OpenSim.Framework.AssetLoader.Filesystem.dll"
265 AssetLoaderArgs = "./assets/AssetSets.xml" 265 AssetLoaderArgs = "./assets/AssetSets.xml"
266 266
267 ; Allow maptile assets to remotely deleted by remote calls to the asset service.
268 ; There is no harm in having this as false - it just means that historical maptile assets are not deleted.
269 ; This only applies to maptiles served via the version 1 viewer mechanisms
270 ; Default is false
271 AllowRemoteDelete = false
272
273 ; Allow all assets to be remotely deleted.
274 ; Only set this to true if you are operating a grid where you control all calls to the asset service
275 ; (where a necessary condition is that you control all simulators) and you need this for admin purposes.
276 ; If set to true, AllowRemoteDelete = true is required as well.
277 ; Default is false.
278 AllowRemoteDeleteAllTypes = false
267 279
268; * This configuration loads the inventory server modules. It duplicates 280; * This configuration loads the inventory server modules. It duplicates
269; * the function of the legacy inventory server 281; * the function of the legacy inventory server
@@ -315,6 +327,7 @@
315 ;; 327 ;;
316 ;; Persistent When the simulator is shutdown, the region is signalled as offline but left registered on the grid. 328 ;; Persistent When the simulator is shutdown, the region is signalled as offline but left registered on the grid.
317 ;; 329 ;;
330 ;; Example specification:
318 ; Region_Welcome_Area = "DefaultRegion, FallbackRegion" 331 ; Region_Welcome_Area = "DefaultRegion, FallbackRegion"
319 ; (replace spaces with underscore) 332 ; (replace spaces with underscore)
320 333
@@ -439,6 +452,9 @@
439 ; for the server connector 452 ; for the server connector
440 LocalServiceModule = "OpenSim.Services.PresenceService.dll:PresenceService" 453 LocalServiceModule = "OpenSim.Services.PresenceService.dll:PresenceService"
441 454
455 ; Set this to true to allow the use of advanced web services and multiple
456 ; bots using one account
457 AllowDuplicatePresences = false;
442 458
443[AvatarService] 459[AvatarService]
444 ; for the server connector 460 ; for the server connector
@@ -470,14 +486,21 @@
470 GridService = "OpenSim.Services.GridService.dll:GridService" 486 GridService = "OpenSim.Services.GridService.dll:GridService"
471 SimulationService ="OpenSim.Services.Connectors.dll:SimulationServiceConnector" 487 SimulationService ="OpenSim.Services.Connectors.dll:SimulationServiceConnector"
472 LibraryService = "OpenSim.Services.InventoryService.dll:LibraryService" 488 LibraryService = "OpenSim.Services.InventoryService.dll:LibraryService"
473 UserAgentService = "OpenSim.Services.HypergridService.dll:UserAgentService"
474 FriendsService = "OpenSim.Services.FriendsService.dll:FriendsService" 489 FriendsService = "OpenSim.Services.FriendsService.dll:FriendsService"
490 ; The minimum user level required for a user to be able to login. 0 by default
491 ; If you disable a particular user's account then you can set their login level below this number.
492 ; You can also change this level from the console though these changes will not be persisted.
493 ; MinLoginLevel = 0
494
495 ;; for hypergrid
496 UserAgentService = "OpenSim.Services.HypergridService.dll:UserAgentService"
475 497
476 ; This inventory service will be used to initialize the user's inventory 498 ; This inventory service will be used to initialize the user's inventory
477 HGInventoryServicePlugin = "OpenSim.Services.HypergridService.dll:HGSuitcaseInventoryService" 499 HGInventoryServicePlugin = "OpenSim.Services.HypergridService.dll:HGSuitcaseInventoryService"
478 HGInventoryServiceConstructorArg = "HGInventoryService" 500 HGInventoryServiceConstructorArg = "HGInventoryService"
501 ;; end hypergrid
479 502
480 ;; Ask co-operative viewers to use a different currency name 503 ; Ask co-operative viewers to use a different currency name
481 ;Currency = "" 504 ;Currency = ""
482 505
483 ;; Set minimum fee to publish classified 506 ;; Set minimum fee to publish classified
@@ -525,6 +548,24 @@
525 ;; 'America/Los_Angeles' is used on Linux/Mac systems whilst 'Pacific Standard Time' is used on Windows 548 ;; 'America/Los_Angeles' is used on Linux/Mac systems whilst 'Pacific Standard Time' is used on Windows
526 DSTZone = "America/Los_Angeles;Pacific Standard Time" 549 DSTZone = "America/Los_Angeles;Pacific Standard Time"
527 550
551 ;Basic Login Service Dos Protection Tweaks
552 ;;
553 ;; Some Grids/Users use a transparent proxy that makes use of the X-Forwarded-For HTTP Header, If you do, set this to true
554 ;; If you set this to true and you don't have a transparent proxy, it may allow attackers to put random things in the X-Forwarded-For header to
555 ;; get around this basic DOS protection.
556 ;DOSAllowXForwardedForHeader = false
557 ;;
558 ;; The protector adds up requests during this rolling period of time, default 10 seconds
559 ;DOSRequestTimeFrameMS = 10000
560 ;;
561 ;; The amount of requests in the above timeframe from the same endpoint that triggers protection
562 ;DOSMaxRequestsInTimeFrame = 5
563 ;;
564 ;; The amount of time that a specific endpoint is blocked. Default 2 minutes.
565 ;DOSForgiveClientAfterMS = 120000
566 ;;
567 ;; To turn off basic dos protection, set the DOSMaxRequestsInTimeFrame to 0.
568
528 569
529[MapImageService] 570[MapImageService]
530 LocalServiceModule = "OpenSim.Services.MapImageService.dll:MapImageService" 571 LocalServiceModule = "OpenSim.Services.MapImageService.dll:MapImageService"
@@ -757,6 +798,7 @@
757 ;; What is the HomeURI of users associated with this grid? 798 ;; What is the HomeURI of users associated with this grid?
758 ;; Can overwrite the default in [Hypergrid], but probably shouldn't 799 ;; Can overwrite the default in [Hypergrid], but probably shouldn't
759 ; HomeURI = "${Const|BaseURL}:${Const|PublicPort}" 800 ; HomeURI = "${Const|BaseURL}:${Const|PublicPort}"
801 ;; end hypergrid
760 802
761 ;; Sets the maximum number of groups an agent may join 803 ;; Sets the maximum number of groups an agent may join
762 ; MaxAgentGroups = 42 804 ; MaxAgentGroups = 42
diff --git a/bin/Robust.ini.example b/bin/Robust.ini.example
index 51cf9d8..2263780 100644
--- a/bin/Robust.ini.example
+++ b/bin/Robust.ini.example
@@ -50,7 +50,7 @@
50 ; Modular configurations 50 ; Modular configurations
51 ; Set path to directory for modular ini files... 51 ; Set path to directory for modular ini files...
52 ; The Robust.exe process must have R/W access to the location 52 ; The Robust.exe process must have R/W access to the location
53 ConfigDirectory = "." 53 ConfigDirectory = "robust-include"
54 54
55 ; Console commands can be saved to a file, so the command history persists after a restart. (default is true) 55 ; Console commands can be saved to a file, so the command history persists after a restart. (default is true)
56 ConsoleHistoryFileEnabled = true 56 ConsoleHistoryFileEnabled = true
@@ -89,11 +89,11 @@
89 MapAddServiceConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:MapAddServiceConnector" 89 MapAddServiceConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:MapAddServiceConnector"
90 MapGetServiceConnector = "${Const|PublicPort}/OpenSim.Server.Handlers.dll:MapGetServiceConnector" 90 MapGetServiceConnector = "${Const|PublicPort}/OpenSim.Server.Handlers.dll:MapGetServiceConnector"
91 ;; Uncomment this if you want offline IM to work 91 ;; Uncomment this if you want offline IM to work
92 ;OfflineIMServiceConnector = "${Const|PrivatePort}/OpenSim.Addons.OfflineIM.dll:OfflineIMServiceRobustConnector" 92 ; OfflineIMServiceConnector = "${Const|PrivatePort}/OpenSim.Addons.OfflineIM.dll:OfflineIMServiceRobustConnector"
93 ;; Uncomment this if you want Groups V2 to work 93 ;; Uncomment this if you want Groups V2 to work
94 ;GroupsServiceConnector = "${Const|PrivatePort}/OpenSim.Addons.Groups.dll:GroupsServiceRobustConnector" 94 ; GroupsServiceConnector = "${Const|PrivatePort}/OpenSim.Addons.Groups.dll:GroupsServiceRobustConnector"
95 ;; Uncomment to provide bakes caching 95 ;; Uncomment to provide bakes caching
96 ;BakedTextureService = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:XBakesConnector" 96 ; BakedTextureService = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:XBakesConnector"
97 97
98 ;; Uncomment for UserProfiles see [UserProfilesService] to configure... 98 ;; Uncomment for UserProfiles see [UserProfilesService] to configure...
99 ; UserProfilesServiceConnector = "${Const|PublicPort}/OpenSim.Server.Handlers.dll:UserProfilesConnector" 99 ; UserProfilesServiceConnector = "${Const|PublicPort}/OpenSim.Server.Handlers.dll:UserProfilesConnector"
@@ -222,7 +222,7 @@
222 222
223 ;; The following are common to both the default asset service and FSAsset service 223 ;; The following are common to both the default asset service and FSAsset service
224 224
225 ;; Default loader for loading default assets from XML on first run 225 ;; Common asset service options
226 DefaultAssetLoader = "OpenSim.Framework.AssetLoader.Filesystem.dll" 226 DefaultAssetLoader = "OpenSim.Framework.AssetLoader.Filesystem.dll"
227 AssetLoaderArgs = "./assets/AssetSets.xml" 227 AssetLoaderArgs = "./assets/AssetSets.xml"
228 228
@@ -332,6 +332,7 @@
332[AuthenticationService] 332[AuthenticationService]
333 ; for the server connector 333 ; for the server connector
334 LocalServiceModule = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService" 334 LocalServiceModule = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService"
335 ; Realm = "useraccounts"
335 336
336 ;; Allow the service to process HTTP getauthinfo calls. 337 ;; Allow the service to process HTTP getauthinfo calls.
337 ;; Default is false. 338 ;; Default is false.
@@ -352,8 +353,8 @@
352 UserAccountServiceModule = "OpenSim.Services.UserAccountService.dll:UserAccountService" 353 UserAccountServiceModule = "OpenSim.Services.UserAccountService.dll:UserAccountService"
353 354
354 355
355; * This is the new style authentication service. Currently, only MySQL 356; * This is the new style user service.
356; * is implemented. "Realm" is the table that is used for user lookup. 357; * "Realm" is the table that is used for user lookup.
357; * It defaults to "useraccounts", which uses the new style. 358; * It defaults to "useraccounts", which uses the new style.
358; * Realm = "users" will use the legacy tables as an authentication source 359; * Realm = "users" will use the legacy tables as an authentication source
359; * 360; *
@@ -464,15 +465,6 @@
464 ; HasProxy = false 465 ; HasProxy = false
465 466
466 ;# {DSTZone} {} {Override Daylight Saving Time rules} {* none local} "America/Los_Angeles;Pacific Standard Time" 467 ;# {DSTZone} {} {Override Daylight Saving Time rules} {* none local} "America/Los_Angeles;Pacific Standard Time"
467 ;; Viewers do not listen to timezone sent by the server. They use Pacific Standard Time instead,
468 ;; but rely on the server to calculate Daylight Saving Time. Sending another DST than US Pacific
469 ;; would result in time inconsistencies between grids (during summer and around DST transition period)
470 ;; default let OpenSim calculate US Pacific DST
471 ;; "none" disable DST (equivallent to "local" with system set to GMT)
472 ;; "local" force legacy behaviour (using local system time to calculate DST)
473 ; DSTZone = "America/Los_Angeles;Pacific Standard Time"
474
475 ;# {DSTZone} {} {Override Daylight Saving Time rules} {* none local} "America/Los_Angeles;Pacific Standard Time"
476 ;; Viewers do not receive timezone information from the server - almost all (?) default to Pacific Standard Time 468 ;; Viewers do not receive timezone information from the server - almost all (?) default to Pacific Standard Time
477 ;; However, they do rely on the server to tell them whether it's Daylight Saving Time or not. 469 ;; However, they do rely on the server to tell them whether it's Daylight Saving Time or not.
478 ;; Hence, calculating DST based on a different timezone can result in a misleading viewer display and inconsistencies between grids. 470 ;; Hence, calculating DST based on a different timezone can result in a misleading viewer display and inconsistencies between grids.
@@ -517,16 +509,6 @@
517 ; HasProxy = false 509 ; HasProxy = false
518 510
519 511
520[Messaging]
521 ; OfflineIM
522 OfflineIMService = "OpenSim.Addons.OfflineIM.dll:OfflineIMService"
523
524
525[Groups]
526 ;; Sets the maximum number of groups an agent may join
527 ; MaxAgentGroups = 42
528
529
530[GridInfoService] 512[GridInfoService]
531 ; These settings are used to return information on a get_grid_info call. 513 ; These settings are used to return information on a get_grid_info call.
532 ; Client launcher scripts and third-party clients make use of this to 514 ; Client launcher scripts and third-party clients make use of this to
@@ -567,6 +549,16 @@
567 ;password = ${Const|BaseURL}/password 549 ;password = ${Const|BaseURL}/password
568 550
569 551
552[Messaging]
553 ; OfflineIM
554 OfflineIMService = "OpenSim.Addons.OfflineIM.dll:OfflineIMService"
555
556
557[Groups]
558 ;; Sets the maximum number of groups an agent may join
559 ; MaxAgentGroups = 42
560
561
570[UserProfilesService] 562[UserProfilesService]
571 LocalServiceModule = "OpenSim.Services.UserProfilesService.dll:UserProfilesService" 563 LocalServiceModule = "OpenSim.Services.UserProfilesService.dll:UserProfilesService"
572 Enabled = false 564 Enabled = false