public override bool CheckClient(UUID agentID, System.Net.IPEndPoint ep)
{
AgentCircuitData aCircuit = m_authenticateHandler.GetAgentCircuitData(agentID);
if (aCircuit != null)
{
bool vialogin = false;
if (!VerifyClient(aCircuit, ep, out vialogin))
{
// if it doesn't pass, we remove the agentcircuitdata altogether
// and the scene presence and the client, if they exist
try
{
ScenePresence sp = GetScenePresence(agentID);
PresenceService.LogoutAgent(sp.ControllingClient.SessionId);
if (sp != null)
sp.ControllingClient.Close();
// BANG! SLASH!
m_authenticateHandler.RemoveCircuit(agentID);
return false;
}
catch (Exception e)
{
m_log.DebugFormat("[SCENE]: Exception while closing aborted client: {0}", e.StackTrace);
}
}
else
return true;
}
return false;
}