Makes ban of HG users exactly the same as ban of local users, that is upon AddClient and not before.

0.6.3-post-fixes
diva 2009-02-12 02:03:36 +00:00
parent 5dae1ddb5a
commit 98bfeabf94
1 changed files with 47 additions and 78 deletions

View File

@ -728,41 +728,10 @@ namespace OpenSim.Region.Communications.Hypergrid
resp.Value = respdata;
}
else
{
RegionInfo[] regions = m_regionsOnInstance.ToArray();
//bool banned = false;
// Just check one region. We assume they all belong to the same estate.
if ((regions.Length > 0) && (regions[0].EstateSettings.IsBanned(userData.ID)))
{
m_log.InfoFormat(
"[HGrid]: Denying access for user {0} {1} because user is banned",
userData.FirstName, userData.SurName);
Hashtable respdata = new Hashtable();
respdata["success"] = "FALSE";
respdata["reason"] = "banned";
resp.Value = respdata;
}
else
{
// Finally, everything looks ok
//Console.WriteLine("XXX---- EVERYTHING OK ---XXX");
// Nope, let's do it only for the *agent*
//// 0 - Switch name if necessary
//if (IsComingHome(userData))
//{
// string[] parts = userData.FirstName.Split( new char[] {'.'});
// if (parts.Length >= 1)
// userData.FirstName = parts[0];
// if (parts.Length == 2)
// userData.SurName = parts[1];
// else
// m_log.Warn("[HGrid]: Something fishy with user " + userData.FirstName + userData.SurName);
// m_log.Info("[HGrid]: Welcome home, " + userData.FirstName + " " + userData.SurName);
//}
// 1 - Preload the user data
m_userProfileCache.PreloadUserCache(userData.ID, userData);
@ -810,7 +779,7 @@ namespace OpenSim.Region.Communications.Hypergrid
DumpUserData(userData);
DumpRegionData(rinfo);
}
}
return resp;