public void OnConnectionClose(IClientAPI client) { if (client == null) { return; } if (client.SceneAgent == null) { return; } if (client.SceneAgent.IsChildAgent) { return; } string userId; /* without scene we cannot logout correctly at all since we do not know how to send the loggedout message then */ if (client.Scene is Scene) { Scene s = (Scene)client.Scene; userId = s.UserManagementModule.GetUserUUI(client.AgentId); if (s.UserManagementModule.GetUserUUI(client.AgentId, out userId)) { m_GridUserService.LoggedOut( userId, client.SessionId, client.Scene.RegionInfo.RegionID, client.SceneAgent.AbsolutePosition, client.SceneAgent.Lookat); } } }
public void LogoutAgent(UUID userID, UUID sessionID) { m_log.DebugFormat("[USER AGENT SERVICE]: User {0} logged out", userID); lock (m_TravelingAgents) { List <UUID> travels = new List <UUID>(); foreach (KeyValuePair <UUID, TravelingAgentInfo> kvp in m_TravelingAgents) { if (kvp.Value == null) // do some clean up { travels.Add(kvp.Key); } else if (kvp.Value.UserID == userID) { travels.Add(kvp.Key); } } foreach (UUID session in travels) { m_TravelingAgents.Remove(session); } } GridUserInfo guinfo = m_GridUserService.GetGridUserInfo(userID.ToString()); if (guinfo != null) { m_GridUserService.LoggedOut(userID.ToString(), sessionID, guinfo.LastRegionID, guinfo.LastPosition, guinfo.LastLookAt); } }
public void OnConnectionClose(IClientAPI client) { if (client.IsLoggingOut) { object sp = null; Vector3 position = new Vector3(128, 128, 0); Vector3 lookat = new Vector3(0, 1, 0); if (client.Scene.TryGetScenePresence(client.AgentId, out sp)) { if (sp is ScenePresence) { if (((ScenePresence)sp).IsChildAgent) { return; } position = ((ScenePresence)sp).AbsolutePosition; lookat = ((ScenePresence)sp).Lookat; } } m_log.DebugFormat("[SIMIAN ACTIVITY DETECTOR]: Detected client logout {0} in {1}", client.AgentId, client.Scene.RegionInfo.RegionName); m_GridUserService.LoggedOut(client.AgentId.ToString(), client.SessionId, client.Scene.RegionInfo.RegionID, position, lookat); } }
public void OnConnectionClose(IClientAPI client) { if (client == null) { return; } if (client.SceneAgent == null) { return; } if (client.SceneAgent.IsChildAgent) { return; } string userId = client.AgentId.ToString(); if (client.Scene is Scene) { Scene s = (Scene)client.Scene; userId = s.UserManagementModule.GetUserUUI(client.AgentId); } //m_log.DebugFormat("[ACTIVITY DETECTOR]: Detected client logout {0} in {1}", userId, client.Scene.RegionInfo.RegionName); m_GridUserService.LoggedOut( userId, client.SessionId, client.Scene.RegionInfo.RegionID, client.SceneAgent.AbsolutePosition, client.SceneAgent.Lookat); }
public bool LoggedOut(string userID, UUID sessionID, UUID region, Vector3 position, Vector3 lookat) { if (m_Infos.Contains(userID)) { m_Infos.Remove(userID); } return(m_RemoteConnector.LoggedOut(userID, sessionID, region, position, lookat)); }
public void OnConnectionClose(IClientAPI client) { if (client.SceneAgent.IsChildAgent) { return; } // m_log.DebugFormat("[ACTIVITY DETECTOR]: Detected client logout {0} in {1}", client.AgentId, client.Scene.RegionInfo.RegionName); m_GridUserService.LoggedOut( client.AgentId.ToString(), client.SessionId, client.Scene.RegionInfo.RegionID, client.SceneAgent.AbsolutePosition, client.SceneAgent.Lookat); }
public void LogoutAgent(UUID userID, UUID sessionID) { m_log.DebugFormat("[USER AGENT SERVICE]: User {0} logged out", userID); m_Database.Delete(sessionID); GridUserInfo guinfo = m_GridUserService.GetGridUserInfo(userID.ToString()); if (guinfo != null) { m_GridUserService.LoggedOut(userID.ToString(), sessionID, guinfo.LastRegionID, guinfo.LastPosition, guinfo.LastLookAt); } }
byte[] LoggedOut(Dictionary <string, object> request) { string userID = string.Empty; UUID regionID = UUID.Zero; Vector3 position = Vector3.Zero; Vector3 lookat = Vector3.Zero; if (!UnpackArgs(request, out userID, out regionID, out position, out lookat)) { return(FailureResult()); } if (m_GridUserService.LoggedOut(userID, UUID.Zero, regionID, position, lookat)) { return(SuccessResult()); } return(FailureResult()); }
private bool SendAgentGodKillToRegion(UUID scopeID, UUID agentID, GridUserInfo guinfo) { UUID regionID = guinfo.LastRegionID; GridRegion regInfo = m_GridService.GetRegionByUUID(scopeID, regionID); if (regInfo == null) { return(false); } string regURL = regInfo.ServerURI; if (String.IsNullOrEmpty(regURL)) { return(false); } UUID guuid = new UUID("6571e388-6218-4574-87db-f9379718315e"); GridInstantMessage msg = new GridInstantMessage(); msg.imSessionID = UUID.Zero.Guid; msg.fromAgentID = guuid.Guid; msg.toAgentID = agentID.Guid; msg.timestamp = (uint)Util.UnixTimeSinceEpoch(); msg.fromAgentName = "GRID"; msg.message = string.Format("New login detected"); msg.dialog = 250; // God kick msg.fromGroup = false; msg.offline = (byte)0; msg.ParentEstateID = 0; msg.Position = Vector3.Zero; msg.RegionID = scopeID.Guid; msg.binaryBucket = new byte[1] { 0 }; InstantMessageServiceConnector.SendInstantMessage(regURL, msg, m_messageKey); m_GridUserService.LoggedOut(agentID.ToString(), UUID.Zero, guinfo.LastRegionID, guinfo.LastPosition, guinfo.LastLookAt); return(true); }
public bool LoggedOut(string userID, UUID sessionID, UUID region, Vector3 position, Vector3 lookat) { return(m_RemoteConnector.LoggedOut(userID, sessionID, region, position, lookat)); }
public bool LoggedOut(string userID, UUID sessionID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt) { return(m_GridUserService.LoggedOut(userID, sessionID, regionID, lastPosition, lastLookAt)); }