diff options
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/UserManagement/HGUserManagementModule.cs | 40 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs | 1 |
2 files changed, 34 insertions, 7 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/UserManagement/HGUserManagementModule.cs b/OpenSim/Region/CoreModules/Framework/UserManagement/HGUserManagementModule.cs index 8077a7a..66de8e4 100644 --- a/OpenSim/Region/CoreModules/Framework/UserManagement/HGUserManagementModule.cs +++ b/OpenSim/Region/CoreModules/Framework/UserManagement/HGUserManagementModule.cs | |||
@@ -92,19 +92,47 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement | |||
92 | foreach (UserData d in m_UserCache.Values) | 92 | foreach (UserData d in m_UserCache.Values) |
93 | { | 93 | { |
94 | if (d.LastName.StartsWith("@") && | 94 | if (d.LastName.StartsWith("@") && |
95 | (d.FirstName.ToLower().Equals(words[0].ToLower()) || | 95 | d.FirstName.ToLower().Equals(words[0].ToLower()) && |
96 | d.LastName.ToLower().Equals(words[1].ToLower()))) | 96 | d.LastName.ToLower().Equals(words[1].ToLower())) |
97 | { | 97 | { |
98 | users.Add(d); | 98 | users.Add(d); |
99 | found = true; | 99 | found = true; |
100 | break; | 100 | break; |
101 | } | 101 | } |
102 | } | 102 | } |
103 | if (!found) // This is it! Let's ask the other world | 103 | |
104 | if (!found && words[1].StartsWith("@") && words[0].Contains(".")) // This is it! Let's ask the other world | ||
104 | { | 105 | { |
105 | // TODO | 106 | string[] names = words[0].Split(new char[] { '.' }); |
106 | //UserAgentServiceConnector uasConn = new UserAgentServiceConnector(words[0]); | 107 | if (names.Length >= 2) |
107 | //uasConn.GetUserInfo(...); | 108 | { |
109 | |||
110 | string uriStr = "http://" + words[1].Substring(1); // remove the @ | ||
111 | // Let's check that the last name is a valid address | ||
112 | try | ||
113 | { | ||
114 | new Uri(uriStr); | ||
115 | } | ||
116 | catch (UriFormatException) | ||
117 | { | ||
118 | return; | ||
119 | } | ||
120 | |||
121 | UserAgentServiceConnector uasConn = new UserAgentServiceConnector(uriStr); | ||
122 | UUID userID = uasConn.GetUUID(names[0], names[1]); | ||
123 | if (!userID.Equals(UUID.Zero)) | ||
124 | { | ||
125 | UserData ud = new UserData(); | ||
126 | ud.Id = userID; | ||
127 | ud.FirstName = words[0]; | ||
128 | ud.LastName = words[1]; | ||
129 | users.Add(ud); | ||
130 | AddUser(userID, ud.FirstName, ud.LastName, uriStr); | ||
131 | m_log.DebugFormat("[USER MANAGEMENT MODULE]: User {0} {1} found", words[0], words[1]); | ||
132 | } | ||
133 | else | ||
134 | m_log.DebugFormat("[USER MANAGEMENT MODULE]: User {0} {1} not found", words[0], words[1]); | ||
135 | } | ||
108 | } | 136 | } |
109 | } | 137 | } |
110 | else | 138 | else |
diff --git a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs index 23ef0fc..cb562a2 100644 --- a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs +++ b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs | |||
@@ -183,7 +183,6 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement | |||
183 | List<UserData> users = new List<UserData>(); | 183 | List<UserData> users = new List<UserData>(); |
184 | if (accs != null) | 184 | if (accs != null) |
185 | { | 185 | { |
186 | m_log.DebugFormat("[USER MANAGEMENT MODULE]: Found {0} users", accs.Count); | ||
187 | foreach (UserAccount acc in accs) | 186 | foreach (UserAccount acc in accs) |
188 | { | 187 | { |
189 | UserData ud = new UserData(); | 188 | UserData ud = new UserData(); |