mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
Add agent verification to Presence
This commit is contained in:
@@ -53,5 +53,6 @@ namespace OpenSim.Data
|
||||
bool ReportAgent(UUID sessionID, UUID regionID);
|
||||
PresenceData[] Get(string field, string data);
|
||||
bool Delete(string field, string val);
|
||||
PresenceData VerifyAgent(UUID secureSessionID);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,5 +100,16 @@ namespace OpenSim.Data.MSSQL
|
||||
return true;
|
||||
}
|
||||
|
||||
public PresenceData VerifyAgent(UUID secureSessionID)
|
||||
{
|
||||
PresenceData[] ret = Get("SecureSessionID",
|
||||
secureSessionID.ToString());
|
||||
|
||||
if (ret.Length == 0)
|
||||
return null;
|
||||
|
||||
return ret[0];
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,5 +95,16 @@ namespace OpenSim.Data.MySQL
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public PresenceData VerifyAgent(UUID secureSessionID)
|
||||
{
|
||||
PresenceData[] ret = Get("SecureSessionID",
|
||||
secureSessionID.ToString());
|
||||
|
||||
if (ret.Length == 0)
|
||||
return null;
|
||||
|
||||
return ret[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -222,5 +222,18 @@ namespace OpenSim.Data.Null
|
||||
return true;
|
||||
}
|
||||
|
||||
public PresenceData VerifyAgent(UUID secureSessionID)
|
||||
{
|
||||
if (Instance != this)
|
||||
return Instance.VerifyAgent(secureSessionID);
|
||||
|
||||
if (m_presenceData.ContainsKey(secureSessionID))
|
||||
{
|
||||
return m_presenceData[secureSessionID];
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user