aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs33
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs28
-rw-r--r--OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs4
3 files changed, 42 insertions, 23 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs
index 61835f9..5be8556 100644
--- a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs
@@ -320,13 +320,12 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
320 UUID targetID; 320 UUID targetID;
321 UUID.TryParse(args[0], out targetID); 321 UUID.TryParse(args[0], out targetID);
322 322
323 // Can't handle NPC yet...
324 ScenePresence p = FindPresence(targetID);
325 323
326 if (null != p) 324 ScenePresence p = FindPresence(targetID);
325 if (p != null && p.isNPC)
327 { 326 {
328 if (p.PresenceType == PresenceType.Npc) 327 remoteClient.SendAvatarClassifiedReply(new UUID(args[0]), new Dictionary<UUID, string>());
329 return; 328 return;
330 } 329 }
331 330
332 string serverURI = string.Empty; 331 string serverURI = string.Empty;
@@ -575,10 +574,10 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
575 // Can't handle NPC yet... 574 // Can't handle NPC yet...
576 ScenePresence p = FindPresence(targetId); 575 ScenePresence p = FindPresence(targetId);
577 576
578 if (null != p) 577 if (p != null && p.isNPC)
579 { 578 {
580 if (p.PresenceType == PresenceType.Npc) 579 remoteClient.SendAvatarPicksReply(new UUID(args[0]), new Dictionary<UUID, string>());
581 return; 580 return;
582 } 581 }
583 582
584 string serverURI = string.Empty; 583 string serverURI = string.Empty;
@@ -860,6 +859,14 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
860 /// </param> 859 /// </param>
861 public void NotesUpdate(IClientAPI remoteClient, UUID queryTargetID, string queryNotes) 860 public void NotesUpdate(IClientAPI remoteClient, UUID queryTargetID, string queryNotes)
862 { 861 {
862 ScenePresence p = FindPresence(queryTargetID);
863 if (p != null && p.isNPC)
864 {
865 remoteClient.SendAgentAlertMessage(
866 "Notes for NPCs not available", false);
867 return;
868 }
869
863 UserProfileNotes note = new UserProfileNotes(); 870 UserProfileNotes note = new UserProfileNotes();
864 871
865 note.UserId = remoteClient.AgentId; 872 note.UserId = remoteClient.AgentId;
@@ -1000,10 +1007,14 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
1000 // Can't handle NPC yet... 1007 // Can't handle NPC yet...
1001 ScenePresence p = FindPresence(avatarID); 1008 ScenePresence p = FindPresence(avatarID);
1002 1009
1003 if (null != p) 1010 if (p != null && p.isNPC)
1004 { 1011 {
1005 if (p.PresenceType == PresenceType.Npc) 1012 remoteClient.SendAvatarProperties(avatarID, ((INPC)(p.ControllingClient)).profileAbout, "5/25/1977",
1006 return; 1013 Utils.StringToBytes("Non Player Character (NPC)"), "NPCs have no life", 16,
1014 UUID.Zero, UUID.Zero, "", UUID.Zero);
1015 remoteClient.SendAvatarInterestsReply(avatarID, 0, "",
1016 0, "Getting into trouble", "Droidspeak");
1017 return;
1007 } 1018 }
1008 1019
1009 string serverURI = string.Empty; 1020 string serverURI = string.Empty;
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index a7105e2..ad094b4 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -776,6 +776,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
776 else if (sp.Flying) 776 else if (sp.Flying)
777 teleportFlags |= (uint)TeleportFlags.IsFlying; 777 teleportFlags |= (uint)TeleportFlags.IsFlying;
778 778
779 sp.IsInTransit = true;
780
779 if (DisableInterRegionTeleportCancellation) 781 if (DisableInterRegionTeleportCancellation)
780 teleportFlags |= (uint)TeleportFlags.DisableCancel; 782 teleportFlags |= (uint)TeleportFlags.DisableCancel;
781 783
@@ -878,7 +880,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
878 sp.Name, sp.Scene.RegionInfo.RegionName, finalDestination.RegionName, reason); 880 sp.Name, sp.Scene.RegionInfo.RegionName, finalDestination.RegionName, reason);
879 881
880 sp.ControllingClient.SendTeleportFailed(reason); 882 sp.ControllingClient.SendTeleportFailed(reason);
881 883 sp.IsInTransit = false;
882 return; 884 return;
883 } 885 }
884 886
@@ -889,7 +891,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
889 m_log.DebugFormat( 891 m_log.DebugFormat(
890 "[ENTITY TRANSFER MODULE]: Cancelled teleport of {0} to {1} from {2} after CreateAgent on client request", 892 "[ENTITY TRANSFER MODULE]: Cancelled teleport of {0} to {1} from {2} after CreateAgent on client request",
891 sp.Name, finalDestination.RegionName, sp.Scene.Name); 893 sp.Name, finalDestination.RegionName, sp.Scene.Name);
892 894 sp.IsInTransit = false;
893 return; 895 return;
894 } 896 }
895 else if (m_entityTransferStateMachine.GetAgentTransferState(sp.UUID) == AgentTransferState.Aborting) 897 else if (m_entityTransferStateMachine.GetAgentTransferState(sp.UUID) == AgentTransferState.Aborting)
@@ -899,7 +901,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
899 m_log.DebugFormat( 901 m_log.DebugFormat(
900 "[ENTITY TRANSFER MODULE]: Aborted teleport of {0} to {1} from {2} after CreateAgent due to previous client close.", 902 "[ENTITY TRANSFER MODULE]: Aborted teleport of {0} to {1} from {2} after CreateAgent due to previous client close.",
901 sp.Name, finalDestination.RegionName, sp.Scene.Name); 903 sp.Name, finalDestination.RegionName, sp.Scene.Name);
902 904 sp.IsInTransit = false;
903 return; 905 return;
904 } 906 }
905 907
@@ -960,7 +962,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
960 m_log.DebugFormat( 962 m_log.DebugFormat(
961 "[ENTITY TRANSFER MODULE]: Aborted teleport of {0} to {1} from {2} before UpdateAgent", 963 "[ENTITY TRANSFER MODULE]: Aborted teleport of {0} to {1} from {2} before UpdateAgent",
962 sp.Name, finalDestination.RegionName, sp.Scene.Name); 964 sp.Name, finalDestination.RegionName, sp.Scene.Name);
963 965 sp.IsInTransit = false;
964 return; 966 return;
965 } 967 }
966 968
@@ -977,7 +979,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
977 m_log.DebugFormat( 979 m_log.DebugFormat(
978 "[ENTITY TRANSFER MODULE]: Aborted teleport of {0} to {1} from {2} after UpdateAgent due to previous client close.", 980 "[ENTITY TRANSFER MODULE]: Aborted teleport of {0} to {1} from {2} after UpdateAgent due to previous client close.",
979 sp.Name, finalDestination.RegionName, sp.Scene.Name); 981 sp.Name, finalDestination.RegionName, sp.Scene.Name);
980 982 sp.IsInTransit = false;
981 return; 983 return;
982 } 984 }
983 985
@@ -986,6 +988,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
986 sp.Name, finalDestination.RegionName, sp.Scene.Name); 988 sp.Name, finalDestination.RegionName, sp.Scene.Name);
987 989
988 Fail(sp, finalDestination, logout, currentAgentCircuit.SessionID.ToString(), "Connection between viewer and destination region could not be established."); 990 Fail(sp, finalDestination, logout, currentAgentCircuit.SessionID.ToString(), "Connection between viewer and destination region could not be established.");
991 sp.IsInTransit = false;
989 return; 992 return;
990 } 993 }
991 994
@@ -998,7 +1001,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
998 sp.Name, finalDestination.RegionName, sp.Scene.Name); 1001 sp.Name, finalDestination.RegionName, sp.Scene.Name);
999 1002
1000 CleanupFailedInterRegionTeleport(sp, currentAgentCircuit.SessionID.ToString(), finalDestination); 1003 CleanupFailedInterRegionTeleport(sp, currentAgentCircuit.SessionID.ToString(), finalDestination);
1001 1004 sp.IsInTransit = false;
1002 return; 1005 return;
1003 } 1006 }
1004 1007
@@ -1035,7 +1038,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1035 m_log.DebugFormat( 1038 m_log.DebugFormat(
1036 "[ENTITY TRANSFER MODULE]: Aborted teleport of {0} to {1} from {2} after WaitForAgentArrivedAtDestination due to previous client close.", 1039 "[ENTITY TRANSFER MODULE]: Aborted teleport of {0} to {1} from {2} after WaitForAgentArrivedAtDestination due to previous client close.",
1037 sp.Name, finalDestination.RegionName, sp.Scene.Name); 1040 sp.Name, finalDestination.RegionName, sp.Scene.Name);
1038 1041 sp.IsInTransit = false;
1039 return; 1042 return;
1040 } 1043 }
1041 1044
@@ -1044,7 +1047,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1044 sp.Name, finalDestination.RegionName, sp.Scene.RegionInfo.RegionName); 1047 sp.Name, finalDestination.RegionName, sp.Scene.RegionInfo.RegionName);
1045 1048
1046 Fail(sp, finalDestination, logout, currentAgentCircuit.SessionID.ToString(), "Destination region did not signal teleport completion."); 1049 Fail(sp, finalDestination, logout, currentAgentCircuit.SessionID.ToString(), "Destination region did not signal teleport completion.");
1047 1050 sp.IsInTransit = false;
1048 return; 1051 return;
1049 } 1052 }
1050 1053
@@ -1093,6 +1096,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1093 Thread.Sleep(500); 1096 Thread.Sleep(500);
1094 sp.Scene.CloseAgent(sp.UUID, false); 1097 sp.Scene.CloseAgent(sp.UUID, false);
1095 } 1098 }
1099 sp.IsInTransit = false;
1096 } 1100 }
1097 1101
1098 private void TransferAgent_V2(ScenePresence sp, AgentCircuitData agentCircuit, GridRegion reg, GridRegion finalDestination, 1102 private void TransferAgent_V2(ScenePresence sp, AgentCircuitData agentCircuit, GridRegion reg, GridRegion finalDestination,
@@ -1115,7 +1119,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1115 sp.Name, sp.Scene.RegionInfo.RegionName, finalDestination.RegionName, reason); 1119 sp.Name, sp.Scene.RegionInfo.RegionName, finalDestination.RegionName, reason);
1116 1120
1117 sp.ControllingClient.SendTeleportFailed(reason); 1121 sp.ControllingClient.SendTeleportFailed(reason);
1118 1122 sp.IsInTransit = false;
1119 return; 1123 return;
1120 } 1124 }
1121 1125
@@ -1127,6 +1131,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1127 "[ENTITY TRANSFER MODULE]: Cancelled teleport of {0} to {1} from {2} after CreateAgent on client request", 1131 "[ENTITY TRANSFER MODULE]: Cancelled teleport of {0} to {1} from {2} after CreateAgent on client request",
1128 sp.Name, finalDestination.RegionName, sp.Scene.Name); 1132 sp.Name, finalDestination.RegionName, sp.Scene.Name);
1129 1133
1134 sp.IsInTransit = false;
1130 return; 1135 return;
1131 } 1136 }
1132 else if (m_entityTransferStateMachine.GetAgentTransferState(sp.UUID) == AgentTransferState.Aborting) 1137 else if (m_entityTransferStateMachine.GetAgentTransferState(sp.UUID) == AgentTransferState.Aborting)
@@ -1137,6 +1142,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1137 "[ENTITY TRANSFER MODULE]: Aborted teleport of {0} to {1} from {2} after CreateAgent due to previous client close.", 1142 "[ENTITY TRANSFER MODULE]: Aborted teleport of {0} to {1} from {2} after CreateAgent due to previous client close.",
1138 sp.Name, finalDestination.RegionName, sp.Scene.Name); 1143 sp.Name, finalDestination.RegionName, sp.Scene.Name);
1139 1144
1145 sp.IsInTransit = false;
1140 return; 1146 return;
1141 } 1147 }
1142 1148
@@ -1189,7 +1195,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1189 m_log.DebugFormat( 1195 m_log.DebugFormat(
1190 "[ENTITY TRANSFER MODULE]: Aborted teleport of {0} to {1} from {2} after UpdateAgent due to previous client close.", 1196 "[ENTITY TRANSFER MODULE]: Aborted teleport of {0} to {1} from {2} after UpdateAgent due to previous client close.",
1191 sp.Name, finalDestination.RegionName, sp.Scene.Name); 1197 sp.Name, finalDestination.RegionName, sp.Scene.Name);
1192 1198 sp.IsInTransit = false;
1193 return; 1199 return;
1194 } 1200 }
1195 1201
@@ -1198,6 +1204,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1198 sp.Name, finalDestination.RegionName, sp.Scene.Name); 1204 sp.Name, finalDestination.RegionName, sp.Scene.Name);
1199 1205
1200 Fail(sp, finalDestination, logout, currentAgentCircuit.SessionID.ToString(), "Connection between viewer and destination region could not be established."); 1206 Fail(sp, finalDestination, logout, currentAgentCircuit.SessionID.ToString(), "Connection between viewer and destination region could not be established.");
1207 sp.IsInTransit = false;
1201 return; 1208 return;
1202 } 1209 }
1203 1210
@@ -1255,6 +1262,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1255 sp.Reset(); 1262 sp.Reset();
1256 } 1263 }
1257 */ 1264 */
1265 sp.IsInTransit = false;
1258 } 1266 }
1259 1267
1260 /// <summary> 1268 /// <summary>
diff --git a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs
index 5507526..2701912 100644
--- a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs
@@ -805,7 +805,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
805 return !userdata.IsUnknownUser; 805 return !userdata.IsUnknownUser;
806 } 806 }
807 807
808 public virtual void AddUser(UUID uuid, string first, string last) 808 public virtual void AddUser(UUID uuid, string first, string last, bool isNPC = false)
809 { 809 {
810 lock(m_UserCache) 810 lock(m_UserCache)
811 { 811 {
@@ -816,7 +816,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
816 user.FirstName = first; 816 user.FirstName = first;
817 user.LastName = last; 817 user.LastName = last;
818 user.IsUnknownUser = false; 818 user.IsUnknownUser = false;
819 user.HasGridUserTried = false; 819 user.HasGridUserTried = isNPC;
820 m_UserCache.Add(uuid, user); 820 m_UserCache.Add(uuid, user);
821 } 821 }
822 } 822 }