mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
several changes to usermanagement and profiles
This commit is contained in:
@@ -58,7 +58,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
|
||||
if (umanmod == Name)
|
||||
{
|
||||
m_Enabled = true;
|
||||
Init();
|
||||
base.Init(config);
|
||||
m_log.DebugFormat("[USER MANAGEMENT MODULE]: {0} is enabled", Name);
|
||||
}
|
||||
}
|
||||
@@ -70,7 +70,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
|
||||
|
||||
#endregion ISharedRegionModule
|
||||
|
||||
protected override void AddAdditionalUsers(string query, List<UserData> users)
|
||||
protected override void AddAdditionalUsers(string query, List<UserData> users, HashSet<UUID> found)
|
||||
{
|
||||
if (query.Contains("@")) // First.Last@foo.com, maybe?
|
||||
{
|
||||
@@ -82,13 +82,15 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
|
||||
}
|
||||
|
||||
words[0] = words[0].Trim(); // it has at least 1
|
||||
words[1] = words[1].Trim();
|
||||
|
||||
words[1] = words[1].Trim().ToLower();
|
||||
string match1 = "@" + words[1];
|
||||
if (words[0] == String.Empty) // query was @foo.com?
|
||||
{
|
||||
foreach (UserData d in m_UserCache.Values)
|
||||
foreach (UserData d in m_userCacheByID.Values)
|
||||
{
|
||||
if (d.LastName.ToLower().StartsWith("@" + words[1].ToLower()))
|
||||
if(found.Contains(d.Id))
|
||||
continue;
|
||||
if (d.LastName.ToLower().StartsWith(match1))
|
||||
users.Add(d);
|
||||
}
|
||||
|
||||
@@ -96,13 +98,15 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
|
||||
return;
|
||||
}
|
||||
|
||||
string match0 = words[0].ToLower();
|
||||
// words.Length == 2 and words[0] != string.empty
|
||||
// first.last@foo.com ?
|
||||
foreach (UserData d in m_UserCache.Values)
|
||||
foreach (UserData d in m_userCacheByID.Values)
|
||||
{
|
||||
if (d.LastName.StartsWith("@") &&
|
||||
d.FirstName.ToLower().Equals(words[0].ToLower()) &&
|
||||
d.LastName.ToLower().Equals("@" + words[1].ToLower()))
|
||||
if (found.Contains(d.Id))
|
||||
continue;
|
||||
if (d.LastName.ToLower().Equals(match1) &&
|
||||
d.FirstName.ToLower().Equals(match0))
|
||||
{
|
||||
users.Add(d);
|
||||
// It's cached. We're done
|
||||
@@ -116,7 +120,6 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
|
||||
string[] names = words[0].Split(new char[] { '.' });
|
||||
if (names.Length >= 2)
|
||||
{
|
||||
|
||||
string uriStr = "http://" + words[1];
|
||||
// Let's check that the last name is a valid address
|
||||
try
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user