Added UserManagementModule.IsLocalGridUser(UUID) to be used throughout region Scenes and Modules. Changed existing modules to use it instead of assuming that foreign = null account.

This commit is contained in:
Diva Canto
2011-12-29 16:12:06 -08:00
parent 42f5394677
commit 571efeddb2
7 changed files with 80 additions and 36 deletions

View File

@@ -180,10 +180,9 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
// m_log.DebugFormat("[HG INSTANT MESSAGE]: Delivering IM to {0} via XMLRPC", im.toAgentID);
// Is the user a local user?
UserAccount account = m_Scenes[0].UserAccountService.GetUserAccount(m_Scenes[0].RegionInfo.ScopeID, toAgentID);
string url = string.Empty;
bool foreigner = false;
if (account == null) // foreign user
if (UserManagementModule != null && !UserManagementModule.IsLocalGridUser(toAgentID)) // foreign user
{
url = UserManagementModule.GetUserServerURL(toAgentID, "IMServerURI");
foreigner = true;