diff options
author | onefang | 2019-05-19 21:24:15 +1000 |
---|---|---|
committer | onefang | 2019-05-19 21:24:15 +1000 |
commit | 5e4d6cab00cb29cd088ab7b62ab13aff103b64cb (patch) | |
tree | a9fbc62df9eb2d1d9ba2698d8552eae71eca20d8 /OpenSim/Region/Framework/Interfaces/IRegionCombinerModule.cs | |
parent | Add a build script. (diff) | |
download | opensim-SC-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.zip opensim-SC-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.gz opensim-SC-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.bz2 opensim-SC-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.xz |
Dump OpenSim 0.9.0.1 into it's own branch.
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 | ||
28 | using System; | 28 | using System; |
29 | using System.Collections; | ||
29 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
30 | using System.Linq; | 31 | using System.Data; |
31 | using System.Text; | ||
32 | using OpenSim.Region.Framework.Scenes; | ||
33 | using System.IO; | ||
34 | using OpenMetaverse; | 32 | using OpenMetaverse; |
33 | using OpenSim.Framework; | ||
34 | using MySql.Data.MySqlClient; | ||
35 | 35 | ||
36 | namespace OpenSim.Region.Framework.Interfaces | 36 | namespace 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 |