aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL/MySQLMuteListData.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/MySQL/MySQLMuteListData.cs (renamed from OpenSim/Region/Framework/Interfaces/IRegionCombinerModule.cs)57
1 files changed, 30 insertions, 27 deletions
diff --git a/OpenSim/Region/Framework/Interfaces/IRegionCombinerModule.cs b/OpenSim/Data/MySQL/MySQLMuteListData.cs
index c6f531e..a5935a3 100644
--- a/OpenSim/Region/Framework/Interfaces/IRegionCombinerModule.cs
+++ b/OpenSim/Data/MySQL/MySQLMuteListData.cs
@@ -26,39 +26,42 @@
26 */ 26 */
27 27
28using System; 28using System;
29using System.Collections;
29using System.Collections.Generic; 30using System.Collections.Generic;
30using System.Linq; 31using System.Data;
31using System.Text;
32using OpenSim.Region.Framework.Scenes;
33using System.IO;
34using OpenMetaverse; 32using OpenMetaverse;
33using OpenSim.Framework;
34using MySql.Data.MySqlClient;
35 35
36namespace OpenSim.Region.Framework.Interfaces 36namespace OpenSim.Data.MySQL
37{ 37{
38 public interface IRegionCombinerModule 38 public class MySqlMuteListData : MySQLGenericTableHandler<MuteData>, IMuteListData
39 { 39 {
40 /// <summary> 40 public MySqlMuteListData(string connectionString)
41 /// Does the given id belong to the root region of a megaregion? 41 : base(connectionString, "MuteList", "MuteListStore")
42 /// </summary> 42 {
43 bool IsRootForMegaregion(UUID regionId); 43 }
44 44
45 /// <summary> 45 public MuteData[] Get(UUID agentID)
46 /// Gets the size of megaregion. 46 {
47 /// </summary> 47 MuteData[] data = base.Get("AgentID", agentID.ToString());
48 /// <remarks> 48 return data;
49 /// Returns size in meters. 49 }
50 /// Do not rely on this method remaining the same - this area is actively under development.
51 /// </remarks>
52 /// <param name="sceneId">
53 /// The id of the root region for a megaregion.
54 /// This may change in the future to allow any region id that makes up a megaregion.
55 /// Currently, will throw an exception if this does not match a root region.
56 /// </param>
57 Vector2 GetSizeOfMegaregion(UUID regionId);
58 50
59 /// <summary> 51 public bool Delete(UUID agentID, UUID muteID, string muteName)
60 /// Tests to see of position (relative to the region) is within the megaregion 52 {
61 /// </summary> 53 string cmnd ="delete from MuteList where AgentID = ?AgentID and MuteID = ?MuteID and MuteName = ?MuteName";
62 bool PositionIsInMegaregion(UUID currentRegion, int xx, int yy); 54
55 using (MySqlCommand cmd = new MySqlCommand(cmnd))
56 {
57 cmd.Parameters.AddWithValue("?AgentID", agentID.ToString());
58 cmd.Parameters.AddWithValue("?MuteID", muteID.ToString());
59 cmd.Parameters.AddWithValue("?MuteName", muteName);
60
61 if (ExecuteNonQuery(cmd) > 0)
62 return true;
63 return false;
64 }
65 }
63 } 66 }
64} \ No newline at end of file 67} \ No newline at end of file