aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL
diff options
context:
space:
mode:
authorMelanie2009-12-28 18:52:24 +0000
committerMelanie2009-12-28 18:52:24 +0000
commit397a29649203513a4ef24c04e06aace43e02b367 (patch)
treedfc798d48784c7dc8aa771813cb10e3d8fd3bc5f /OpenSim/Data/MySQL
parentForgot the migration file (diff)
downloadopensim-SC-397a29649203513a4ef24c04e06aace43e02b367.zip
opensim-SC-397a29649203513a4ef24c04e06aace43e02b367.tar.gz
opensim-SC-397a29649203513a4ef24c04e06aace43e02b367.tar.bz2
opensim-SC-397a29649203513a4ef24c04e06aace43e02b367.tar.xz
Add the migration for friends and guard the presence Report function
Diffstat (limited to 'OpenSim/Data/MySQL')
-rw-r--r--OpenSim/Data/MySQL/MySQLPresenceData.cs4
-rw-r--r--OpenSim/Data/MySQL/Resources/001_Friends.sql9
2 files changed, 13 insertions, 0 deletions
diff --git a/OpenSim/Data/MySQL/MySQLPresenceData.cs b/OpenSim/Data/MySQL/MySQLPresenceData.cs
index 95619a5..8ccad90 100644
--- a/OpenSim/Data/MySQL/MySQLPresenceData.cs
+++ b/OpenSim/Data/MySQL/MySQLPresenceData.cs
@@ -75,6 +75,10 @@ namespace OpenSim.Data.MySQL
75 public bool ReportAgent(UUID sessionID, UUID regionID, string position, 75 public bool ReportAgent(UUID sessionID, UUID regionID, string position,
76 string lookAt) 76 string lookAt)
77 { 77 {
78 PresenceData[] pd = Get("SessionID", sessionID.ToString());
79 if (pd.Length == 0)
80 return false;
81
78 MySqlCommand cmd = new MySqlCommand(); 82 MySqlCommand cmd = new MySqlCommand();
79 83
80 cmd.CommandText = String.Format("update {0} set RegionID=?RegionID, Position=?Position, LookAt=?LookAt', Online='true' where `SessionID`=?SessionID", m_Realm); 84 cmd.CommandText = String.Format("update {0} set RegionID=?RegionID, Position=?Position, LookAt=?LookAt', Online='true' where `SessionID`=?SessionID", m_Realm);
diff --git a/OpenSim/Data/MySQL/Resources/001_Friends.sql b/OpenSim/Data/MySQL/Resources/001_Friends.sql
new file mode 100644
index 0000000..e158a2c
--- /dev/null
+++ b/OpenSim/Data/MySQL/Resources/001_Friends.sql
@@ -0,0 +1,9 @@
1BEGIN;
2
3CREATE TABLE `Friends` (
4 `PrincipalID` CHAR(36) NOT NULL,
5 `FriendID` VARCHAR(255) NOT NULL,
6 `Flags` CHAR(16) NOT NULL DEFAULT '0'
7) ENGINE=InnoDB;
8
9COMMIT;