Add the migration for friends and guard the presence Report function

slimupdates
Melanie 2009-12-28 18:52:24 +00:00
parent 9a8f6c79c9
commit 397a296492
2 changed files with 13 additions and 0 deletions

View File

@ -75,6 +75,10 @@ namespace OpenSim.Data.MySQL
public bool ReportAgent(UUID sessionID, UUID regionID, string position, public bool ReportAgent(UUID sessionID, UUID regionID, string position,
string lookAt) string lookAt)
{ {
PresenceData[] pd = Get("SessionID", sessionID.ToString());
if (pd.Length == 0)
return false;
MySqlCommand cmd = new MySqlCommand(); MySqlCommand cmd = new MySqlCommand();
cmd.CommandText = String.Format("update {0} set RegionID=?RegionID, Position=?Position, LookAt=?LookAt', Online='true' where `SessionID`=?SessionID", m_Realm); cmd.CommandText = String.Format("update {0} set RegionID=?RegionID, Position=?Position, LookAt=?LookAt', Online='true' where `SessionID`=?SessionID", m_Realm);

View File

@ -0,0 +1,9 @@
BEGIN;
CREATE TABLE `Friends` (
`PrincipalID` CHAR(36) NOT NULL,
`FriendID` VARCHAR(255) NOT NULL,
`Flags` CHAR(16) NOT NULL DEFAULT '0'
) ENGINE=InnoDB;
COMMIT;