aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment')
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/Chat/ChannelState.cs10
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs2
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/Chat/IRCConnector.cs2
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/Concierge/ConciergeModule.cs64
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.Inventory.cs2
5 files changed, 40 insertions, 40 deletions
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Chat/ChannelState.cs b/OpenSim/Region/Environment/Modules/Avatar/Chat/ChannelState.cs
index 4fc744b..6265698 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Chat/ChannelState.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Chat/ChannelState.cs
@@ -486,10 +486,10 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
486 { 486 {
487 487
488 m_log.InfoFormat("[IRC-Channel-{0}] Closing channel <{1} to server <{2}:{3}>", 488 m_log.InfoFormat("[IRC-Channel-{0}] Closing channel <{1} to server <{2}:{3}>",
489 idn, IrcChannel, Server, Port); 489 idn, IrcChannel, Server, Port);
490 490
491 m_log.InfoFormat("[IRC-Channel-{0}] There are {1} active clients", 491 m_log.InfoFormat("[IRC-Channel-{0}] There are {1} active clients",
492 idn, clientregions.Count); 492 idn, clientregions.Count);
493 493
494 irc.Close(); 494 irc.Close();
495 495
@@ -498,7 +498,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
498 public void Open() 498 public void Open()
499 { 499 {
500 m_log.InfoFormat("[IRC-Channel-{0}] Opening channel <{1} to server <{2}:{3}>", 500 m_log.InfoFormat("[IRC-Channel-{0}] Opening channel <{1} to server <{2}:{3}>",
501 idn, IrcChannel, Server, Port); 501 idn, IrcChannel, Server, Port);
502 502
503 irc.Open(); 503 irc.Open();
504 504
@@ -524,7 +524,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
524 public void AddRegion(RegionState rs) 524 public void AddRegion(RegionState rs)
525 { 525 {
526 m_log.InfoFormat("[IRC-Channel-{0}] Adding region {1} to channel <{2} to server <{3}:{4}>", 526 m_log.InfoFormat("[IRC-Channel-{0}] Adding region {1} to channel <{2} to server <{3}:{4}>",
527 idn, rs.Region, IrcChannel, Server, Port); 527 idn, rs.Region, IrcChannel, Server, Port);
528 if (!clientregions.Contains(rs)) 528 if (!clientregions.Contains(rs))
529 { 529 {
530 clientregions.Add(rs); 530 clientregions.Add(rs);
@@ -540,7 +540,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
540 { 540 {
541 541
542 m_log.InfoFormat("[IRC-Channel-{0}] Removing region {1} from channel <{2} to server <{3}:{4}>", 542 m_log.InfoFormat("[IRC-Channel-{0}] Removing region {1} from channel <{2} to server <{3}:{4}>",
543 idn, rs.Region, IrcChannel, Server, Port); 543 idn, rs.Region, IrcChannel, Server, Port);
544 544
545 if (clientregions.Contains(rs)) 545 if (clientregions.Contains(rs))
546 { 546 {
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs
index 094fa6d..47d3265 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs
@@ -241,7 +241,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
241 if (rs.Region == region) 241 if (rs.Region == region)
242 { 242 {
243 responseData["server"] = rs.cs.Server; 243 responseData["server"] = rs.cs.Server;
244 responseData["port"] = rs.cs.Port; 244 responseData["port"] = (int)rs.cs.Port;
245 responseData["user"] = rs.cs.User; 245 responseData["user"] = rs.cs.User;
246 responseData["channel"] = rs.cs.IrcChannel; 246 responseData["channel"] = rs.cs.IrcChannel;
247 responseData["enabled"] = rs.cs.irc.Enabled; 247 responseData["enabled"] = rs.cs.irc.Enabled;
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCConnector.cs b/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCConnector.cs
index 3ebb226..c52375d 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCConnector.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCConnector.cs
@@ -183,7 +183,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
183 m_baseNick = cs.BaseNickname; 183 m_baseNick = cs.BaseNickname;
184 m_randomizeNick = cs.RandomizeNickname; 184 m_randomizeNick = cs.RandomizeNickname;
185 m_ircChannel = cs.IrcChannel; 185 m_ircChannel = cs.IrcChannel;
186 m_port = (uint) cs.Port; 186 m_port = cs.Port;
187 m_user = cs.User; 187 m_user = cs.User;
188 188
189 if (m_watchdog == null) 189 if (m_watchdog == null)
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Concierge/ConciergeModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Concierge/ConciergeModule.cs
index c941b0e..023dc33 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Concierge/ConciergeModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Concierge/ConciergeModule.cs
@@ -53,7 +53,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Concierge
53 53
54 private List<IScene> _scenes = new List<IScene>(); 54 private List<IScene> _scenes = new List<IScene>();
55 private List<IScene> _conciergedScenes = new List<IScene>(); 55 private List<IScene> _conciergedScenes = new List<IScene>();
56 private Dictionary<IScene, List<ScenePresence>> _sceneAttendees = new Dictionary<IScene, List<ScenePresence>>(); 56 private Dictionary<IScene, List<UUID>> _sceneAttendees = new Dictionary<IScene, List<UUID>>();
57 private bool _replacingChatModule = false; 57 private bool _replacingChatModule = false;
58 58
59 private IConfig _config; 59 private IConfig _config;
@@ -271,10 +271,9 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Concierge
271 if (_conciergedScenes.Contains(client.Scene)) 271 if (_conciergedScenes.Contains(client.Scene))
272 { 272 {
273 _log.DebugFormat("[Concierge]: {0} logs off from {1}", client.Name, client.Scene.RegionInfo.RegionName); 273 _log.DebugFormat("[Concierge]: {0} logs off from {1}", client.Name, client.Scene.RegionInfo.RegionName);
274 ScenePresence agent = (client.Scene as Scene).GetScenePresence(client.AgentId); 274 RemoveFromAttendeeList(client.AgentId, client.Name, client.Scene);
275 RemoveFromAttendeeList(agent, agent.Scene); 275 AnnounceToAgentsRegion(client.Scene, String.Format(_announceLeaving, client.Name, client.Scene.RegionInfo.RegionName,
276 AnnounceToAgentsRegion(agent, String.Format(_announceLeaving, agent.Name, agent.Scene.RegionInfo.RegionName, 276 _sceneAttendees[client.Scene].Count));
277 _sceneAttendees[agent.Scene].Count));
278 } 277 }
279 } 278 }
280 279
@@ -284,10 +283,10 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Concierge
284 if (_conciergedScenes.Contains(agent.Scene)) 283 if (_conciergedScenes.Contains(agent.Scene))
285 { 284 {
286 _log.DebugFormat("[Concierge]: {0} enters {1}", agent.Name, agent.Scene.RegionInfo.RegionName); 285 _log.DebugFormat("[Concierge]: {0} enters {1}", agent.Name, agent.Scene.RegionInfo.RegionName);
287 AddToAttendeeList(agent, agent.Scene); 286 AddToAttendeeList(agent.UUID, agent.Scene);
288 WelcomeAvatar(agent, agent.Scene); 287 WelcomeAvatar(agent, agent.Scene);
289 AnnounceToAgentsRegion(agent, String.Format(_announceEntering, agent.Name, agent.Scene.RegionInfo.RegionName, 288 AnnounceToAgentsRegion(agent.Scene, String.Format(_announceEntering, agent.Name, agent.Scene.RegionInfo.RegionName,
290 _sceneAttendees[agent.Scene].Count)); 289 _sceneAttendees[agent.Scene].Count));
291 } 290 }
292 } 291 }
293 292
@@ -297,25 +296,25 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Concierge
297 if (_conciergedScenes.Contains(agent.Scene)) 296 if (_conciergedScenes.Contains(agent.Scene))
298 { 297 {
299 _log.DebugFormat("[Concierge]: {0} leaves {1}", agent.Name, agent.Scene.RegionInfo.RegionName); 298 _log.DebugFormat("[Concierge]: {0} leaves {1}", agent.Name, agent.Scene.RegionInfo.RegionName);
300 RemoveFromAttendeeList(agent, agent.Scene); 299 RemoveFromAttendeeList(agent.UUID, agent.Name, agent.Scene);
301 AnnounceToAgentsRegion(agent, String.Format(_announceLeaving, agent.Name, agent.Scene.RegionInfo.RegionName, 300 AnnounceToAgentsRegion(agent.Scene, String.Format(_announceLeaving, agent.Name, agent.Scene.RegionInfo.RegionName,
302 _sceneAttendees[agent.Scene].Count)); 301 _sceneAttendees[agent.Scene].Count));
303 } 302 }
304 } 303 }
305 304
306 protected void AddToAttendeeList(ScenePresence agent, Scene scene) 305 protected void AddToAttendeeList(UUID agentID, Scene scene)
307 { 306 {
308 lock (_sceneAttendees) 307 lock (_sceneAttendees)
309 { 308 {
310 if (!_sceneAttendees.ContainsKey(scene)) 309 if (!_sceneAttendees.ContainsKey(scene))
311 _sceneAttendees[scene] = new List<ScenePresence>(); 310 _sceneAttendees[scene] = new List<UUID>();
312 List<ScenePresence> attendees = _sceneAttendees[scene]; 311 List<UUID> attendees = _sceneAttendees[scene];
313 if (!attendees.Contains(agent)) 312 if (!attendees.Contains(agentID))
314 attendees.Add(agent); 313 attendees.Add(agentID);
315 } 314 }
316 } 315 }
317 316
318 protected void RemoveFromAttendeeList(ScenePresence agent, Scene scene) 317 protected void RemoveFromAttendeeList(UUID agentID, String name, IScene scene)
319 { 318 {
320 lock (_sceneAttendees) 319 lock (_sceneAttendees)
321 { 320 {
@@ -324,14 +323,14 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Concierge
324 _log.WarnFormat("[Concierge]: attendee list missing for region {0}", scene.RegionInfo.RegionName); 323 _log.WarnFormat("[Concierge]: attendee list missing for region {0}", scene.RegionInfo.RegionName);
325 return; 324 return;
326 } 325 }
327 List<ScenePresence> attendees = _sceneAttendees[scene]; 326 List<UUID> attendees = _sceneAttendees[scene];
328 if (!attendees.Contains(agent)) 327 if (!attendees.Contains(agentID))
329 { 328 {
330 _log.WarnFormat("[Concierge]: avatar {0} sneaked in (not on attendee list of region {1})", 329 _log.WarnFormat("[Concierge]: avatar {0} sneaked in (not on attendee list of region {1})",
331 agent.Name, scene.RegionInfo.RegionName); 330 name, scene.RegionInfo.RegionName);
332 return; 331 return;
333 } 332 }
334 attendees.Remove(agent); 333 attendees.Remove(agentID);
335 } 334 }
336 } 335 }
337 336
@@ -375,16 +374,16 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Concierge
375 374
376 static private Vector3 PosOfGod = new Vector3(128, 128, 9999); 375 static private Vector3 PosOfGod = new Vector3(128, 128, 9999);
377 376
378 protected void AnnounceToAgentsRegion(IClientAPI client, string msg) 377 // protected void AnnounceToAgentsRegion(Scene scene, string msg)
379 { 378 // {
380 ScenePresence agent = null; 379 // ScenePresence agent = null;
381 if ((client.Scene is Scene) && (client.Scene as Scene).TryGetAvatar(client.AgentId, out agent)) 380 // if ((client.Scene is Scene) && (client.Scene as Scene).TryGetAvatar(client.AgentId, out agent))
382 AnnounceToAgentsRegion(agent, msg); 381 // AnnounceToAgentsRegion(agent, msg);
383 else 382 // else
384 _log.DebugFormat("[Concierge]: could not find an agent for client {0}", client.Name); 383 // _log.DebugFormat("[Concierge]: could not find an agent for client {0}", client.Name);
385 } 384 // }
386 385
387 protected void AnnounceToAgentsRegion(ScenePresence scenePresence, string msg) 386 protected void AnnounceToAgentsRegion(IScene scene, string msg)
388 { 387 {
389 OSChatMessage c = new OSChatMessage(); 388 OSChatMessage c = new OSChatMessage();
390 c.Message = msg; 389 c.Message = msg;
@@ -394,9 +393,10 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Concierge
394 c.From = _whoami; 393 c.From = _whoami;
395 c.Sender = null; 394 c.Sender = null;
396 c.SenderUUID = UUID.Zero; 395 c.SenderUUID = UUID.Zero;
397 c.Scene = scenePresence.Scene; 396 c.Scene = scene;
398 397
399 scenePresence.Scene.EventManager.TriggerOnChatBroadcast(this, c); 398 if (scene is Scene)
399 (scene as Scene).EventManager.TriggerOnChatBroadcast(this, c);
400 } 400 }
401 401
402 protected void AnnounceToAgent(ScenePresence agent, string msg) 402 protected void AnnounceToAgent(ScenePresence agent, string msg)
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
index 8f38d39..42986ec 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
@@ -2360,7 +2360,7 @@ namespace OpenSim.Region.Environment.Scenes
2360 2360
2361 public void AttachObject(IClientAPI remoteClient, uint AttachmentPt, UUID itemID, SceneObjectGroup att) 2361 public void AttachObject(IClientAPI remoteClient, uint AttachmentPt, UUID itemID, SceneObjectGroup att)
2362 { 2362 {
2363 if (null == itemID) 2363 if (UUID.Zero == itemID)
2364 { 2364 {
2365 m_log.Error("[SCENE INVENTORY]: Unable to save attachment. Error inventory item ID."); 2365 m_log.Error("[SCENE INVENTORY]: Unable to save attachment. Error inventory item ID.");
2366 return; 2366 return;