aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Services')
-rw-r--r--OpenSim/Services/Connectors/Simulation/SimulationDataService.cs4
-rw-r--r--OpenSim/Services/Interfaces/IGridService.cs29
-rw-r--r--OpenSim/Services/PresenceService/PresenceService.cs13
3 files changed, 45 insertions, 1 deletions
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationDataService.cs b/OpenSim/Services/Connectors/Simulation/SimulationDataService.cs
index c8ecb18..0df9380 100644
--- a/OpenSim/Services/Connectors/Simulation/SimulationDataService.cs
+++ b/OpenSim/Services/Connectors/Simulation/SimulationDataService.cs
@@ -144,5 +144,9 @@ namespace OpenSim.Services.Connectors
144 { 144 {
145 m_database.StoreRegionWindlightSettings(wl); 145 m_database.StoreRegionWindlightSettings(wl);
146 } 146 }
147 public void RemoveRegionWindlightSettings(UUID regionID)
148 {
149 m_database.RemoveRegionWindlightSettings(regionID);
150 }
147 } 151 }
148} 152}
diff --git a/OpenSim/Services/Interfaces/IGridService.cs b/OpenSim/Services/Interfaces/IGridService.cs
index 6d3bff7..a34f0be 100644
--- a/OpenSim/Services/Interfaces/IGridService.cs
+++ b/OpenSim/Services/Interfaces/IGridService.cs
@@ -97,7 +97,7 @@ namespace OpenSim.Services.Interfaces
97 int GetRegionFlags(UUID scopeID, UUID regionID); 97 int GetRegionFlags(UUID scopeID, UUID regionID);
98 } 98 }
99 99
100 public class GridRegion 100 public class GridRegion : Object
101 { 101 {
102 102
103 /// <summary> 103 /// <summary>
@@ -238,6 +238,33 @@ namespace OpenSim.Services.Interfaces
238 EstateOwner = ConvertFrom.EstateOwner; 238 EstateOwner = ConvertFrom.EstateOwner;
239 } 239 }
240 240
241 # region Definition of equality
242
243 /// <summary>
244 /// Define equality as two regions having the same, non-zero UUID.
245 /// </summary>
246 public bool Equals(GridRegion region)
247 {
248 if ((object)region == null)
249 return false;
250 // Return true if the non-zero UUIDs are equal:
251 return (RegionID != UUID.Zero) && RegionID.Equals(region.RegionID);
252 }
253
254 public override bool Equals(Object obj)
255 {
256 if (obj == null)
257 return false;
258 return Equals(obj as GridRegion);
259 }
260
261 public override int GetHashCode()
262 {
263 return RegionID.GetHashCode() ^ TerrainImage.GetHashCode();
264 }
265
266 #endregion
267
241 /// <value> 268 /// <value>
242 /// This accessor can throw all the exceptions that Dns.GetHostAddresses can throw. 269 /// This accessor can throw all the exceptions that Dns.GetHostAddresses can throw.
243 /// 270 ///
diff --git a/OpenSim/Services/PresenceService/PresenceService.cs b/OpenSim/Services/PresenceService/PresenceService.cs
index 09c31c3..c8ac38e 100644
--- a/OpenSim/Services/PresenceService/PresenceService.cs
+++ b/OpenSim/Services/PresenceService/PresenceService.cs
@@ -45,10 +45,20 @@ namespace OpenSim.Services.PresenceService
45 LogManager.GetLogger( 45 LogManager.GetLogger(
46 MethodBase.GetCurrentMethod().DeclaringType); 46 MethodBase.GetCurrentMethod().DeclaringType);
47 47
48 protected bool m_allowDuplicatePresences = false;
49
48 public PresenceService(IConfigSource config) 50 public PresenceService(IConfigSource config)
49 : base(config) 51 : base(config)
50 { 52 {
51 m_log.Debug("[PRESENCE SERVICE]: Starting presence service"); 53 m_log.Debug("[PRESENCE SERVICE]: Starting presence service");
54
55 IConfig presenceConfig = config.Configs["PresenceService"];
56 if (presenceConfig != null)
57 {
58 m_allowDuplicatePresences =
59 presenceConfig.GetBoolean("AllowDuplicatePresences",
60 m_allowDuplicatePresences);
61 }
52 } 62 }
53 63
54 public bool LoginAgent(string userID, UUID sessionID, 64 public bool LoginAgent(string userID, UUID sessionID,
@@ -57,6 +67,9 @@ namespace OpenSim.Services.PresenceService
57 //PresenceData[] d = m_Database.Get("UserID", userID); 67 //PresenceData[] d = m_Database.Get("UserID", userID);
58 //m_Database.Get("UserID", userID); 68 //m_Database.Get("UserID", userID);
59 69
70 if (!m_allowDuplicatePresences)
71 m_Database.Delete("UserID", userID.ToString());
72
60 PresenceData data = new PresenceData(); 73 PresenceData data = new PresenceData();
61 74
62 data.UserID = userID; 75 data.UserID = userID;