aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups')
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs44
1 files changed, 22 insertions, 22 deletions
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
index 8d32e66..68e6497 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
@@ -43,6 +43,8 @@ using OpenSim.Region.CoreModules.Framework.EventQueue;
43using OpenSim.Region.Framework.Interfaces; 43using OpenSim.Region.Framework.Interfaces;
44using OpenSim.Region.Framework.Scenes; 44using OpenSim.Region.Framework.Scenes;
45 45
46using OpenSim.Services.Interfaces;
47
46using Caps = OpenSim.Framework.Capabilities.Caps; 48using Caps = OpenSim.Framework.Capabilities.Caps;
47using DirFindFlags = OpenMetaverse.DirectoryManager.DirFindFlags; 49using DirFindFlags = OpenMetaverse.DirectoryManager.DirFindFlags;
48 50
@@ -507,10 +509,10 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
507 { 509 {
508 if (m_debugEnabled) 510 if (m_debugEnabled)
509 { 511 {
510 UserProfileData targetUserProfile = m_sceneList[0].CommsManager.UserService.GetUserProfile(member.AgentID); 512 UserAccount targetUser = m_sceneList[0].UserAccountService.GetUserAccount(remoteClient.Scene.RegionInfo.ScopeID, member.AgentID);
511 if (targetUserProfile != null) 513 if (targetUser != null)
512 { 514 {
513 m_log.DebugFormat("[GROUPS]: Prepping group notice {0} for agent: {1} who Accepts Notices ({2})", NoticeID, targetUserProfile.Name, member.AcceptNotices); 515 m_log.DebugFormat("[GROUPS]: Prepping group notice {0} for agent: {1} who Accepts Notices ({2})", NoticeID, targetUser.FirstName + " " + targetUser.LastName, member.AcceptNotices);
514 } 516 }
515 else 517 else
516 { 518 {
@@ -990,9 +992,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
990 remoteClient.SendEjectGroupMemberReply(remoteClient.AgentId, groupID, true); 992 remoteClient.SendEjectGroupMemberReply(remoteClient.AgentId, groupID, true);
991 993
992 GroupRecord groupInfo = m_groupData.GetGroupRecord(grID, groupID, null); 994 GroupRecord groupInfo = m_groupData.GetGroupRecord(grID, groupID, null);
993 UserProfileData userProfile = m_sceneList[0].CommsManager.UserService.GetUserProfile(ejecteeID); 995 UserAccount account = m_sceneList[0].UserAccountService.GetUserAccount(remoteClient.Scene.RegionInfo.ScopeID, ejecteeID);
994 996 if ((groupInfo == null) || (account == null))
995 if ((groupInfo == null) || (userProfile == null))
996 { 997 {
997 return; 998 return;
998 } 999 }
@@ -1032,9 +1033,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
1032 msg.toAgentID = remoteClient.AgentId.Guid; 1033 msg.toAgentID = remoteClient.AgentId.Guid;
1033 msg.timestamp = 0; 1034 msg.timestamp = 0;
1034 msg.fromAgentName = remoteClient.Name; 1035 msg.fromAgentName = remoteClient.Name;
1035 if (userProfile != null) 1036 if (account != null)
1036 { 1037 {
1037 msg.message = string.Format("{2} has been ejected from '{1}' by {0}.", remoteClient.Name, groupInfo.GroupName, userProfile.Name); 1038 msg.message = string.Format("{2} has been ejected from '{1}' by {0}.", remoteClient.Name, groupInfo.GroupName, account.FirstName + " " + account.LastName);
1038 } 1039 }
1039 else 1040 else
1040 { 1041 {
@@ -1147,8 +1148,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
1147 info.RequestID.AgentID = client.AgentId; 1148 info.RequestID.AgentID = client.AgentId;
1148 info.RequestID.SessionID = client.SessionId; 1149 info.RequestID.SessionID = client.SessionId;
1149 1150
1150 UserProfileData userProfile = m_sceneList[0].CommsManager.UserService.GetUserProfile(client.AgentId); 1151 //UserProfileData userProfile = m_sceneList[0].CommsManager.UserService.GetUserProfile(client.AgentId);
1151 if (userProfile == null) 1152 UserAccount account = m_sceneList[0].UserAccountService.GetUserAccount(client.Scene.RegionInfo.ScopeID, client.AgentId);
1153 if (account == null)
1152 { 1154 {
1153 // This should be impossible. If I've been passed a reference to a client 1155 // This should be impossible. If I've been passed a reference to a client
1154 // that client should be registered with the UserService. So something 1156 // that client should be registered with the UserService. So something
@@ -1157,19 +1159,17 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
1157 m_log.WarnFormat("[GROUPS]: Could not find a user profile for {0} / {1}", client.Name, client.AgentId); 1159 m_log.WarnFormat("[GROUPS]: Could not find a user profile for {0} / {1}", client.Name, client.AgentId);
1158 1160
1159 // Default to local user service and hope for the best? 1161 // Default to local user service and hope for the best?
1160 info.RequestID.UserServiceURL = m_sceneList[0].CommsManager.NetworkServersInfo.UserURL; 1162 // REFACTORING PROBLEM
1163 //info.RequestID.UserServiceURL = m_sceneList[0].CommsManager.NetworkServersInfo.UserURL;
1161 1164
1162 } 1165 }
1163 else if (userProfile is ForeignUserProfileData)
1164 {
1165 // They aren't from around here
1166 ForeignUserProfileData fupd = (ForeignUserProfileData)userProfile;
1167 info.RequestID.UserServiceURL = fupd.UserServerURI;
1168 }
1169 else 1166 else
1170 { 1167 {
1168 string domain = string.Empty; //m_sceneList[0].CommsManager.NetworkServersInfo.UserURL;
1169 if (account.ServiceURLs["HomeURI"] != null)
1170 domain = account.ServiceURLs["HomeURI"].ToString();
1171 // They're a local user, use this: 1171 // They're a local user, use this:
1172 info.RequestID.UserServiceURL = m_sceneList[0].CommsManager.NetworkServersInfo.UserURL; 1172 info.RequestID.UserServiceURL = domain;
1173 } 1173 }
1174 1174
1175 m_clientRequestIDInfo.Add(client.AgentId, info); 1175 m_clientRequestIDInfo.Add(client.AgentId, info);
@@ -1342,12 +1342,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
1342 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 1342 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
1343 1343
1344 // TODO: All the client update functions need to be reexamined because most do too much and send too much stuff 1344 // TODO: All the client update functions need to be reexamined because most do too much and send too much stuff
1345 UserProfileData userProfile = m_sceneList[0].CommsManager.UserService.GetUserProfile(dataForAgentID); 1345 UserAccount account = m_sceneList[0].UserAccountService.GetUserAccount(remoteClient.Scene.RegionInfo.ScopeID, dataForAgentID);
1346 string firstname, lastname; 1346 string firstname, lastname;
1347 if (userProfile != null) 1347 if (account != null)
1348 { 1348 {
1349 firstname = userProfile.FirstName; 1349 firstname = account.FirstName;
1350 lastname = userProfile.SurName; 1350 lastname = account.LastName;
1351 } 1351 }
1352 else 1352 else
1353 { 1353 {