public virtual bool VerifyUserPresence(AgentCircuitData agent, out string reason)
{
reason = String.Empty;
IPresenceService presence = RequestModuleInterface<IPresenceService>();
if (presence == null)
{
reason = String.Format("Failed to verify user presence in the grid for {0} {1} in region {2}. Presence service does not exist.", agent.firstname, agent.lastname, RegionInfo.RegionName);
return false;
}
OpenSim.Services.Interfaces.PresenceInfo pinfo = presence.GetAgent(agent.SessionID);
if (pinfo == null)
{
reason = String.Format("Failed to verify user presence in the grid for {0} {1}, access denied to region {2}.", agent.firstname, agent.lastname, RegionInfo.RegionName);
return false;
}
return true;
}