diff options
Diffstat (limited to 'OpenSim/Data')
-rw-r--r-- | OpenSim/Data/IAgentPreferencesData.cs | 13 | ||||
-rw-r--r-- | OpenSim/Data/MySQL/MySQLAgentPreferencesData.cs | 17 |
2 files changed, 4 insertions, 26 deletions
diff --git a/OpenSim/Data/IAgentPreferencesData.cs b/OpenSim/Data/IAgentPreferencesData.cs index f8261e2..8763299 100644 --- a/OpenSim/Data/IAgentPreferencesData.cs +++ b/OpenSim/Data/IAgentPreferencesData.cs | |||
@@ -34,22 +34,13 @@ namespace OpenSim.Data | |||
34 | { | 34 | { |
35 | public class AgentPreferencesData | 35 | public class AgentPreferencesData |
36 | { | 36 | { |
37 | public UUID PrincipalID = UUID.Zero; | 37 | public Dictionary<string, string> Data; |
38 | public string AccessPrefs = "M"; | ||
39 | //public int GodLevel; | ||
40 | public double HoverHeight = 0.0; | ||
41 | public string Language = "en-us"; | ||
42 | public bool LanguageIsPublic = true; | ||
43 | // DefaultObjectPermMasks | ||
44 | public int PermEveryone = 0; | ||
45 | public int PermGroup = 0; | ||
46 | public int PermNextOwner = 532480; | ||
47 | } | 38 | } |
48 | 39 | ||
49 | public interface IAgentPreferencesData | 40 | public interface IAgentPreferencesData |
50 | { | 41 | { |
42 | bool Store(AgentPreferencesData data); | ||
51 | AgentPreferencesData GetPrefs(UUID agentID); | 43 | AgentPreferencesData GetPrefs(UUID agentID); |
52 | void StorePrefs(AgentPreferencesData data); | ||
53 | } | 44 | } |
54 | } | 45 | } |
55 | 46 | ||
diff --git a/OpenSim/Data/MySQL/MySQLAgentPreferencesData.cs b/OpenSim/Data/MySQL/MySQLAgentPreferencesData.cs index cd9004a..bf188ee 100644 --- a/OpenSim/Data/MySQL/MySQLAgentPreferencesData.cs +++ b/OpenSim/Data/MySQL/MySQLAgentPreferencesData.cs | |||
@@ -52,22 +52,9 @@ namespace OpenSim.Data.MySQL | |||
52 | return ret[0]; | 52 | return ret[0]; |
53 | } | 53 | } |
54 | 54 | ||
55 | public void StorePrefs(AgentPreferencesData data) | 55 | public void Store(AgentPreferencesData data) |
56 | { | 56 | { |
57 | using (MySqlCommand cmd = new MySqlCommand()) | 57 | base.Store(data); |
58 | { | ||
59 | cmd.CommandText = String.Format("replace into `{0}` (`PrincipalID`, `AccessPrefs`, `HoverHeight`, `Language`, `LanguageIsPublic`, `PermEveryone`, `PermGroup`, `PermNextOwner`) VALUES (?Principal, ?AP, ?HH, ?Lang, ?LIP, ?PE, ?PG, ?PNO)", m_Realm); | ||
60 | cmd.Parameters.AddWithValue("?Principal", data.PrincipalID.ToString()); | ||
61 | cmd.Parameters.AddWithValue("?AP", data.AccessPrefs); | ||
62 | cmd.Parameters.AddWithValue("?HH", data.HoverHeight); | ||
63 | cmd.Parameters.AddWithValue("?Lang", data.Language); | ||
64 | cmd.Parameters.AddWithValue("?LIP", data.LanguageIsPublic); | ||
65 | cmd.Parameters.AddWithValue("?PE", data.PermEveryone); | ||
66 | cmd.Parameters.AddWithValue("?PG", data.PermGroup); | ||
67 | cmd.Parameters.AddWithValue("?PNO", data.PermNextOwner); | ||
68 | |||
69 | ExecuteNonQuery(cmd); | ||
70 | } | ||
71 | } | 58 | } |
72 | } | 59 | } |
73 | } | 60 | } |