diff options
author | Melanie Thielker | 2017-01-05 19:07:37 +0000 |
---|---|---|
committer | Melanie Thielker | 2017-01-05 19:07:37 +0000 |
commit | b16abc8166c29585cb76cc55c3bdd76e5833cb4f (patch) | |
tree | 6a34f465a74b7a3a6dc00a3d7aa8dcc25ac3e3a5 /OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups | |
parent | Make it possible to disable the bakes module in the way it is described in co... (diff) | |
download | opensim-SC-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.zip opensim-SC-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.gz opensim-SC-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.bz2 opensim-SC-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.xz |
Massive tab and trailing space cleanup
Diffstat (limited to '')
6 files changed, 122 insertions, 122 deletions
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs index 0aaf95c..8791235 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs | |||
@@ -125,7 +125,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
125 | { | 125 | { |
126 | if (!m_groupMessagingEnabled) | 126 | if (!m_groupMessagingEnabled) |
127 | return; | 127 | return; |
128 | 128 | ||
129 | scene.RegisterModuleInterface<IGroupsMessagingModule>(this); | 129 | scene.RegisterModuleInterface<IGroupsMessagingModule>(this); |
130 | 130 | ||
131 | scene.AddCommand( | 131 | scene.AddCommand( |
@@ -136,7 +136,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
136 | "This setting turns on very verbose groups messaging debugging", | 136 | "This setting turns on very verbose groups messaging debugging", |
137 | HandleDebugGroupsMessagingVerbose); | 137 | HandleDebugGroupsMessagingVerbose); |
138 | } | 138 | } |
139 | 139 | ||
140 | public void RegionLoaded(Scene scene) | 140 | public void RegionLoaded(Scene scene) |
141 | { | 141 | { |
142 | if (!m_groupMessagingEnabled) | 142 | if (!m_groupMessagingEnabled) |
@@ -205,7 +205,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
205 | m_msgTransferModule = null; | 205 | m_msgTransferModule = null; |
206 | } | 206 | } |
207 | 207 | ||
208 | public Type ReplaceableInterface | 208 | public Type ReplaceableInterface |
209 | { | 209 | { |
210 | get { return null; } | 210 | get { return null; } |
211 | } | 211 | } |
@@ -253,7 +253,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
253 | { | 253 | { |
254 | if (m_debugEnabled) | 254 | if (m_debugEnabled) |
255 | m_log.DebugFormat("[GROUPS-MESSAGING]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); | 255 | m_log.DebugFormat("[GROUPS-MESSAGING]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); |
256 | 256 | ||
257 | GroupRecord groupInfo = m_groupData.GetGroupRecord(agentID, groupID, null); | 257 | GroupRecord groupInfo = m_groupData.GetGroupRecord(agentID, groupID, null); |
258 | 258 | ||
259 | if (groupInfo != null) | 259 | if (groupInfo != null) |
@@ -270,7 +270,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
270 | { | 270 | { |
271 | SendMessageToGroup(im, groupID, new UUID(im.fromAgentID), null); | 271 | SendMessageToGroup(im, groupID, new UUID(im.fromAgentID), null); |
272 | } | 272 | } |
273 | 273 | ||
274 | public void SendMessageToGroup( | 274 | public void SendMessageToGroup( |
275 | GridInstantMessage im, UUID groupID, UUID sendingAgentForGroupCalls, Func<GroupMembersData, bool> sendCondition) | 275 | GridInstantMessage im, UUID groupID, UUID sendingAgentForGroupCalls, Func<GroupMembersData, bool> sendCondition) |
276 | { | 276 | { |
@@ -294,19 +294,19 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
294 | m_usersOnlineCache.Add(groupID, onlineAgents, m_usersOnlineCacheExpirySeconds); | 294 | m_usersOnlineCache.Add(groupID, onlineAgents, m_usersOnlineCacheExpirySeconds); |
295 | } | 295 | } |
296 | 296 | ||
297 | attemptDeliveryUuidSet | 297 | attemptDeliveryUuidSet |
298 | = new HashSet<string>(Array.ConvertAll<PresenceInfo, string>(onlineAgents, pi => pi.UserID)); | 298 | = new HashSet<string>(Array.ConvertAll<PresenceInfo, string>(onlineAgents, pi => pi.UserID)); |
299 | } | 299 | } |
300 | else | 300 | else |
301 | { | 301 | { |
302 | attemptDeliveryUuidSet | 302 | attemptDeliveryUuidSet |
303 | = new HashSet<string>(groupMembers.ConvertAll<string>(gmd => gmd.AgentID.ToString())); | 303 | = new HashSet<string>(groupMembers.ConvertAll<string>(gmd => gmd.AgentID.ToString())); |
304 | 304 | ||
305 | if (m_debugEnabled) | 305 | if (m_debugEnabled) |
306 | m_log.DebugFormat( | 306 | m_log.DebugFormat( |
307 | "[GROUPS-MESSAGING]: SendMessageToGroup called for group {0} with {1} visible members", | 307 | "[GROUPS-MESSAGING]: SendMessageToGroup called for group {0} with {1} visible members", |
308 | groupID, groupMembers.Count); | 308 | groupID, groupMembers.Count); |
309 | } | 309 | } |
310 | 310 | ||
311 | foreach (GroupMembersData member in groupMembers) | 311 | foreach (GroupMembersData member in groupMembers) |
312 | { | 312 | { |
@@ -314,9 +314,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
314 | { | 314 | { |
315 | if (!sendCondition(member)) | 315 | if (!sendCondition(member)) |
316 | { | 316 | { |
317 | if (m_debugEnabled) | 317 | if (m_debugEnabled) |
318 | m_log.DebugFormat( | 318 | m_log.DebugFormat( |
319 | "[GROUPS-MESSAGING]: Not sending to {0} as they do not fulfill send condition", | 319 | "[GROUPS-MESSAGING]: Not sending to {0} as they do not fulfill send condition", |
320 | member.AgentID); | 320 | member.AgentID); |
321 | 321 | ||
322 | continue; | 322 | continue; |
@@ -325,7 +325,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
325 | else if (m_groupData.hasAgentDroppedGroupChatSession(member.AgentID, groupID)) | 325 | else if (m_groupData.hasAgentDroppedGroupChatSession(member.AgentID, groupID)) |
326 | { | 326 | { |
327 | // Don't deliver messages to people who have dropped this session | 327 | // Don't deliver messages to people who have dropped this session |
328 | if (m_debugEnabled) | 328 | if (m_debugEnabled) |
329 | m_log.DebugFormat( | 329 | m_log.DebugFormat( |
330 | "[GROUPS-MESSAGING]: {0} has dropped session, not delivering to them", member.AgentID); | 330 | "[GROUPS-MESSAGING]: {0} has dropped session, not delivering to them", member.AgentID); |
331 | 331 | ||
@@ -360,9 +360,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
360 | // If they're not local, forward across the grid | 360 | // If they're not local, forward across the grid |
361 | m_msgTransferModule.SendInstantMessage(msg, delegate(bool success) { }); | 361 | m_msgTransferModule.SendInstantMessage(msg, delegate(bool success) { }); |
362 | 362 | ||
363 | if (m_debugEnabled) | 363 | if (m_debugEnabled) |
364 | m_log.DebugFormat( | 364 | m_log.DebugFormat( |
365 | "[GROUPS-MESSAGING]: Delivering to {0} via grid took {1} ms", | 365 | "[GROUPS-MESSAGING]: Delivering to {0} via grid took {1} ms", |
366 | member.AgentID, Environment.TickCount - startTick); | 366 | member.AgentID, Environment.TickCount - startTick); |
367 | } | 367 | } |
368 | else | 368 | else |
@@ -372,9 +372,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
372 | ProcessMessageFromGroupSession(msg, client); | 372 | ProcessMessageFromGroupSession(msg, client); |
373 | 373 | ||
374 | // Deliver locally, directly | 374 | // Deliver locally, directly |
375 | if (m_debugEnabled) | 375 | if (m_debugEnabled) |
376 | m_log.DebugFormat( | 376 | m_log.DebugFormat( |
377 | "[GROUPS-MESSAGING]: Delivering to {0} locally took {1} ms", | 377 | "[GROUPS-MESSAGING]: Delivering to {0} locally took {1} ms", |
378 | member.AgentID, Environment.TickCount - startTick); | 378 | member.AgentID, Environment.TickCount - startTick); |
379 | } | 379 | } |
380 | } | 380 | } |
@@ -385,9 +385,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
385 | 385 | ||
386 | m_msgTransferModule.HandleUndeliverableMessage(msg, delegate(bool success) { }); | 386 | m_msgTransferModule.HandleUndeliverableMessage(msg, delegate(bool success) { }); |
387 | 387 | ||
388 | if (m_debugEnabled) | 388 | if (m_debugEnabled) |
389 | m_log.DebugFormat( | 389 | m_log.DebugFormat( |
390 | "[GROUPS-MESSAGING]: Handling undeliverable message for {0} took {1} ms", | 390 | "[GROUPS-MESSAGING]: Handling undeliverable message for {0} took {1} ms", |
391 | member.AgentID, Environment.TickCount - startTick); | 391 | member.AgentID, Environment.TickCount - startTick); |
392 | } | 392 | } |
393 | } | 393 | } |
@@ -397,7 +397,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
397 | "[GROUPS-MESSAGING]: Total SendMessageToGroup for group {0} with {1} members, {2} candidates for delivery took {3} ms", | 397 | "[GROUPS-MESSAGING]: Total SendMessageToGroup for group {0} with {1} members, {2} candidates for delivery took {3} ms", |
398 | groupID, groupMembersCount, attemptDeliveryUuidSet.Count(), Environment.TickCount - requestStartTick); | 398 | groupID, groupMembersCount, attemptDeliveryUuidSet.Count(), Environment.TickCount - requestStartTick); |
399 | } | 399 | } |
400 | 400 | ||
401 | #region SimGridEventHandlers | 401 | #region SimGridEventHandlers |
402 | 402 | ||
403 | void OnClientLogin(IClientAPI client) | 403 | void OnClientLogin(IClientAPI client) |
@@ -417,7 +417,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
417 | // The instant message module will only deliver messages of dialog types: | 417 | // The instant message module will only deliver messages of dialog types: |
418 | // MessageFromAgent, StartTyping, StopTyping, MessageFromObject | 418 | // MessageFromAgent, StartTyping, StopTyping, MessageFromObject |
419 | // | 419 | // |
420 | // Any other message type will not be delivered to a client by the | 420 | // Any other message type will not be delivered to a client by the |
421 | // Instant Message Module | 421 | // Instant Message Module |
422 | 422 | ||
423 | if (m_debugEnabled) | 423 | if (m_debugEnabled) |
@@ -428,7 +428,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
428 | } | 428 | } |
429 | 429 | ||
430 | // Incoming message from a group | 430 | // Incoming message from a group |
431 | if ((msg.fromGroup == true) && | 431 | if ((msg.fromGroup == true) && |
432 | ((msg.dialog == (byte)InstantMessageDialog.SessionSend) | 432 | ((msg.dialog == (byte)InstantMessageDialog.SessionSend) |
433 | || (msg.dialog == (byte)InstantMessageDialog.SessionAdd) | 433 | || (msg.dialog == (byte)InstantMessageDialog.SessionAdd) |
434 | || (msg.dialog == (byte)InstantMessageDialog.SessionDrop))) | 434 | || (msg.dialog == (byte)InstantMessageDialog.SessionDrop))) |
@@ -450,7 +450,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
450 | 450 | ||
451 | private void ProcessMessageFromGroupSession(GridInstantMessage msg, IClientAPI client) | 451 | private void ProcessMessageFromGroupSession(GridInstantMessage msg, IClientAPI client) |
452 | { | 452 | { |
453 | if (m_debugEnabled) | 453 | if (m_debugEnabled) |
454 | m_log.DebugFormat( | 454 | m_log.DebugFormat( |
455 | "[GROUPS-MESSAGING]: Session message from {0} going to agent {1}, sessionID {2}, type {3}", | 455 | "[GROUPS-MESSAGING]: Session message from {0} going to agent {1}, sessionID {2}, type {3}", |
456 | msg.fromAgentName, msg.toAgentID, msg.imSessionID, (InstantMessageDialog)msg.dialog); | 456 | msg.fromAgentName, msg.toAgentID, msg.imSessionID, (InstantMessageDialog)msg.dialog); |
@@ -522,7 +522,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
522 | } | 522 | } |
523 | } | 523 | } |
524 | } | 524 | } |
525 | else | 525 | else |
526 | { | 526 | { |
527 | client.SendInstantMessage(msg); | 527 | client.SendInstantMessage(msg); |
528 | } | 528 | } |
@@ -570,7 +570,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
570 | if (m_debugEnabled) m_log.InfoFormat("[GROUPS-MESSAGING]: imSessionID({0}) toAgentID({1})", im.imSessionID, im.toAgentID); | 570 | if (m_debugEnabled) m_log.InfoFormat("[GROUPS-MESSAGING]: imSessionID({0}) toAgentID({1})", im.imSessionID, im.toAgentID); |
571 | 571 | ||
572 | GroupRecord groupInfo = m_groupData.GetGroupRecord(UUID.Zero, GroupID, null); | 572 | GroupRecord groupInfo = m_groupData.GetGroupRecord(UUID.Zero, GroupID, null); |
573 | 573 | ||
574 | if (groupInfo != null) | 574 | if (groupInfo != null) |
575 | { | 575 | { |
576 | m_groupData.AgentInvitedToGroupChatSession(AgentID, GroupID); | 576 | m_groupData.AgentInvitedToGroupChatSession(AgentID, GroupID); |
@@ -586,7 +586,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
586 | // Send a message from locally connected client to a group | 586 | // Send a message from locally connected client to a group |
587 | if ((im.dialog == (byte)InstantMessageDialog.SessionSend)) | 587 | if ((im.dialog == (byte)InstantMessageDialog.SessionSend)) |
588 | { | 588 | { |
589 | if (m_debugEnabled) | 589 | if (m_debugEnabled) |
590 | m_log.DebugFormat("[GROUPS-MESSAGING]: Send message to session for group {0} with session ID {1}", GroupID, im.imSessionID.ToString()); | 590 | m_log.DebugFormat("[GROUPS-MESSAGING]: Send message to session for group {0} with session ID {1}", GroupID, im.imSessionID.ToString()); |
591 | 591 | ||
592 | //If this agent is sending a message, then they want to be in the session | 592 | //If this agent is sending a message, then they want to be in the session |
@@ -597,7 +597,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
597 | 597 | ||
598 | if ((im.dialog == (byte)InstantMessageDialog.SessionDrop)) | 598 | if ((im.dialog == (byte)InstantMessageDialog.SessionDrop)) |
599 | { | 599 | { |
600 | if (m_debugEnabled) | 600 | if (m_debugEnabled) |
601 | m_log.DebugFormat("[GROUPS-MESSAGING]: Send message to session for group {0} with session ID {1}", GroupID, im.imSessionID.ToString()); | 601 | m_log.DebugFormat("[GROUPS-MESSAGING]: Send message to session for group {0} with session ID {1}", GroupID, im.imSessionID.ToString()); |
602 | 602 | ||
603 | m_groupData.AgentDroppedFromGroupChatSession(AgentID, GroupID); | 603 | m_groupData.AgentDroppedFromGroupChatSession(AgentID, GroupID); |
@@ -659,7 +659,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
659 | /// </summary> | 659 | /// </summary> |
660 | private IClientAPI GetActiveClient(UUID agentID) | 660 | private IClientAPI GetActiveClient(UUID agentID) |
661 | { | 661 | { |
662 | if (m_debugEnabled) | 662 | if (m_debugEnabled) |
663 | m_log.DebugFormat("[GROUPS-MESSAGING]: Looking for local client {0}", agentID); | 663 | m_log.DebugFormat("[GROUPS-MESSAGING]: Looking for local client {0}", agentID); |
664 | 664 | ||
665 | IClientAPI child = null; | 665 | IClientAPI child = null; |
@@ -672,14 +672,14 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
672 | { | 672 | { |
673 | if (!sp.IsChildAgent) | 673 | if (!sp.IsChildAgent) |
674 | { | 674 | { |
675 | if (m_debugEnabled) | 675 | if (m_debugEnabled) |
676 | m_log.DebugFormat("[GROUPS-MESSAGING]: Found root agent for client : {0}", sp.ControllingClient.Name); | 676 | m_log.DebugFormat("[GROUPS-MESSAGING]: Found root agent for client : {0}", sp.ControllingClient.Name); |
677 | 677 | ||
678 | return sp.ControllingClient; | 678 | return sp.ControllingClient; |
679 | } | 679 | } |
680 | else | 680 | else |
681 | { | 681 | { |
682 | if (m_debugEnabled) | 682 | if (m_debugEnabled) |
683 | m_log.DebugFormat("[GROUPS-MESSAGING]: Found child agent for client : {0}", sp.ControllingClient.Name); | 683 | m_log.DebugFormat("[GROUPS-MESSAGING]: Found child agent for client : {0}", sp.ControllingClient.Name); |
684 | 684 | ||
685 | child = sp.ControllingClient; | 685 | child = sp.ControllingClient; |
@@ -690,12 +690,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
690 | // If we didn't find a root, then just return whichever child we found, or null if none | 690 | // If we didn't find a root, then just return whichever child we found, or null if none |
691 | if (child == null) | 691 | if (child == null) |
692 | { | 692 | { |
693 | if (m_debugEnabled) | 693 | if (m_debugEnabled) |
694 | m_log.DebugFormat("[GROUPS-MESSAGING]: Could not find local client for agent : {0}", agentID); | 694 | m_log.DebugFormat("[GROUPS-MESSAGING]: Could not find local client for agent : {0}", agentID); |
695 | } | 695 | } |
696 | else | 696 | else |
697 | { | 697 | { |
698 | if (m_debugEnabled) | 698 | if (m_debugEnabled) |
699 | m_log.DebugFormat("[GROUPS-MESSAGING]: Returning child agent for client : {0}", child.Name); | 699 | m_log.DebugFormat("[GROUPS-MESSAGING]: Returning child agent for client : {0}", child.Name); |
700 | } | 700 | } |
701 | 701 | ||
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs index 81add13..f0de7d4 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs | |||
@@ -50,19 +50,19 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
50 | /// ; To use this module, you must specify the following in your OpenSim.ini | 50 | /// ; To use this module, you must specify the following in your OpenSim.ini |
51 | /// [GROUPS] | 51 | /// [GROUPS] |
52 | /// Enabled = true | 52 | /// Enabled = true |
53 | /// | 53 | /// |
54 | /// Module = GroupsModule | 54 | /// Module = GroupsModule |
55 | /// NoticesEnabled = true | 55 | /// NoticesEnabled = true |
56 | /// DebugEnabled = true | 56 | /// DebugEnabled = true |
57 | /// | 57 | /// |
58 | /// GroupsServicesConnectorModule = XmlRpcGroupsServicesConnector | 58 | /// GroupsServicesConnectorModule = XmlRpcGroupsServicesConnector |
59 | /// XmlRpcServiceURL = http://osflotsam.org/xmlrpc.php | 59 | /// XmlRpcServiceURL = http://osflotsam.org/xmlrpc.php |
60 | /// XmlRpcServiceReadKey = 1234 | 60 | /// XmlRpcServiceReadKey = 1234 |
61 | /// XmlRpcServiceWriteKey = 1234 | 61 | /// XmlRpcServiceWriteKey = 1234 |
62 | /// | 62 | /// |
63 | /// MessagingModule = GroupsMessagingModule | 63 | /// MessagingModule = GroupsMessagingModule |
64 | /// MessagingEnabled = true | 64 | /// MessagingEnabled = true |
65 | /// | 65 | /// |
66 | /// ; Disables HTTP Keep-Alive for Groups Module HTTP Requests, work around for | 66 | /// ; Disables HTTP Keep-Alive for Groups Module HTTP Requests, work around for |
67 | /// ; a problem discovered on some Windows based region servers. Only disable | 67 | /// ; a problem discovered on some Windows based region servers. Only disable |
68 | /// ; if you see a large number (dozens) of the following Exceptions: | 68 | /// ; if you see a large number (dozens) of the following Exceptions: |
@@ -332,7 +332,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
332 | remoteClient.SendAvatarGroupsReply(avatarID, avatarGroups); | 332 | remoteClient.SendAvatarGroupsReply(avatarID, avatarGroups); |
333 | } | 333 | } |
334 | 334 | ||
335 | 335 | ||
336 | private void OnClientClosed(UUID AgentId, Scene scene) | 336 | private void OnClientClosed(UUID AgentId, Scene scene) |
337 | { | 337 | { |
338 | if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); | 338 | if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); |
@@ -387,7 +387,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
387 | if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); | 387 | if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); |
388 | 388 | ||
389 | string GroupName; | 389 | string GroupName; |
390 | 390 | ||
391 | GroupRecord group = m_groupData.GetGroupRecord(GetRequestingAgentID(remoteClient), GroupID, null); | 391 | GroupRecord group = m_groupData.GetGroupRecord(GetRequestingAgentID(remoteClient), GroupID, null); |
392 | if (group != null) | 392 | if (group != null) |
393 | { | 393 | { |
@@ -403,9 +403,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
403 | 403 | ||
404 | private void OnInstantMessage(IClientAPI remoteClient, GridInstantMessage im) | 404 | private void OnInstantMessage(IClientAPI remoteClient, GridInstantMessage im) |
405 | { | 405 | { |
406 | if (m_debugEnabled) | 406 | if (m_debugEnabled) |
407 | m_log.DebugFormat( | 407 | m_log.DebugFormat( |
408 | "[GROUPS]: {0} called for {1}, message type {2}", | 408 | "[GROUPS]: {0} called for {1}, message type {2}", |
409 | System.Reflection.MethodBase.GetCurrentMethod().Name, remoteClient.Name, (InstantMessageDialog)im.dialog); | 409 | System.Reflection.MethodBase.GetCurrentMethod().Name, remoteClient.Name, (InstantMessageDialog)im.dialog); |
410 | 410 | ||
411 | // Group invitations | 411 | // Group invitations |
@@ -569,20 +569,20 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
569 | if (targetUser != null) | 569 | if (targetUser != null) |
570 | { | 570 | { |
571 | m_log.DebugFormat( | 571 | m_log.DebugFormat( |
572 | "[GROUPS]: Prepping group notice {0} for agent: {1} who Accepts Notices ({2})", | 572 | "[GROUPS]: Prepping group notice {0} for agent: {1} who Accepts Notices ({2})", |
573 | NoticeID, targetUser.FirstName + " " + targetUser.LastName, member.AcceptNotices); | 573 | NoticeID, targetUser.FirstName + " " + targetUser.LastName, member.AcceptNotices); |
574 | } | 574 | } |
575 | else | 575 | else |
576 | { | 576 | { |
577 | m_log.DebugFormat( | 577 | m_log.DebugFormat( |
578 | "[GROUPS]: Prepping group notice {0} for agent: {1} who Accepts Notices ({2})", | 578 | "[GROUPS]: Prepping group notice {0} for agent: {1} who Accepts Notices ({2})", |
579 | NoticeID, member.AgentID, member.AcceptNotices); | 579 | NoticeID, member.AgentID, member.AcceptNotices); |
580 | } | 580 | } |
581 | } | 581 | } |
582 | } | 582 | } |
583 | } | 583 | } |
584 | 584 | ||
585 | GridInstantMessage msg | 585 | GridInstantMessage msg |
586 | = CreateGroupNoticeIM(UUID.Zero, NoticeID, (byte)OpenMetaverse.InstantMessageDialog.GroupNotice); | 586 | = CreateGroupNoticeIM(UUID.Zero, NoticeID, (byte)OpenMetaverse.InstantMessageDialog.GroupNotice); |
587 | 587 | ||
588 | if (m_groupsMessagingModule != null) | 588 | if (m_groupsMessagingModule != null) |
@@ -599,7 +599,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
599 | 599 | ||
600 | UUID noticeID = new UUID(im.imSessionID); | 600 | UUID noticeID = new UUID(im.imSessionID); |
601 | 601 | ||
602 | if (m_debugEnabled) | 602 | if (m_debugEnabled) |
603 | m_log.DebugFormat("[GROUPS]: Requesting notice {0} for {1}", noticeID, remoteClient.AgentId); | 603 | m_log.DebugFormat("[GROUPS]: Requesting notice {0} for {1}", noticeID, remoteClient.AgentId); |
604 | 604 | ||
605 | GroupNoticeInfo notice = m_groupData.GetGroupNotice(GetRequestingAgentID(remoteClient), noticeID); | 605 | GroupNoticeInfo notice = m_groupData.GetGroupNotice(GetRequestingAgentID(remoteClient), noticeID); |
@@ -625,10 +625,10 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
625 | } | 625 | } |
626 | else | 626 | else |
627 | { | 627 | { |
628 | if (m_debugEnabled) | 628 | if (m_debugEnabled) |
629 | m_log.DebugFormat( | 629 | m_log.DebugFormat( |
630 | "[GROUPS]: Could not find notice {0} for {1} on GroupNoticeInventoryAccepted.", | 630 | "[GROUPS]: Could not find notice {0} for {1} on GroupNoticeInventoryAccepted.", |
631 | noticeID, remoteClient.AgentId); | 631 | noticeID, remoteClient.AgentId); |
632 | } | 632 | } |
633 | } | 633 | } |
634 | 634 | ||
@@ -698,7 +698,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
698 | { | 698 | { |
699 | return m_groupData.GetGroupRecord(UUID.Zero, UUID.Zero, name); | 699 | return m_groupData.GetGroupRecord(UUID.Zero, UUID.Zero, name); |
700 | } | 700 | } |
701 | 701 | ||
702 | public void ActivateGroup(IClientAPI remoteClient, UUID groupID) | 702 | public void ActivateGroup(IClientAPI remoteClient, UUID groupID) |
703 | { | 703 | { |
704 | if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); | 704 | if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); |
@@ -739,10 +739,10 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
739 | 739 | ||
740 | public List<GroupMembersData> GroupMembersRequest(IClientAPI remoteClient, UUID groupID) | 740 | public List<GroupMembersData> GroupMembersRequest(IClientAPI remoteClient, UUID groupID) |
741 | { | 741 | { |
742 | if (m_debugEnabled) | 742 | if (m_debugEnabled) |
743 | m_log.DebugFormat( | 743 | m_log.DebugFormat( |
744 | "[GROUPS]: GroupMembersRequest called for {0} from client {1}", groupID, remoteClient.Name); | 744 | "[GROUPS]: GroupMembersRequest called for {0} from client {1}", groupID, remoteClient.Name); |
745 | 745 | ||
746 | List<GroupMembersData> data = m_groupData.GetGroupMembers(GetRequestingAgentID(remoteClient), groupID); | 746 | List<GroupMembersData> data = m_groupData.GetGroupMembers(GetRequestingAgentID(remoteClient), groupID); |
747 | 747 | ||
748 | if (m_debugEnabled) | 748 | if (m_debugEnabled) |
@@ -829,7 +829,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
829 | 829 | ||
830 | public GroupMembershipData GetMembershipData(UUID groupID, UUID agentID) | 830 | public GroupMembershipData GetMembershipData(UUID groupID, UUID agentID) |
831 | { | 831 | { |
832 | if (m_debugEnabled) | 832 | if (m_debugEnabled) |
833 | m_log.DebugFormat( | 833 | m_log.DebugFormat( |
834 | "[GROUPS]: {0} called with groupID={1}, agentID={2}", | 834 | "[GROUPS]: {0} called with groupID={1}, agentID={2}", |
835 | System.Reflection.MethodBase.GetCurrentMethod().Name, groupID, agentID); | 835 | System.Reflection.MethodBase.GetCurrentMethod().Name, groupID, agentID); |
@@ -926,7 +926,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
926 | if (membership != null) | 926 | if (membership != null) |
927 | { | 927 | { |
928 | return membership.GroupTitle; | 928 | return membership.GroupTitle; |
929 | } | 929 | } |
930 | return string.Empty; | 930 | return string.Empty; |
931 | } | 931 | } |
932 | 932 | ||
@@ -999,7 +999,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
999 | case 1: | 999 | case 1: |
1000 | // Remove | 1000 | // Remove |
1001 | m_groupData.RemoveAgentFromGroupRole(GetRequestingAgentID(remoteClient), memberID, groupID, roleID); | 1001 | m_groupData.RemoveAgentFromGroupRole(GetRequestingAgentID(remoteClient), memberID, groupID, roleID); |
1002 | 1002 | ||
1003 | break; | 1003 | break; |
1004 | default: | 1004 | default: |
1005 | m_log.ErrorFormat("[GROUPS]: {0} does not understand changes == {1}", System.Reflection.MethodBase.GetCurrentMethod().Name, changes); | 1005 | m_log.ErrorFormat("[GROUPS]: {0} does not understand changes == {1}", System.Reflection.MethodBase.GetCurrentMethod().Name, changes); |
@@ -1185,7 +1185,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
1185 | 1185 | ||
1186 | // Send Message to Ejectee | 1186 | // Send Message to Ejectee |
1187 | GridInstantMessage msg = new GridInstantMessage(); | 1187 | GridInstantMessage msg = new GridInstantMessage(); |
1188 | 1188 | ||
1189 | string ejecteeName = "Unknown member"; | 1189 | string ejecteeName = "Unknown member"; |
1190 | // if local send a normal message | 1190 | // if local send a normal message |
1191 | if(ejecteeClient != null) | 1191 | if(ejecteeClient != null) |
@@ -1219,7 +1219,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
1219 | msg.timestamp = 0; | 1219 | msg.timestamp = 0; |
1220 | msg.fromAgentName = agentName; | 1220 | msg.fromAgentName = agentName; |
1221 | msg.message = string.Format("You have been ejected from '{1}' by {0}.", agentName, groupInfo.GroupName); | 1221 | msg.message = string.Format("You have been ejected from '{1}' by {0}.", agentName, groupInfo.GroupName); |
1222 | // | 1222 | // |
1223 | msg.fromGroup = false; | 1223 | msg.fromGroup = false; |
1224 | msg.offline = (byte)0; | 1224 | msg.offline = (byte)0; |
1225 | msg.ParentEstateID = 0; | 1225 | msg.ParentEstateID = 0; |
@@ -1470,7 +1470,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
1470 | membershipArray = membershipData.ToArray(); | 1470 | membershipArray = membershipData.ToArray(); |
1471 | } | 1471 | } |
1472 | } | 1472 | } |
1473 | 1473 | ||
1474 | if (m_debugEnabled) | 1474 | if (m_debugEnabled) |
1475 | { | 1475 | { |
1476 | m_log.InfoFormat("[GROUPS]: Get group membership information for {0} requested by {1}", dataForAgentID, requestingClient.AgentId); | 1476 | m_log.InfoFormat("[GROUPS]: Get group membership information for {0} requested by {1}", dataForAgentID, requestingClient.AgentId); |
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/IGroupsServicesConnector.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/IGroupsServicesConnector.cs index cff3212..08c7096 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/IGroupsServicesConnector.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/IGroupsServicesConnector.cs | |||
@@ -43,7 +43,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
43 | /// <returns></returns> | 43 | /// <returns></returns> |
44 | /// <param name='RequestingAgentID'>The UUID of the user making the request.</param> | 44 | /// <param name='RequestingAgentID'>The UUID of the user making the request.</param> |
45 | /// <param name='GroupID'> | 45 | /// <param name='GroupID'> |
46 | /// The ID of the record to retrieve. | 46 | /// The ID of the record to retrieve. |
47 | /// GroupName may be specified instead, in which case this parameter will be UUID.Zero | 47 | /// GroupName may be specified instead, in which case this parameter will be UUID.Zero |
48 | /// </param> | 48 | /// </param> |
49 | /// <param name='GroupName'> | 49 | /// <param name='GroupName'> |
@@ -89,7 +89,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
89 | /// If the user is a member of the group then the data structure is returned. If not, then null is returned. | 89 | /// If the user is a member of the group then the data structure is returned. If not, then null is returned. |
90 | /// </returns> | 90 | /// </returns> |
91 | GroupMembershipData GetAgentGroupMembership(UUID RequestingAgentID, UUID AgentID, UUID GroupID); | 91 | GroupMembershipData GetAgentGroupMembership(UUID RequestingAgentID, UUID AgentID, UUID GroupID); |
92 | 92 | ||
93 | /// <summary> | 93 | /// <summary> |
94 | /// Get information about the groups to which a user belongs. | 94 | /// Get information about the groups to which a user belongs. |
95 | /// </summary> | 95 | /// </summary> |
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs index 2c45712..98c7ed4 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs | |||
@@ -48,16 +48,16 @@ using OpenSim.Services.Interfaces; | |||
48 | /*************************************************************************** | 48 | /*************************************************************************** |
49 | * Simian Data Map | 49 | * Simian Data Map |
50 | * =============== | 50 | * =============== |
51 | * | 51 | * |
52 | * OwnerID -> Type -> Key | 52 | * OwnerID -> Type -> Key |
53 | * ----------------------- | 53 | * ----------------------- |
54 | * | 54 | * |
55 | * UserID -> Group -> ActiveGroup | 55 | * UserID -> Group -> ActiveGroup |
56 | * + GroupID | 56 | * + GroupID |
57 | * | 57 | * |
58 | * UserID -> GroupSessionDropped -> GroupID | 58 | * UserID -> GroupSessionDropped -> GroupID |
59 | * UserID -> GroupSessionInvited -> GroupID | 59 | * UserID -> GroupSessionInvited -> GroupID |
60 | * | 60 | * |
61 | * UserID -> GroupMember -> GroupID | 61 | * UserID -> GroupMember -> GroupID |
62 | * + SelectedRoleID [UUID] | 62 | * + SelectedRoleID [UUID] |
63 | * + AcceptNotices [bool] | 63 | * + AcceptNotices [bool] |
@@ -65,9 +65,9 @@ using OpenSim.Services.Interfaces; | |||
65 | * + Contribution [int] | 65 | * + Contribution [int] |
66 | * | 66 | * |
67 | * UserID -> GroupRole[GroupID] -> RoleID | 67 | * UserID -> GroupRole[GroupID] -> RoleID |
68 | * | 68 | * |
69 | * | 69 | * |
70 | * GroupID -> Group -> GroupName | 70 | * GroupID -> Group -> GroupName |
71 | * + Charter | 71 | * + Charter |
72 | * + ShowInList | 72 | * + ShowInList |
73 | * + InsigniaID | 73 | * + InsigniaID |
@@ -79,17 +79,17 @@ using OpenSim.Services.Interfaces; | |||
79 | * + EveryonePowers | 79 | * + EveryonePowers |
80 | * + OwnerRoleID | 80 | * + OwnerRoleID |
81 | * + OwnersPowers | 81 | * + OwnersPowers |
82 | * | 82 | * |
83 | * GroupID -> GroupRole -> RoleID | 83 | * GroupID -> GroupRole -> RoleID |
84 | * + Name | 84 | * + Name |
85 | * + Description | 85 | * + Description |
86 | * + Title | 86 | * + Title |
87 | * + Powers | 87 | * + Powers |
88 | * | 88 | * |
89 | * GroupID -> GroupMemberInvite -> InviteID | 89 | * GroupID -> GroupMemberInvite -> InviteID |
90 | * + AgentID | 90 | * + AgentID |
91 | * + RoleID | 91 | * + RoleID |
92 | * | 92 | * |
93 | * GroupID -> GroupNotice -> NoticeID | 93 | * GroupID -> GroupNotice -> NoticeID |
94 | * + TimeStamp [uint] | 94 | * + TimeStamp [uint] |
95 | * + FromName [string] | 95 | * + FromName [string] |
@@ -106,12 +106,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
106 | { | 106 | { |
107 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 107 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
108 | 108 | ||
109 | public const GroupPowers m_DefaultEveryonePowers = GroupPowers.AllowSetHome | | 109 | public const GroupPowers m_DefaultEveryonePowers = GroupPowers.AllowSetHome | |
110 | GroupPowers.Accountable | | 110 | GroupPowers.Accountable | |
111 | GroupPowers.JoinChat | | 111 | GroupPowers.JoinChat | |
112 | GroupPowers.AllowVoiceChat | | 112 | GroupPowers.AllowVoiceChat | |
113 | GroupPowers.ReceiveNotices | | 113 | GroupPowers.ReceiveNotices | |
114 | GroupPowers.StartProposal | | 114 | GroupPowers.StartProposal | |
115 | GroupPowers.VoteOnProposal; | 115 | GroupPowers.VoteOnProposal; |
116 | 116 | ||
117 | // Would this be cleaner as (GroupPowers)ulong.MaxValue; | 117 | // Would this be cleaner as (GroupPowers)ulong.MaxValue; |
@@ -168,12 +168,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
168 | private bool m_debugEnabled = false; | 168 | private bool m_debugEnabled = false; |
169 | 169 | ||
170 | private Dictionary<string, bool> m_pendingRequests = new Dictionary<string,bool>(); | 170 | private Dictionary<string, bool> m_pendingRequests = new Dictionary<string,bool>(); |
171 | 171 | ||
172 | private ExpiringCache<string, OSDMap> m_memoryCache; | 172 | private ExpiringCache<string, OSDMap> m_memoryCache; |
173 | private int m_cacheTimeout = 30; | 173 | private int m_cacheTimeout = 30; |
174 | 174 | ||
175 | // private IUserAccountService m_accountService = null; | 175 | // private IUserAccountService m_accountService = null; |
176 | 176 | ||
177 | 177 | ||
178 | #region Region Module interfaceBase Members | 178 | #region Region Module interfaceBase Members |
179 | 179 | ||
@@ -229,10 +229,10 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
229 | m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] Groups Cache Timeout set to {0}.", m_cacheTimeout); | 229 | m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] Groups Cache Timeout set to {0}.", m_cacheTimeout); |
230 | } | 230 | } |
231 | 231 | ||
232 | 232 | ||
233 | 233 | ||
234 | m_memoryCache = new ExpiringCache<string,OSDMap>(); | 234 | m_memoryCache = new ExpiringCache<string,OSDMap>(); |
235 | 235 | ||
236 | 236 | ||
237 | // If we got all the config options we need, lets start'er'up | 237 | // If we got all the config options we need, lets start'er'up |
238 | m_connectorEnabled = true; | 238 | m_connectorEnabled = true; |
@@ -287,8 +287,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
287 | /// <summary> | 287 | /// <summary> |
288 | /// Create a Group, including Everyone and Owners Role, place FounderID in both groups, select Owner as selected role, and newly created group as agent's active role. | 288 | /// Create a Group, including Everyone and Owners Role, place FounderID in both groups, select Owner as selected role, and newly created group as agent's active role. |
289 | /// </summary> | 289 | /// </summary> |
290 | public UUID CreateGroup(UUID requestingAgentID, string name, string charter, bool showInList, UUID insigniaID, | 290 | public UUID CreateGroup(UUID requestingAgentID, string name, string charter, bool showInList, UUID insigniaID, |
291 | int membershipFee, bool openEnrollment, bool allowPublish, | 291 | int membershipFee, bool openEnrollment, bool allowPublish, |
292 | bool maturePublish, UUID founderID) | 292 | bool maturePublish, UUID founderID) |
293 | { | 293 | { |
294 | if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); | 294 | if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); |
@@ -313,7 +313,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
313 | { | 313 | { |
314 | AddGroupRole(requestingAgentID, GroupID, UUID.Zero, "Everyone", "Members of " + name, "Member of " + name, (ulong)m_DefaultEveryonePowers); | 314 | AddGroupRole(requestingAgentID, GroupID, UUID.Zero, "Everyone", "Members of " + name, "Member of " + name, (ulong)m_DefaultEveryonePowers); |
315 | AddGroupRole(requestingAgentID, GroupID, OwnerRoleID, "Owners", "Owners of " + name, "Owner of " + name, (ulong)m_DefaultOwnerPowers); | 315 | AddGroupRole(requestingAgentID, GroupID, OwnerRoleID, "Owners", "Owners of " + name, "Owner of " + name, (ulong)m_DefaultOwnerPowers); |
316 | 316 | ||
317 | AddAgentToGroup(requestingAgentID, requestingAgentID, GroupID, OwnerRoleID); | 317 | AddAgentToGroup(requestingAgentID, requestingAgentID, GroupID, OwnerRoleID); |
318 | 318 | ||
319 | return GroupID; | 319 | return GroupID; |
@@ -325,8 +325,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
325 | } | 325 | } |
326 | 326 | ||
327 | 327 | ||
328 | public void UpdateGroup(UUID requestingAgentID, UUID groupID, string charter, bool showInList, | 328 | public void UpdateGroup(UUID requestingAgentID, UUID groupID, string charter, bool showInList, |
329 | UUID insigniaID, int membershipFee, bool openEnrollment, | 329 | UUID insigniaID, int membershipFee, bool openEnrollment, |
330 | bool allowPublish, bool maturePublish) | 330 | bool allowPublish, bool maturePublish) |
331 | { | 331 | { |
332 | if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); | 332 | if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); |
@@ -350,7 +350,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
350 | } | 350 | } |
351 | 351 | ||
352 | 352 | ||
353 | public void AddGroupRole(UUID requestingAgentID, UUID groupID, UUID roleID, string name, string description, | 353 | public void AddGroupRole(UUID requestingAgentID, UUID groupID, UUID roleID, string name, string description, |
354 | string title, ulong powers) | 354 | string title, ulong powers) |
355 | { | 355 | { |
356 | if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); | 356 | if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); |
@@ -393,7 +393,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
393 | } | 393 | } |
394 | 394 | ||
395 | 395 | ||
396 | public void UpdateGroupRole(UUID requestingAgentID, UUID groupID, UUID roleID, string name, string description, | 396 | public void UpdateGroupRole(UUID requestingAgentID, UUID groupID, UUID roleID, string name, string description, |
397 | string title, ulong powers) | 397 | string title, ulong powers) |
398 | { | 398 | { |
399 | if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); | 399 | if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); |
@@ -434,7 +434,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
434 | { | 434 | { |
435 | return null; | 435 | return null; |
436 | } | 436 | } |
437 | } | 437 | } |
438 | else if (!string.IsNullOrEmpty(groupName)) | 438 | else if (!string.IsNullOrEmpty(groupName)) |
439 | { | 439 | { |
440 | if (!SimianGetFirstGenericEntry("Group", groupName, out groupID, out GroupInfoMap)) | 440 | if (!SimianGetFirstGenericEntry("Group", groupName, out groupID, out GroupInfoMap)) |
@@ -481,7 +481,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
481 | { | 481 | { |
482 | MemberGroupProfile.Charter = groupProfile["Charter"].AsString(); | 482 | MemberGroupProfile.Charter = groupProfile["Charter"].AsString(); |
483 | } | 483 | } |
484 | 484 | ||
485 | MemberGroupProfile.ShowInList = groupProfile["ShowInList"].AsString() == "1"; | 485 | MemberGroupProfile.ShowInList = groupProfile["ShowInList"].AsString() == "1"; |
486 | MemberGroupProfile.InsigniaID = groupProfile["InsigniaID"].AsUUID(); | 486 | MemberGroupProfile.InsigniaID = groupProfile["InsigniaID"].AsUUID(); |
487 | MemberGroupProfile.MembershipFee = groupProfile["MembershipFee"].AsInteger(); | 487 | MemberGroupProfile.MembershipFee = groupProfile["MembershipFee"].AsInteger(); |
@@ -489,7 +489,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
489 | MemberGroupProfile.AllowPublish = groupProfile["AllowPublish"].AsBoolean(); | 489 | MemberGroupProfile.AllowPublish = groupProfile["AllowPublish"].AsBoolean(); |
490 | MemberGroupProfile.MaturePublish = groupProfile["MaturePublish"].AsBoolean(); | 490 | MemberGroupProfile.MaturePublish = groupProfile["MaturePublish"].AsBoolean(); |
491 | MemberGroupProfile.FounderID = groupProfile["FounderID"].AsUUID();; | 491 | MemberGroupProfile.FounderID = groupProfile["FounderID"].AsUUID();; |
492 | MemberGroupProfile.OwnerRole = groupProfile["OwnerRoleID"].AsUUID(); | 492 | MemberGroupProfile.OwnerRole = groupProfile["OwnerRoleID"].AsUUID(); |
493 | 493 | ||
494 | Dictionary<UUID, OSDMap> Members; | 494 | Dictionary<UUID, OSDMap> Members; |
495 | if (SimianGetGenericEntries("GroupMember",groupID.ToString(), out Members)) | 495 | if (SimianGetGenericEntries("GroupMember",groupID.ToString(), out Members)) |
@@ -546,7 +546,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
546 | { | 546 | { |
547 | GroupMemberInfo = new OSDMap(); | 547 | GroupMemberInfo = new OSDMap(); |
548 | } | 548 | } |
549 | 549 | ||
550 | GroupMemberInfo["AcceptNotices"] = OSD.FromBoolean(acceptNotices); | 550 | GroupMemberInfo["AcceptNotices"] = OSD.FromBoolean(acceptNotices); |
551 | GroupMemberInfo["ListInProfile"] = OSD.FromBoolean(listInProfile); | 551 | GroupMemberInfo["ListInProfile"] = OSD.FromBoolean(listInProfile); |
552 | GroupMemberInfo["Contribution"] = OSD.FromInteger(0); | 552 | GroupMemberInfo["Contribution"] = OSD.FromInteger(0); |
@@ -624,7 +624,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
624 | // Remove Group Member information for this group | 624 | // Remove Group Member information for this group |
625 | SimianRemoveGenericEntry(agentID, "GroupMember", groupID.ToString()); | 625 | SimianRemoveGenericEntry(agentID, "GroupMember", groupID.ToString()); |
626 | 626 | ||
627 | // By using a Simian Generics Type consisting of a prefix and a groupID, | 627 | // By using a Simian Generics Type consisting of a prefix and a groupID, |
628 | // combined with RoleID as key allows us to get a list of roles a particular member | 628 | // combined with RoleID as key allows us to get a list of roles a particular member |
629 | // of a group is assigned to. | 629 | // of a group is assigned to. |
630 | string GroupRoleMemberType = "GroupRole" + groupID.ToString(); | 630 | string GroupRoleMemberType = "GroupRole" + groupID.ToString(); |
@@ -696,7 +696,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
696 | { | 696 | { |
697 | data.members = 0; | 697 | data.members = 0; |
698 | } | 698 | } |
699 | 699 | ||
700 | // TODO: sort results? | 700 | // TODO: sort results? |
701 | // data.searchOrder = order; | 701 | // data.searchOrder = order; |
702 | 702 | ||
@@ -721,8 +721,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
721 | data.AcceptNotices = UserGroupMemberInfo["AcceptNotices"].AsBoolean(); | 721 | data.AcceptNotices = UserGroupMemberInfo["AcceptNotices"].AsBoolean(); |
722 | data.Contribution = UserGroupMemberInfo["Contribution"].AsInteger(); | 722 | data.Contribution = UserGroupMemberInfo["Contribution"].AsInteger(); |
723 | data.ListInProfile = UserGroupMemberInfo["ListInProfile"].AsBoolean(); | 723 | data.ListInProfile = UserGroupMemberInfo["ListInProfile"].AsBoolean(); |
724 | data.ActiveRole = UserGroupMemberInfo["SelectedRoleID"].AsUUID(); | 724 | data.ActiveRole = UserGroupMemberInfo["SelectedRoleID"].AsUUID(); |
725 | 725 | ||
726 | /////////////////////////////// | 726 | /////////////////////////////// |
727 | // Agent Specific Information: | 727 | // Agent Specific Information: |
728 | // | 728 | // |
@@ -730,7 +730,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
730 | if (SimianGetGenericEntry(agentID, "Group", "ActiveGroup", out UserActiveGroup)) | 730 | if (SimianGetGenericEntry(agentID, "Group", "ActiveGroup", out UserActiveGroup)) |
731 | { | 731 | { |
732 | data.Active = UserActiveGroup["GroupID"].AsUUID().Equals(groupID); | 732 | data.Active = UserActiveGroup["GroupID"].AsUUID().Equals(groupID); |
733 | } | 733 | } |
734 | 734 | ||
735 | /////////////////////////////// | 735 | /////////////////////////////// |
736 | // Role Specific Information: | 736 | // Role Specific Information: |
@@ -740,8 +740,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
740 | { | 740 | { |
741 | data.GroupTitle = GroupRoleInfo["Title"].AsString(); | 741 | data.GroupTitle = GroupRoleInfo["Title"].AsString(); |
742 | data.GroupPowers = GroupRoleInfo["Powers"].AsULong(); | 742 | data.GroupPowers = GroupRoleInfo["Powers"].AsULong(); |
743 | } | 743 | } |
744 | 744 | ||
745 | /////////////////////////////// | 745 | /////////////////////////////// |
746 | // Group Specific Information: | 746 | // Group Specific Information: |
747 | // | 747 | // |
@@ -759,7 +759,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
759 | data.MembershipFee = GroupInfo["MembershipFee"].AsInteger(); | 759 | data.MembershipFee = GroupInfo["MembershipFee"].AsInteger(); |
760 | data.OpenEnrollment = GroupInfo["OpenEnrollment"].AsBoolean(); | 760 | data.OpenEnrollment = GroupInfo["OpenEnrollment"].AsBoolean(); |
761 | data.ShowInList = GroupInfo["ShowInList"].AsBoolean(); | 761 | data.ShowInList = GroupInfo["ShowInList"].AsBoolean(); |
762 | } | 762 | } |
763 | } | 763 | } |
764 | 764 | ||
765 | return data; | 765 | return data; |
@@ -794,7 +794,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
794 | memberships.Add(GetAgentGroupMembership(requestingAgentID, agentID, UUID.Parse(key))); | 794 | memberships.Add(GetAgentGroupMembership(requestingAgentID, agentID, UUID.Parse(key))); |
795 | } | 795 | } |
796 | } | 796 | } |
797 | 797 | ||
798 | return memberships; | 798 | return memberships; |
799 | } | 799 | } |
800 | 800 | ||
@@ -1017,7 +1017,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
1017 | Notice["BinaryBucket"] = OSD.FromBinary(binaryBucket); | 1017 | Notice["BinaryBucket"] = OSD.FromBinary(binaryBucket); |
1018 | 1018 | ||
1019 | SimianAddGeneric(groupID, "GroupNotice", noticeID.ToString(), Notice); | 1019 | SimianAddGeneric(groupID, "GroupNotice", noticeID.ToString(), Notice); |
1020 | 1020 | ||
1021 | } | 1021 | } |
1022 | #endregion | 1022 | #endregion |
1023 | 1023 | ||
@@ -1250,7 +1250,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
1250 | { "OwnerID", ownerID.ToString() }, | 1250 | { "OwnerID", ownerID.ToString() }, |
1251 | { "Type", type } | 1251 | { "Type", type } |
1252 | }; | 1252 | }; |
1253 | 1253 | ||
1254 | 1254 | ||
1255 | 1255 | ||
1256 | OSDMap response = CachedPostRequest(requestArgs); | 1256 | OSDMap response = CachedPostRequest(requestArgs); |
@@ -1357,7 +1357,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
1357 | || requestArgs["RequestMethod"] == "AddGeneric") | 1357 | || requestArgs["RequestMethod"] == "AddGeneric") |
1358 | { | 1358 | { |
1359 | m_log.WarnFormat("[SIMIAN GROUPS CONNECTOR]: clearing generics cache"); | 1359 | m_log.WarnFormat("[SIMIAN GROUPS CONNECTOR]: clearing generics cache"); |
1360 | 1360 | ||
1361 | // Any and all updates cause the cache to clear | 1361 | // Any and all updates cause the cache to clear |
1362 | m_memoryCache.Clear(); | 1362 | m_memoryCache.Clear(); |
1363 | 1363 | ||
@@ -1383,14 +1383,14 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
1383 | { | 1383 | { |
1384 | if (m_memoryCache.TryGetValue(CacheKey, out response)) | 1384 | if (m_memoryCache.TryGetValue(CacheKey, out response)) |
1385 | return response; | 1385 | return response; |
1386 | 1386 | ||
1387 | if (! m_pendingRequests.ContainsKey(CacheKey)) | 1387 | if (! m_pendingRequests.ContainsKey(CacheKey)) |
1388 | { | 1388 | { |
1389 | m_pendingRequests.Add(CacheKey,true); | 1389 | m_pendingRequests.Add(CacheKey,true); |
1390 | firstRequest = true; | 1390 | firstRequest = true; |
1391 | } | 1391 | } |
1392 | } | 1392 | } |
1393 | 1393 | ||
1394 | if (firstRequest) | 1394 | if (firstRequest) |
1395 | { | 1395 | { |
1396 | // if it wasn't in the cache, pass the request to the Simian Grid Services | 1396 | // if it wasn't in the cache, pass the request to the Simian Grid Services |
@@ -1402,7 +1402,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
1402 | { | 1402 | { |
1403 | m_log.ErrorFormat("[SIMIAN GROUPS CONNECTOR]: request failed {0}", CacheKey); | 1403 | m_log.ErrorFormat("[SIMIAN GROUPS CONNECTOR]: request failed {0}", CacheKey); |
1404 | } | 1404 | } |
1405 | 1405 | ||
1406 | // and cache the response | 1406 | // and cache the response |
1407 | lock (m_memoryCache) | 1407 | lock (m_memoryCache) |
1408 | { | 1408 | { |
@@ -1420,7 +1420,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
1420 | // { | 1420 | // { |
1421 | // m_log.WarnFormat("[SIMIAN GROUPS CONNECTOR]: query not in the cache"); | 1421 | // m_log.WarnFormat("[SIMIAN GROUPS CONNECTOR]: query not in the cache"); |
1422 | // Util.PrintCallStack(); | 1422 | // Util.PrintCallStack(); |
1423 | 1423 | ||
1424 | // // if it wasn't in the cache, pass the request to the Simian Grid Services | 1424 | // // if it wasn't in the cache, pass the request to the Simian Grid Services |
1425 | // response = WebUtil.PostToService(m_groupsServerURI, requestArgs); | 1425 | // response = WebUtil.PostToService(m_groupsServerURI, requestArgs); |
1426 | 1426 | ||
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/Tests/GroupsModuleTests.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/Tests/GroupsModuleTests.cs index a942516..ccfcd8b 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/Tests/GroupsModuleTests.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/Tests/GroupsModuleTests.cs | |||
@@ -77,12 +77,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups.Tests | |||
77 | /* AgentGroupDataUpdate is udp | 77 | /* AgentGroupDataUpdate is udp |
78 | TestHelpers.InMethod(); | 78 | TestHelpers.InMethod(); |
79 | // TestHelpers.EnableLogging(); | 79 | // TestHelpers.EnableLogging(); |
80 | 80 | ||
81 | TestScene scene = new SceneHelpers().SetupScene(); | 81 | TestScene scene = new SceneHelpers().SetupScene(); |
82 | IConfigSource configSource = new IniConfigSource(); | 82 | IConfigSource configSource = new IniConfigSource(); |
83 | IConfig config = configSource.AddConfig("Groups"); | 83 | IConfig config = configSource.AddConfig("Groups"); |
84 | config.Set("Enabled", true); | 84 | config.Set("Enabled", true); |
85 | config.Set("Module", "GroupsModule"); | 85 | config.Set("Module", "GroupsModule"); |
86 | config.Set("DebugEnabled", true); | 86 | config.Set("DebugEnabled", true); |
87 | 87 | ||
88 | GroupsModule gm = new GroupsModule(); | 88 | GroupsModule gm = new GroupsModule(); |
@@ -124,8 +124,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups.Tests | |||
124 | 124 | ||
125 | Assert.That(foundUpdate, Is.True, "Did not find AgentGroupDataUpdate in response"); | 125 | Assert.That(foundUpdate, Is.True, "Did not find AgentGroupDataUpdate in response"); |
126 | 126 | ||
127 | // TODO: More checking of more actual event data. | 127 | // TODO: More checking of more actual event data. |
128 | */ | 128 | */ |
129 | } | 129 | } |
130 | 130 | ||
131 | [Test] | 131 | [Test] |
@@ -133,7 +133,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups.Tests | |||
133 | { | 133 | { |
134 | TestHelpers.InMethod(); | 134 | TestHelpers.InMethod(); |
135 | // TestHelpers.EnableLogging(); | 135 | // TestHelpers.EnableLogging(); |
136 | 136 | ||
137 | TestScene scene = new SceneHelpers().SetupScene(); | 137 | TestScene scene = new SceneHelpers().SetupScene(); |
138 | 138 | ||
139 | MessageTransferModule mtm = new MessageTransferModule(); | 139 | MessageTransferModule mtm = new MessageTransferModule(); |
@@ -144,12 +144,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups.Tests | |||
144 | IConfigSource configSource = new IniConfigSource(); | 144 | IConfigSource configSource = new IniConfigSource(); |
145 | 145 | ||
146 | { | 146 | { |
147 | IConfig config = configSource.AddConfig("Messaging"); | 147 | IConfig config = configSource.AddConfig("Messaging"); |
148 | config.Set("MessageTransferModule", mtm.Name); | 148 | config.Set("MessageTransferModule", mtm.Name); |
149 | } | 149 | } |
150 | 150 | ||
151 | { | 151 | { |
152 | IConfig config = configSource.AddConfig("Groups"); | 152 | IConfig config = configSource.AddConfig("Groups"); |
153 | config.Set("Enabled", true); | 153 | config.Set("Enabled", true); |
154 | config.Set("Module", gm.Name); | 154 | config.Set("Module", gm.Name); |
155 | config.Set("DebugEnabled", true); | 155 | config.Set("DebugEnabled", true); |
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs index eb64f71..50d3f94 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs | |||
@@ -53,17 +53,17 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
53 | 53 | ||
54 | private bool m_debugEnabled = false; | 54 | private bool m_debugEnabled = false; |
55 | 55 | ||
56 | public const GroupPowers DefaultEveryonePowers | 56 | public const GroupPowers DefaultEveryonePowers |
57 | = GroupPowers.AllowSetHome | 57 | = GroupPowers.AllowSetHome |
58 | | GroupPowers.Accountable | 58 | | GroupPowers.Accountable |
59 | | GroupPowers.JoinChat | 59 | | GroupPowers.JoinChat |
60 | | GroupPowers.AllowVoiceChat | 60 | | GroupPowers.AllowVoiceChat |
61 | | GroupPowers.ReceiveNotices | 61 | | GroupPowers.ReceiveNotices |
62 | | GroupPowers.StartProposal | 62 | | GroupPowers.StartProposal |
63 | | GroupPowers.VoteOnProposal; | 63 | | GroupPowers.VoteOnProposal; |
64 | 64 | ||
65 | // Would this be cleaner as (GroupPowers)ulong.MaxValue? | 65 | // Would this be cleaner as (GroupPowers)ulong.MaxValue? |
66 | public const GroupPowers DefaultOwnerPowers | 66 | public const GroupPowers DefaultOwnerPowers |
67 | = GroupPowers.Accountable | 67 | = GroupPowers.Accountable |
68 | | GroupPowers.AllowEditLand | 68 | | GroupPowers.AllowEditLand |
69 | | GroupPowers.AllowFly | 69 | | GroupPowers.AllowFly |
@@ -823,7 +823,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
823 | 823 | ||
824 | if (!m_groupsAgentsInvitedToChatSession[groupID].Contains(agentID)) | 824 | if (!m_groupsAgentsInvitedToChatSession[groupID].Contains(agentID)) |
825 | m_groupsAgentsInvitedToChatSession[groupID].Add(agentID); | 825 | m_groupsAgentsInvitedToChatSession[groupID].Add(agentID); |
826 | } | 826 | } |
827 | 827 | ||
828 | private void CreateGroupChatSessionTracking(UUID groupID) | 828 | private void CreateGroupChatSessionTracking(UUID groupID) |
829 | { | 829 | { |
@@ -1051,7 +1051,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
1051 | private void LogRespDataToConsoleError(UUID requestingAgentID, string function, Hashtable param, Hashtable respData) | 1051 | private void LogRespDataToConsoleError(UUID requestingAgentID, string function, Hashtable param, Hashtable respData) |
1052 | { | 1052 | { |
1053 | m_log.ErrorFormat( | 1053 | m_log.ErrorFormat( |
1054 | "[XMLRPC-GROUPS-CONNECTOR]: Error when calling {0} for {1} with params {2}. Response params are {3}", | 1054 | "[XMLRPC-GROUPS-CONNECTOR]: Error when calling {0} for {1} with params {2}. Response params are {3}", |
1055 | function, requestingAgentID, Util.PrettyFormatToSingleLine(param), Util.PrettyFormatToSingleLine(respData)); | 1055 | function, requestingAgentID, Util.PrettyFormatToSingleLine(param), Util.PrettyFormatToSingleLine(respData)); |
1056 | } | 1056 | } |
1057 | 1057 | ||
@@ -1151,7 +1151,7 @@ namespace Nwc.XmlRpc | |||
1151 | { | 1151 | { |
1152 | _serializer.Serialize(xml, this); | 1152 | _serializer.Serialize(xml, this); |
1153 | xml.Flush(); | 1153 | xml.Flush(); |
1154 | } | 1154 | } |
1155 | } | 1155 | } |
1156 | 1156 | ||
1157 | XmlRpcResponse resp; | 1157 | XmlRpcResponse resp; |