diff --git a/OpenSim/Region/Communications/Local/LocalLoginService.cs b/OpenSim/Region/Communications/Local/LocalLoginService.cs
index 9b71efd7ba..e1395016aa 100644
--- a/OpenSim/Region/Communications/Local/LocalLoginService.cs
+++ b/OpenSim/Region/Communications/Local/LocalLoginService.cs
@@ -57,7 +57,7 @@ namespace OpenSim.Region.Communications.Local
///
/// Used to make requests to the local regions.
///
- protected IGridServices m_gridService;
+ protected LocalBackEndServices m_gridService;
public event LoginToRegionEvent OnLoginToRegion;
@@ -376,5 +376,28 @@ namespace OpenSim.Region.Communications.Local
return new InventoryData(AgentInventoryArray, rootID);
}
+
+ public override void LogOffUser(UserProfileData theUser, string message)
+ {
+ RegionInfo SimInfo;
+ try
+ {
+ SimInfo = this.m_gridService.RequestNeighbourInfo(theUser.CurrentAgent.Handle);
+
+ if (SimInfo == null)
+ {
+ m_log.Error("[LOCAL LOGIN]: Region user was in isn't currently logged in");
+ return;
+ }
+ }
+ catch (Exception)
+ {
+ m_log.Error("[LOCAL LOGIN]: Unable to look up region to log user off");
+ return;
+ }
+
+ m_gridService.TriggerLogOffUser(SimInfo.RegionHandle, theUser.ID, theUser.CurrentAgent.SecureSessionID, "Logging you off");
+ }
+
}
}
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 6831885b0a..3aa2470abe 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -2946,6 +2946,7 @@ namespace OpenSim.Region.Environment.Scenes
{
if (RegionSecret == loggingOffUser.ControllingClient.SecureSessionId)
{
+ m_sceneGridService.SendCloseChildAgentConnections(loggingOffUser.UUID, new List(loggingOffUser.KnownRegions.Keys));
loggingOffUser.ControllingClient.Kick(message);
// Give them a second to receive the message!
System.Threading.Thread.Sleep(1000);