aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDr Scofield2009-01-26 21:31:02 +0000
committerDr Scofield2009-01-26 21:31:02 +0000
commit464ecc15a09dc8165c0a7a589e69c368666f30b6 (patch)
tree702998034cb506f146c321664157353b3dc0503c
parentswap endianness of parcel flags in event queue message (diff)
downloadopensim-SC_OLD-464ecc15a09dc8165c0a7a589e69c368666f30b6.zip
opensim-SC_OLD-464ecc15a09dc8165c0a7a589e69c368666f30b6.tar.gz
opensim-SC_OLD-464ecc15a09dc8165c0a7a589e69c368666f30b6.tar.bz2
opensim-SC_OLD-464ecc15a09dc8165c0a7a589e69c368666f30b6.tar.xz
starting draft attendee list notification support.
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/Concierge/ConciergeModule.cs27
1 files changed, 27 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Concierge/ConciergeModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Concierge/ConciergeModule.cs
index 023dc33..38aaf72 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Concierge/ConciergeModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Concierge/ConciergeModule.cs
@@ -65,6 +65,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Concierge
65 private string _announceEntering = "{0} enters {1} (now {2} visitors in this region)"; 65 private string _announceEntering = "{0} enters {1} (now {2} visitors in this region)";
66 private string _announceLeaving = "{0} leaves {1} (back to {2} visitors in this region)"; 66 private string _announceLeaving = "{0} leaves {1} (back to {2} visitors in this region)";
67 private string _xmlRpcPassword = String.Empty; 67 private string _xmlRpcPassword = String.Empty;
68 private string _brokerURI = String.Empty;
68 69
69 internal object _syncy = new object(); 70 internal object _syncy = new object();
70 71
@@ -118,6 +119,8 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Concierge
118 _announceEntering = _config.GetString("announce_entering", _announceEntering); 119 _announceEntering = _config.GetString("announce_entering", _announceEntering);
119 _announceLeaving = _config.GetString("announce_leaving", _announceLeaving); 120 _announceLeaving = _config.GetString("announce_leaving", _announceLeaving);
120 _xmlRpcPassword = _config.GetString("password", _xmlRpcPassword); 121 _xmlRpcPassword = _config.GetString("password", _xmlRpcPassword);
122 _brokerURI = _config.GetString("broker", _brokerURI);
123
121 _log.InfoFormat("[Concierge] reporting as \"{0}\" to our users", _whoami); 124 _log.InfoFormat("[Concierge] reporting as \"{0}\" to our users", _whoami);
122 125
123 // calculate regions Regex 126 // calculate regions Regex
@@ -274,6 +277,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Concierge
274 RemoveFromAttendeeList(client.AgentId, client.Name, client.Scene); 277 RemoveFromAttendeeList(client.AgentId, client.Name, client.Scene);
275 AnnounceToAgentsRegion(client.Scene, String.Format(_announceLeaving, client.Name, client.Scene.RegionInfo.RegionName, 278 AnnounceToAgentsRegion(client.Scene, String.Format(_announceLeaving, client.Name, client.Scene.RegionInfo.RegionName,
276 _sceneAttendees[client.Scene].Count)); 279 _sceneAttendees[client.Scene].Count));
280 UpdateBroker(client.Scene);
277 } 281 }
278 } 282 }
279 283
@@ -287,6 +291,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Concierge
287 WelcomeAvatar(agent, agent.Scene); 291 WelcomeAvatar(agent, agent.Scene);
288 AnnounceToAgentsRegion(agent.Scene, String.Format(_announceEntering, agent.Name, agent.Scene.RegionInfo.RegionName, 292 AnnounceToAgentsRegion(agent.Scene, String.Format(_announceEntering, agent.Name, agent.Scene.RegionInfo.RegionName,
289 _sceneAttendees[agent.Scene].Count)); 293 _sceneAttendees[agent.Scene].Count));
294 UpdateBroker(agent.Scene);
290 } 295 }
291 } 296 }
292 297
@@ -299,6 +304,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Concierge
299 RemoveFromAttendeeList(agent.UUID, agent.Name, agent.Scene); 304 RemoveFromAttendeeList(agent.UUID, agent.Name, agent.Scene);
300 AnnounceToAgentsRegion(agent.Scene, String.Format(_announceLeaving, agent.Name, agent.Scene.RegionInfo.RegionName, 305 AnnounceToAgentsRegion(agent.Scene, String.Format(_announceLeaving, agent.Name, agent.Scene.RegionInfo.RegionName,
301 _sceneAttendees[agent.Scene].Count)); 306 _sceneAttendees[agent.Scene].Count));
307 UpdateBroker(agent.Scene);
302 } 308 }
303 } 309 }
304 310
@@ -334,6 +340,27 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Concierge
334 } 340 }
335 } 341 }
336 342
343 protected void UpdateBroker(IScene scene)
344 {
345 if (String.IsNullOrEmpty(_brokerURI))
346 return;
347
348 // get attendee list for the scene
349 List<UUID> attendees;
350 lock (_sceneAttendees)
351 {
352 if (!_sceneAttendees.ContainsKey(scene))
353 {
354 _log.DebugFormat("[Concierge]: attendee list missing for region {0}", scene.RegionInfo.RegionName);
355 return;
356 }
357
358 attendees = _sceneAttendees[scene];
359 }
360
361 // post via REST to broker
362 }
363
337 protected void WelcomeAvatar(ScenePresence agent, Scene scene) 364 protected void WelcomeAvatar(ScenePresence agent, Scene scene)
338 { 365 {
339 // welcome mechanics: check whether we have a welcomes 366 // welcome mechanics: check whether we have a welcomes