aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs
diff options
context:
space:
mode:
authorUbitUmarov2016-12-17 20:11:34 +0000
committerUbitUmarov2016-12-17 20:11:34 +0000
commit389a1652fbd6827e8641b5dafe132cd4b5e849f9 (patch)
tree2a6819465451bc900c37d60ee7731cc532902a4a /OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs
parentreview llCastRay V3 phantom detection. Make it ignore physics shape type none... (diff)
downloadopensim-SC-389a1652fbd6827e8641b5dafe132cd4b5e849f9.zip
opensim-SC-389a1652fbd6827e8641b5dafe132cd4b5e849f9.tar.gz
opensim-SC-389a1652fbd6827e8641b5dafe132cd4b5e849f9.tar.bz2
opensim-SC-389a1652fbd6827e8641b5dafe132cd4b5e849f9.tar.xz
break userprofiles a bit more
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs188
1 files changed, 113 insertions, 75 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs
index 1f7db64..57025bf 100644
--- a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs
@@ -161,7 +161,8 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
161 return; 161 return;
162 } 162 }
163 163
164 m_allowUserProfileWebURLs = profileConfig.GetBoolean("AllowUserProfileWebURLs", m_allowUserProfileWebURLs); 164 m_allowUserProfileWebURLs = profileConfig.GetBoolean("AllowUserProfileWebURLs", m_allowUserProfileWebURLs);
165
165 m_log.Debug("[PROFILES]: Full Profiles Enabled"); 166 m_log.Debug("[PROFILES]: Full Profiles Enabled");
166 ReplaceableInterface = null; 167 ReplaceableInterface = null;
167 Enabled = true; 168 Enabled = true;
@@ -318,37 +319,46 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
318 return; 319 return;
319 320
320 IClientAPI remoteClient = (IClientAPI)sender; 321 IClientAPI remoteClient = (IClientAPI)sender;
322 Dictionary<UUID, string> classifieds = new Dictionary<UUID, string>();
321 323
322 UUID targetID; 324 UUID targetID;
323 UUID.TryParse(args[0], out targetID); 325 if(!UUID.TryParse(args[0], out targetID) || targetID == UUID.Zero)
324 326 return;
325 327
326 ScenePresence p = FindPresence(targetID); 328 ScenePresence p = FindPresence(targetID);
327 if (p != null && p.isNPC) 329 if (p != null && p.isNPC)
328 { 330 {
329 remoteClient.SendAvatarClassifiedReply(new UUID(args[0]), new Dictionary<UUID, string>()); 331 remoteClient.SendAvatarClassifiedReply(targetID, classifieds);
330 return; 332 return;
331 } 333 }
332 334
333 string serverURI = string.Empty; 335 string serverURI = string.Empty;
334 GetUserProfileServerURI(targetID, out serverURI); 336 GetUserProfileServerURI(targetID, out serverURI);
335 UUID creatorId = UUID.Zero; 337 if(string.IsNullOrWhiteSpace(serverURI))
336 Dictionary<UUID, string> classifieds = new Dictionary<UUID, string>(); 338 {
339 remoteClient.SendAvatarClassifiedReply(targetID, classifieds);
340 return;
341 }
337 342
338 OSDMap parameters= new OSDMap(); 343 OSDMap parameters= new OSDMap();
339 UUID.TryParse(args[0], out creatorId); 344
340 parameters.Add("creatorId", OSD.FromUUID(creatorId)); 345 parameters.Add("creatorId", OSD.FromUUID(targetID));
341 OSD Params = (OSD)parameters; 346 OSD Params = (OSD)parameters;
342 if(!rpc.JsonRpcRequest(ref Params, "avatarclassifiedsrequest", serverURI, UUID.Random().ToString())) 347 if(!rpc.JsonRpcRequest(ref Params, "avatarclassifiedsrequest", serverURI, UUID.Random().ToString()))
343 { 348 {
344 remoteClient.SendAvatarClassifiedReply(new UUID(args[0]), classifieds); 349 remoteClient.SendAvatarClassifiedReply(targetID, classifieds);
345 return; 350 return;
346 } 351 }
347 352
348 parameters = (OSDMap)Params; 353 parameters = (OSDMap)Params;
349 354
350 OSDArray list = (OSDArray)parameters["result"]; 355 if(!parameters.ContainsKey("result") || parameters["result"] == null)
356 {
357 remoteClient.SendAvatarClassifiedReply(targetID, classifieds);
358 return;
359 }
351 360
361 OSDArray list = (OSDArray)parameters["result"];
352 362
353 foreach(OSD map in list) 363 foreach(OSD map in list)
354 { 364 {
@@ -362,7 +372,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
362 { 372 {
363 if (!m_classifiedCache.ContainsKey(cid)) 373 if (!m_classifiedCache.ContainsKey(cid))
364 { 374 {
365 m_classifiedCache.Add(cid,creatorId); 375 m_classifiedCache.Add(cid,targetID);
366 m_classifiedInterest.Add(cid, 0); 376 m_classifiedInterest.Add(cid, 0);
367 } 377 }
368 378
@@ -370,7 +380,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
370 } 380 }
371 } 381 }
372 382
373 remoteClient.SendAvatarClassifiedReply(new UUID(args[0]), classifieds); 383 remoteClient.SendAvatarClassifiedReply(targetID, classifieds);
374 } 384 }
375 385
376 public void ClassifiedInfoRequest(UUID queryClassifiedID, IClientAPI remoteClient) 386 public void ClassifiedInfoRequest(UUID queryClassifiedID, IClientAPI remoteClient)
@@ -397,6 +407,10 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
397 407
398 string serverURI = string.Empty; 408 string serverURI = string.Empty;
399 GetUserProfileServerURI(target, out serverURI); 409 GetUserProfileServerURI(target, out serverURI);
410 if(string.IsNullOrWhiteSpace(serverURI))
411 {
412 return;
413 }
400 414
401 object Ad = (object)ad; 415 object Ad = (object)ad;
402 if(!rpc.JsonRpcRequest(ref Ad, "classifieds_info_query", serverURI, UUID.Random().ToString())) 416 if(!rpc.JsonRpcRequest(ref Ad, "classifieds_info_query", serverURI, UUID.Random().ToString()))
@@ -467,6 +481,10 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
467 481
468 string serverURI = string.Empty; 482 string serverURI = string.Empty;
469 GetUserProfileServerURI(remoteClient.AgentId, out serverURI); 483 GetUserProfileServerURI(remoteClient.AgentId, out serverURI);
484 if(string.IsNullOrWhiteSpace(serverURI))
485 {
486 return;
487 }
470 488
471 OSDMap parameters = new OSDMap {{"creatorId", OSD.FromUUID(creatorId)}}; 489 OSDMap parameters = new OSDMap {{"creatorId", OSD.FromUUID(creatorId)}};
472 OSD Params = (OSD)parameters; 490 OSD Params = (OSD)parameters;
@@ -533,10 +551,14 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
533 { 551 {
534 string serverURI = string.Empty; 552 string serverURI = string.Empty;
535 GetUserProfileServerURI(remoteClient.AgentId, out serverURI); 553 GetUserProfileServerURI(remoteClient.AgentId, out serverURI);
554 if(string.IsNullOrWhiteSpace(serverURI))
555 return;
536 556
537 UUID classifiedId; 557 UUID classifiedId;
558 if(!UUID.TryParse(queryClassifiedID.ToString(), out classifiedId))
559 return;
560
538 OSDMap parameters= new OSDMap(); 561 OSDMap parameters= new OSDMap();
539 UUID.TryParse(queryClassifiedID.ToString(), out classifiedId);
540 parameters.Add("classifiedId", OSD.FromUUID(classifiedId)); 562 parameters.Add("classifiedId", OSD.FromUUID(classifiedId));
541 OSD Params = (OSD)parameters; 563 OSD Params = (OSD)parameters;
542 if(!rpc.JsonRpcRequest(ref Params, "classified_delete", serverURI, UUID.Random().ToString())) 564 if(!rpc.JsonRpcRequest(ref Params, "classified_delete", serverURI, UUID.Random().ToString()))
@@ -571,33 +593,41 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
571 IClientAPI remoteClient = (IClientAPI)sender; 593 IClientAPI remoteClient = (IClientAPI)sender;
572 594
573 UUID targetId; 595 UUID targetId;
574 UUID.TryParse(args[0], out targetId); 596 if(!UUID.TryParse(args[0], out targetId))
597 return;
575 598
576 // Can't handle NPC yet... 599 Dictionary<UUID, string> picks = new Dictionary<UUID, string>();
577 ScenePresence p = FindPresence(targetId);
578 600
601 ScenePresence p = FindPresence(targetId);
579 if (p != null && p.isNPC) 602 if (p != null && p.isNPC)
580 { 603 {
581 remoteClient.SendAvatarPicksReply(new UUID(args[0]), new Dictionary<UUID, string>()); 604 remoteClient.SendAvatarPicksReply(targetId, picks);
582 return; 605 return;
583 } 606 }
584 607
585 string serverURI = string.Empty; 608 string serverURI = string.Empty;
586 GetUserProfileServerURI(targetId, out serverURI); 609 GetUserProfileServerURI(targetId, out serverURI);
587 610 if(string.IsNullOrWhiteSpace(serverURI))
588 Dictionary<UUID, string> picks = new Dictionary<UUID, string>(); 611 {
612 remoteClient.SendAvatarPicksReply(targetId, picks);
613 return;
614 }
589 615
590 OSDMap parameters= new OSDMap(); 616 OSDMap parameters= new OSDMap();
591 parameters.Add("creatorId", OSD.FromUUID(targetId)); 617 parameters.Add("creatorId", OSD.FromUUID(targetId));
592 OSD Params = (OSD)parameters; 618 OSD Params = (OSD)parameters;
593 if(!rpc.JsonRpcRequest(ref Params, "avatarpicksrequest", serverURI, UUID.Random().ToString())) 619 if(!rpc.JsonRpcRequest(ref Params, "avatarpicksrequest", serverURI, UUID.Random().ToString()))
594 { 620 {
595 remoteClient.SendAvatarPicksReply(new UUID(args[0]), picks); 621 remoteClient.SendAvatarPicksReply(targetId, picks);
596 return; 622 return;
597 } 623 }
598 624
599 parameters = (OSDMap)Params; 625 parameters = (OSDMap)Params;
600 626 if(!parameters.ContainsKey("result") || parameters["result"] == null)
627 {
628 remoteClient.SendAvatarPicksReply(targetId, picks);
629 return;
630 }
601 OSDArray list = (OSDArray)parameters["result"]; 631 OSDArray list = (OSDArray)parameters["result"];
602 632
603 foreach(OSD map in list) 633 foreach(OSD map in list)
@@ -605,12 +635,9 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
605 OSDMap m = (OSDMap)map; 635 OSDMap m = (OSDMap)map;
606 UUID cid = m["pickuuid"].AsUUID(); 636 UUID cid = m["pickuuid"].AsUUID();
607 string name = m["name"].AsString(); 637 string name = m["name"].AsString();
608
609 m_log.DebugFormat("[PROFILES]: PicksRequest {0}", name);
610
611 picks[cid] = name; 638 picks[cid] = name;
612 } 639 }
613 remoteClient.SendAvatarPicksReply(new UUID(args[0]), picks); 640 remoteClient.SendAvatarPicksReply(targetId, picks);
614 } 641 }
615 642
616 /// <summary> 643 /// <summary>
@@ -630,20 +657,27 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
630 if (!(sender is IClientAPI)) 657 if (!(sender is IClientAPI))
631 return; 658 return;
632 659
660 UserProfilePick pick = new UserProfilePick ();
633 UUID targetID; 661 UUID targetID;
634 UUID.TryParse (args [0], out targetID); 662 if(!UUID.TryParse(args [0], out targetID))
663 return;
664
665 pick.CreatorId = targetID;
666
667 if(!UUID.TryParse (args [1], out pick.PickId))
668 return;
669
635 string serverURI = string.Empty; 670 string serverURI = string.Empty;
636 GetUserProfileServerURI (targetID, out serverURI); 671 GetUserProfileServerURI (targetID, out serverURI);
672 if(string.IsNullOrWhiteSpace(serverURI))
673 {
674 return;
675 }
637 676
638 string theirGatekeeperURI; 677 string theirGatekeeperURI;
639 GetUserGatekeeperURI (targetID, out theirGatekeeperURI); 678 GetUserGatekeeperURI(targetID, out theirGatekeeperURI);
640 679
641 IClientAPI remoteClient = (IClientAPI)sender; 680 IClientAPI remoteClient = (IClientAPI)sender;
642
643 UserProfilePick pick = new UserProfilePick ();
644 UUID.TryParse (args [0], out pick.CreatorId);
645 UUID.TryParse (args [1], out pick.PickId);
646
647 681
648 object Pick = (object)pick; 682 object Pick = (object)pick;
649 if (!rpc.JsonRpcRequest (ref Pick, "pickinforequest", serverURI, UUID.Random ().ToString ())) { 683 if (!rpc.JsonRpcRequest (ref Pick, "pickinforequest", serverURI, UUID.Random ().ToString ())) {
@@ -654,13 +688,9 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
654 pick = (UserProfilePick)Pick; 688 pick = (UserProfilePick)Pick;
655 689
656 Vector3 globalPos = new Vector3(Vector3.Zero); 690 Vector3 globalPos = new Vector3(Vector3.Zero);
691 Vector3.TryParse(pick.GlobalPos, out globalPos);
657 692
658 // Smoke and mirrors 693 if (!string.IsNullOrWhiteSpace(MyGatekeeper) && pick.Gatekeeper != MyGatekeeper)
659 if (pick.Gatekeeper == MyGatekeeper)
660 {
661 Vector3.TryParse(pick.GlobalPos,out globalPos);
662 }
663 else
664 { 694 {
665 // Setup the illusion 695 // Setup the illusion
666 string region = string.Format("{0} {1}",pick.Gatekeeper,pick.SimName); 696 string region = string.Format("{0} {1}",pick.Gatekeeper,pick.SimName);
@@ -668,21 +698,19 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
668 698
669 if(target == null) 699 if(target == null)
670 { 700 {
671 // This is a dead or unreachable region 701 // This is a unreachable region
672 } 702 }
673 else 703 else
674 { 704 {
675 // Work our slight of hand 705 // we have a proxy on map
676 int x = target.RegionLocX; 706 // this is a fail on large regions
677 int y = target.RegionLocY; 707 uint gtmp = (uint)globalPos.X >> 8;
678 708 globalPos.X -= (gtmp << 8);
679 dynamic synthX = globalPos.X - (globalPos.X/Constants.RegionSize) * Constants.RegionSize; 709 globalPos.X += target.RegionLocX;
680 synthX += x; 710
681 globalPos.X = synthX; 711 gtmp = (uint)globalPos.Y >> 8;
682 712 globalPos.Y -= (gtmp << 8);
683 dynamic synthY = globalPos.Y - (globalPos.Y/Constants.RegionSize) * Constants.RegionSize; 713 globalPos.Y += target.RegionLocY;
684 synthY += y;
685 globalPos.Y = synthY;
686 } 714 }
687 } 715 }
688 716
@@ -732,6 +760,11 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
732 UserProfilePick pick = new UserProfilePick(); 760 UserProfilePick pick = new UserProfilePick();
733 string serverURI = string.Empty; 761 string serverURI = string.Empty;
734 GetUserProfileServerURI(remoteClient.AgentId, out serverURI); 762 GetUserProfileServerURI(remoteClient.AgentId, out serverURI);
763 if(string.IsNullOrWhiteSpace(serverURI))
764 {
765 return;
766 }
767
735 ScenePresence p = FindPresence(remoteClient.AgentId); 768 ScenePresence p = FindPresence(remoteClient.AgentId);
736 769
737 Vector3 avaPos = p.AbsolutePosition; 770 Vector3 avaPos = p.AbsolutePosition;
@@ -797,6 +830,10 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
797 { 830 {
798 string serverURI = string.Empty; 831 string serverURI = string.Empty;
799 GetUserProfileServerURI(remoteClient.AgentId, out serverURI); 832 GetUserProfileServerURI(remoteClient.AgentId, out serverURI);
833 if(string.IsNullOrWhiteSpace(serverURI))
834 {
835 return;
836 }
800 837
801 OSDMap parameters= new OSDMap(); 838 OSDMap parameters= new OSDMap();
802 parameters.Add("pickId", OSD.FromUUID(queryPickID)); 839 parameters.Add("pickId", OSD.FromUUID(queryPickID));
@@ -830,11 +867,19 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
830 if (!(sender is IClientAPI)) 867 if (!(sender is IClientAPI))
831 return; 868 return;
832 869
870 if(!UUID.TryParse(args[0], out note.TargetId))
871 return;
872
833 IClientAPI remoteClient = (IClientAPI)sender; 873 IClientAPI remoteClient = (IClientAPI)sender;
874 note.UserId = remoteClient.AgentId;
875
834 string serverURI = string.Empty; 876 string serverURI = string.Empty;
835 GetUserProfileServerURI(remoteClient.AgentId, out serverURI); 877 GetUserProfileServerURI(remoteClient.AgentId, out serverURI);
836 note.UserId = remoteClient.AgentId; 878 if(string.IsNullOrWhiteSpace(serverURI))
837 UUID.TryParse(args[0], out note.TargetId); 879 {
880 remoteClient.SendAvatarNotesReply(note.TargetId, note.Notes);
881 return;
882 }
838 883
839 object Note = (object)note; 884 object Note = (object)note;
840 if(!rpc.JsonRpcRequest(ref Note, "avatarnotesrequest", serverURI, UUID.Random().ToString())) 885 if(!rpc.JsonRpcRequest(ref Note, "avatarnotesrequest", serverURI, UUID.Random().ToString()))
@@ -842,8 +887,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
842 remoteClient.SendAvatarNotesReply(note.TargetId, note.Notes); 887 remoteClient.SendAvatarNotesReply(note.TargetId, note.Notes);
843 return; 888 return;
844 } 889 }
845 note = (UserProfileNotes) Note; 890 note = (UserProfileNotes) Note;
846
847 remoteClient.SendAvatarNotesReply(note.TargetId, note.Notes); 891 remoteClient.SendAvatarNotesReply(note.TargetId, note.Notes);
848 } 892 }
849 893
@@ -877,6 +921,8 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
877 921
878 string serverURI = string.Empty; 922 string serverURI = string.Empty;
879 GetUserProfileServerURI(remoteClient.AgentId, out serverURI); 923 GetUserProfileServerURI(remoteClient.AgentId, out serverURI);
924 if(string.IsNullOrWhiteSpace(serverURI))
925 return;
880 926
881 object Note = note; 927 object Note = note;
882 if(!rpc.JsonRpcRequest(ref Note, "avatar_notes_update", serverURI, UUID.Random().ToString())) 928 if(!rpc.JsonRpcRequest(ref Note, "avatar_notes_update", serverURI, UUID.Random().ToString()))
@@ -912,6 +958,8 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
912 958
913 string serverURI = string.Empty; 959 string serverURI = string.Empty;
914 bool foreign = GetUserProfileServerURI(remoteClient.AgentId, out serverURI); 960 bool foreign = GetUserProfileServerURI(remoteClient.AgentId, out serverURI);
961 if(string.IsNullOrWhiteSpace(serverURI))
962 return;
915 963
916 object Pref = pref; 964 object Pref = pref;
917 if(!rpc.JsonRpcRequest(ref Pref, "user_preferences_update", serverURI, UUID.Random().ToString())) 965 if(!rpc.JsonRpcRequest(ref Pref, "user_preferences_update", serverURI, UUID.Random().ToString()))
@@ -936,7 +984,8 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
936 984
937 string serverURI = string.Empty; 985 string serverURI = string.Empty;
938 bool foreign = GetUserProfileServerURI(remoteClient.AgentId, out serverURI); 986 bool foreign = GetUserProfileServerURI(remoteClient.AgentId, out serverURI);
939 987 if(string.IsNullOrWhiteSpace(serverURI))
988 return;
940 989
941 object Pref = (object)pref; 990 object Pref = (object)pref;
942 if(!rpc.JsonRpcRequest(ref Pref, "user_preferences_request", serverURI, UUID.Random().ToString())) 991 if(!rpc.JsonRpcRequest(ref Pref, "user_preferences_request", serverURI, UUID.Random().ToString()))
@@ -987,6 +1036,8 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
987 1036
988 string serverURI = string.Empty; 1037 string serverURI = string.Empty;
989 GetUserProfileServerURI(remoteClient.AgentId, out serverURI); 1038 GetUserProfileServerURI(remoteClient.AgentId, out serverURI);
1039 if(string.IsNullOrWhiteSpace(serverURI))
1040 return;
990 1041
991 object Param = prop; 1042 object Param = prop;
992 if(!rpc.JsonRpcRequest(ref Param, "avatar_interests_update", serverURI, UUID.Random().ToString())) 1043 if(!rpc.JsonRpcRequest(ref Param, "avatar_interests_update", serverURI, UUID.Random().ToString()))
@@ -1006,9 +1057,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
1006 return; 1057 return;
1007 } 1058 }
1008 1059
1009 // Can't handle NPC yet...
1010 ScenePresence p = FindPresence(avatarID); 1060 ScenePresence p = FindPresence(avatarID);
1011
1012 if (p != null && p.isNPC) 1061 if (p != null && p.isNPC)
1013 { 1062 {
1014 remoteClient.SendAvatarProperties(avatarID, ((INPC)(p.ControllingClient)).profileAbout, ((INPC)(p.ControllingClient)).Born, 1063 remoteClient.SendAvatarProperties(avatarID, ((INPC)(p.ControllingClient)).profileAbout, ((INPC)(p.ControllingClient)).Born,
@@ -1035,19 +1084,15 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
1035 } 1084 }
1036 1085
1037 Byte[] membershipType = new Byte[1]; 1086 Byte[] membershipType = new Byte[1];
1038 string born = String.Empty; 1087 string born = string.Empty;
1039 uint flags = 0x00; 1088 uint flags = 0x00;
1040 1089
1041 if (null != account) 1090 if (null != account)
1042 { 1091 {
1043 if (account.UserTitle == "") 1092 if (account.UserTitle == "")
1044 {
1045 membershipType[0] = (Byte)((account.UserFlags & 0xf00) >> 8); 1093 membershipType[0] = (Byte)((account.UserFlags & 0xf00) >> 8);
1046 }
1047 else 1094 else
1048 {
1049 membershipType = Utils.StringToBytes(account.UserTitle); 1095 membershipType = Utils.StringToBytes(account.UserTitle);
1050 }
1051 1096
1052 born = Util.ToDateTime(account.Created).ToString( 1097 born = Util.ToDateTime(account.Created).ToString(
1053 "M/d/yyyy", CultureInfo.InvariantCulture); 1098 "M/d/yyyy", CultureInfo.InvariantCulture);
@@ -1058,16 +1103,13 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
1058 if (GetUserAccountData(avatarID, out userInfo) == true) 1103 if (GetUserAccountData(avatarID, out userInfo) == true)
1059 { 1104 {
1060 if ((string)userInfo["user_title"] == "") 1105 if ((string)userInfo["user_title"] == "")
1061 {
1062 membershipType[0] = (Byte)(((Byte)userInfo["user_flags"] & 0xf00) >> 8); 1106 membershipType[0] = (Byte)(((Byte)userInfo["user_flags"] & 0xf00) >> 8);
1063 }
1064 else 1107 else
1065 {
1066 membershipType = Utils.StringToBytes((string)userInfo["user_title"]); 1108 membershipType = Utils.StringToBytes((string)userInfo["user_title"]);
1067 }
1068 1109
1069 int val_born = (int)userInfo["user_created"]; 1110 int val_born = (int)userInfo["user_created"];
1070 born = Util.ToDateTime(val_born).ToString( 1111 if(val_born != 0)
1112 born = Util.ToDateTime(val_born).ToString(
1071 "M/d/yyyy", CultureInfo.InvariantCulture); 1113 "M/d/yyyy", CultureInfo.InvariantCulture);
1072 1114
1073 // picky, picky 1115 // picky, picky
@@ -1077,20 +1119,17 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
1077 } 1119 }
1078 1120
1079 UserProfileProperties props = new UserProfileProperties(); 1121 UserProfileProperties props = new UserProfileProperties();
1080 string result = string.Empty;
1081
1082 props.UserId = avatarID; 1122 props.UserId = avatarID;
1083 1123
1084 if (!GetProfileData(ref props, foreign, out result)) 1124 string result = string.Empty;
1125 if(!GetProfileData(ref props, foreign, out result))
1085 { 1126 {
1086// m_log.DebugFormat("Error getting profile for {0}: {1}", avatarID, result); 1127 props.AboutText ="Profile not avaible at this time. User may still be unknown to this grid";
1087 return;
1088 } 1128 }
1089 1129
1090 // if on same region force online 1130 // if on same region force online
1091 if(p != null && !p.IsDeleted) 1131 if(p != null && !p.IsDeleted)
1092 flags |= 0x10; 1132 flags |= 0x10;
1093
1094 1133
1095 if(!m_allowUserProfileWebURLs) 1134 if(!m_allowUserProfileWebURLs)
1096 props.WebUrl =""; 1135 props.WebUrl ="";
@@ -1166,12 +1205,11 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
1166 1205
1167 string serverURI = string.Empty; 1206 string serverURI = string.Empty;
1168 GetUserProfileServerURI(properties.UserId, out serverURI); 1207 GetUserProfileServerURI(properties.UserId, out serverURI);
1169
1170 // This is checking a friend on the home grid 1208 // This is checking a friend on the home grid
1171 // Not HG friend 1209 // Not HG friend
1172 if (String.IsNullOrEmpty(serverURI)) 1210 if (String.IsNullOrEmpty(serverURI))
1173 { 1211 {
1174 message = "No Presence - foreign friend"; 1212 message = "User profile service unknown at this time";
1175 return false; 1213 return false;
1176 } 1214 }
1177 1215