aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsModule.cs
diff options
context:
space:
mode:
authorJustin Clarke Casey2009-04-29 19:38:20 +0000
committerJustin Clarke Casey2009-04-29 19:38:20 +0000
commit10415c579b3c67e0314eb0aac5d4cdd7870d9e6a (patch)
treea13562a1d2127fd5cd58140624faf3d2faa92657 /OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsModule.cs
parent* Add test to check temp profile creation on iar load (diff)
downloadopensim-SC_OLD-10415c579b3c67e0314eb0aac5d4cdd7870d9e6a.zip
opensim-SC_OLD-10415c579b3c67e0314eb0aac5d4cdd7870d9e6a.tar.gz
opensim-SC_OLD-10415c579b3c67e0314eb0aac5d4cdd7870d9e6a.tar.bz2
opensim-SC_OLD-10415c579b3c67e0314eb0aac5d4cdd7870d9e6a.tar.xz
* Correct log message format
* Fix XmlRpcGroupData.XmlRpcCall() to correctly handle response
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsModule.cs100
1 files changed, 50 insertions, 50 deletions
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsModule.cs
index a2d506c..3337ccd 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsModule.cs
@@ -139,7 +139,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
139 if (!m_groupsEnabled) 139 if (!m_groupsEnabled)
140 return; 140 return;
141 141
142 if (m_debugEnabled) m_log.DebugFormat("[GROUPS] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 142 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
143 143
144 if (m_msgTransferModule == null) 144 if (m_msgTransferModule == null)
145 { 145 {
@@ -174,7 +174,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
174 if (!m_groupsEnabled) 174 if (!m_groupsEnabled)
175 return; 175 return;
176 176
177 if (m_debugEnabled) m_log.DebugFormat("[GROUPS] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 177 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
178 178
179 lock (m_sceneList) 179 lock (m_sceneList)
180 { 180 {
@@ -209,7 +209,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
209 #region EventHandlers 209 #region EventHandlers
210 private void OnNewClient(IClientAPI client) 210 private void OnNewClient(IClientAPI client)
211 { 211 {
212 if (m_debugEnabled) m_log.DebugFormat("[GROUPS] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 212 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
213 213
214 client.OnUUIDGroupNameRequest += HandleUUIDGroupNameRequest; 214 client.OnUUIDGroupNameRequest += HandleUUIDGroupNameRequest;
215 client.OnAgentDataUpdateRequest += OnAgentDataUpdateRequest; 215 client.OnAgentDataUpdateRequest += OnAgentDataUpdateRequest;
@@ -238,7 +238,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
238 * , so as long as we don't keep a reference to the client laying around, the client can still be GC'ed 238 * , so as long as we don't keep a reference to the client laying around, the client can still be GC'ed
239 private void OnClientClosed(UUID AgentId) 239 private void OnClientClosed(UUID AgentId)
240 { 240 {
241 if (m_debugEnabled) m_log.DebugFormat("[GROUPS] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 241 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
242 242
243 lock (m_ActiveClients) 243 lock (m_ActiveClients)
244 { 244 {
@@ -254,7 +254,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
254 } 254 }
255 else 255 else
256 { 256 {
257 if (m_debugEnabled) m_log.WarnFormat("[GROUPS] Client closed that wasn't registered here."); 257 if (m_debugEnabled) m_log.WarnFormat("[GROUPS]: Client closed that wasn't registered here.");
258 } 258 }
259 259
260 260
@@ -267,7 +267,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
267 { 267 {
268 if (((DirFindFlags)queryFlags & DirFindFlags.Groups) == DirFindFlags.Groups) 268 if (((DirFindFlags)queryFlags & DirFindFlags.Groups) == DirFindFlags.Groups)
269 { 269 {
270 if (m_debugEnabled) m_log.DebugFormat("[GROUPS] {0} called with queryText({1}) queryFlags({2}) queryStart({3})", System.Reflection.MethodBase.GetCurrentMethod().Name, queryText, (DirFindFlags)queryFlags, queryStart); 270 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called with queryText({1}) queryFlags({2}) queryStart({3})", System.Reflection.MethodBase.GetCurrentMethod().Name, queryText, (DirFindFlags)queryFlags, queryStart);
271 271
272 // TODO: This currently ignores pretty much all the query flags including Mature and sort order 272 // TODO: This currently ignores pretty much all the query flags including Mature and sort order
273 remoteClient.SendDirGroupsReply(queryID, m_groupData.FindGroups(queryText).ToArray()); 273 remoteClient.SendDirGroupsReply(queryID, m_groupData.FindGroups(queryText).ToArray());
@@ -277,7 +277,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
277 277
278 private void OnAgentDataUpdateRequest(IClientAPI remoteClient, UUID dataForAgentID, UUID sessionID) 278 private void OnAgentDataUpdateRequest(IClientAPI remoteClient, UUID dataForAgentID, UUID sessionID)
279 { 279 {
280 if (m_debugEnabled) m_log.DebugFormat("[GROUPS] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 280 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
281 281
282 UUID activeGroupID = UUID.Zero; 282 UUID activeGroupID = UUID.Zero;
283 string activeGroupTitle = string.Empty; 283 string activeGroupTitle = string.Empty;
@@ -299,7 +299,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
299 299
300 private void HandleUUIDGroupNameRequest(UUID GroupID,IClientAPI remote_client) 300 private void HandleUUIDGroupNameRequest(UUID GroupID,IClientAPI remote_client)
301 { 301 {
302 if (m_debugEnabled) m_log.DebugFormat("[GROUPS] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 302 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
303 303
304 string GroupName; 304 string GroupName;
305 305
@@ -318,7 +318,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
318 318
319 private void OnInstantMessage(IClientAPI remoteClient, GridInstantMessage im) 319 private void OnInstantMessage(IClientAPI remoteClient, GridInstantMessage im)
320 { 320 {
321 if (m_debugEnabled) m_log.DebugFormat("[GROUPS] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 321 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
322 322
323 // Group invitations 323 // Group invitations
324 if ((im.dialog == (byte)InstantMessageDialog.GroupInvitationAccept) || (im.dialog == (byte)InstantMessageDialog.GroupInvitationDecline)) 324 if ((im.dialog == (byte)InstantMessageDialog.GroupInvitationAccept) || (im.dialog == (byte)InstantMessageDialog.GroupInvitationDecline))
@@ -326,7 +326,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
326 UUID inviteID = new UUID(im.imSessionID); 326 UUID inviteID = new UUID(im.imSessionID);
327 GroupInviteInfo inviteInfo = m_groupData.GetAgentToGroupInvite(inviteID); 327 GroupInviteInfo inviteInfo = m_groupData.GetAgentToGroupInvite(inviteID);
328 328
329 if (m_debugEnabled) m_log.DebugFormat("[GROUPS] Invite is for Agent {0} to Group {1}.", inviteInfo.AgentID, inviteInfo.GroupID); 329 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: Invite is for Agent {0} to Group {1}.", inviteInfo.AgentID, inviteInfo.GroupID);
330 330
331 UUID fromAgentID = new UUID(im.fromAgentID); 331 UUID fromAgentID = new UUID(im.fromAgentID);
332 if ((inviteInfo != null) && (fromAgentID == inviteInfo.AgentID)) 332 if ((inviteInfo != null) && (fromAgentID == inviteInfo.AgentID))
@@ -334,7 +334,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
334 // Accept 334 // Accept
335 if (im.dialog == (byte)InstantMessageDialog.GroupInvitationAccept) 335 if (im.dialog == (byte)InstantMessageDialog.GroupInvitationAccept)
336 { 336 {
337 if (m_debugEnabled) m_log.DebugFormat("[GROUPS] Received an accept invite notice."); 337 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: Received an accept invite notice.");
338 338
339 // and the sessionid is the role 339 // and the sessionid is the role
340 m_groupData.AddAgentToGroup(inviteInfo.AgentID, inviteInfo.GroupID, inviteInfo.RoleID); 340 m_groupData.AddAgentToGroup(inviteInfo.AgentID, inviteInfo.GroupID, inviteInfo.RoleID);
@@ -367,7 +367,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
367 // Reject 367 // Reject
368 if (im.dialog == (byte)InstantMessageDialog.GroupInvitationDecline) 368 if (im.dialog == (byte)InstantMessageDialog.GroupInvitationDecline)
369 { 369 {
370 if (m_debugEnabled) m_log.DebugFormat("[GROUPS] Received a reject invite notice."); 370 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: Received a reject invite notice.");
371 m_groupData.RemoveAgentToGroupInvite(inviteID); 371 m_groupData.RemoveAgentToGroupInvite(inviteID);
372 } 372 }
373 } 373 }
@@ -470,7 +470,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
470 470
471 private void OnGridInstantMessage(GridInstantMessage msg) 471 private void OnGridInstantMessage(GridInstantMessage msg)
472 { 472 {
473 if (m_debugEnabled) m_log.InfoFormat("[GROUPS] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 473 if (m_debugEnabled) m_log.InfoFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
474 474
475 // Trigger the above event handler 475 // Trigger the above event handler
476 OnInstantMessage(null, msg); 476 OnInstantMessage(null, msg);
@@ -506,7 +506,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
506 506
507 public void ActivateGroup(IClientAPI remoteClient, UUID groupID) 507 public void ActivateGroup(IClientAPI remoteClient, UUID groupID)
508 { 508 {
509 if (m_debugEnabled) m_log.DebugFormat("[GROUPS] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 509 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
510 510
511 m_groupData.SetAgentActiveGroup(remoteClient.AgentId, groupID); 511 m_groupData.SetAgentActiveGroup(remoteClient.AgentId, groupID);
512 512
@@ -522,7 +522,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
522 /// </summary> 522 /// </summary>
523 public List<GroupTitlesData> GroupTitlesRequest(IClientAPI remoteClient, UUID groupID) 523 public List<GroupTitlesData> GroupTitlesRequest(IClientAPI remoteClient, UUID groupID)
524 { 524 {
525 if (m_debugEnabled) m_log.DebugFormat("[GROUPS] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 525 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
526 526
527 List<GroupRolesData> agentRoles = m_groupData.GetAgentGroupRoles(remoteClient.AgentId, groupID); 527 List<GroupRolesData> agentRoles = m_groupData.GetAgentGroupRoles(remoteClient.AgentId, groupID);
528 GroupMembershipData agentMembership = m_groupData.GetAgentGroupMembership(remoteClient.AgentId, groupID); 528 GroupMembershipData agentMembership = m_groupData.GetAgentGroupMembership(remoteClient.AgentId, groupID);
@@ -546,14 +546,14 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
546 546
547 public List<GroupMembersData> GroupMembersRequest(IClientAPI remoteClient, UUID groupID) 547 public List<GroupMembersData> GroupMembersRequest(IClientAPI remoteClient, UUID groupID)
548 { 548 {
549 if (m_debugEnabled) m_log.DebugFormat("[GROUPS] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 549 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
550 550
551 List<GroupMembersData> data = m_groupData.GetGroupMembers(groupID); 551 List<GroupMembersData> data = m_groupData.GetGroupMembers(groupID);
552 if (m_debugEnabled) 552 if (m_debugEnabled)
553 { 553 {
554 foreach (GroupMembersData member in data) 554 foreach (GroupMembersData member in data)
555 { 555 {
556 m_log.DebugFormat("[GROUPS] {0} {1}", member.AgentID, member.Title); 556 m_log.DebugFormat("[GROUPS]: {0} {1}", member.AgentID, member.Title);
557 } 557 }
558 } 558 }
559 559
@@ -563,7 +563,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
563 563
564 public List<GroupRolesData> GroupRoleDataRequest(IClientAPI remoteClient, UUID groupID) 564 public List<GroupRolesData> GroupRoleDataRequest(IClientAPI remoteClient, UUID groupID)
565 { 565 {
566 if (m_debugEnabled) m_log.DebugFormat("[GROUPS] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 566 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
567 567
568 List<GroupRolesData> data = m_groupData.GetGroupRoles(groupID); 568 List<GroupRolesData> data = m_groupData.GetGroupRoles(groupID);
569 569
@@ -571,7 +571,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
571 { 571 {
572 foreach (GroupRolesData member in data) 572 foreach (GroupRolesData member in data)
573 { 573 {
574 m_log.DebugFormat("[GROUPS] {0} {1}", member.Title, member.Members); 574 m_log.DebugFormat("[GROUPS]: {0} {1}", member.Title, member.Members);
575 } 575 }
576 } 576 }
577 577
@@ -581,7 +581,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
581 581
582 public List<GroupRoleMembersData> GroupRoleMembersRequest(IClientAPI remoteClient, UUID groupID) 582 public List<GroupRoleMembersData> GroupRoleMembersRequest(IClientAPI remoteClient, UUID groupID)
583 { 583 {
584 if (m_debugEnabled) m_log.DebugFormat("[GROUPS] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 584 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
585 585
586 List<GroupRoleMembersData> data = m_groupData.GetGroupRoleMembers(groupID); 586 List<GroupRoleMembersData> data = m_groupData.GetGroupRoleMembers(groupID);
587 587
@@ -589,7 +589,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
589 { 589 {
590 foreach (GroupRoleMembersData member in data) 590 foreach (GroupRoleMembersData member in data)
591 { 591 {
592 m_log.DebugFormat("[GROUPS] Av: {0} Role: {1}", member.MemberID, member.RoleID); 592 m_log.DebugFormat("[GROUPS]: Av: {0} Role: {1}", member.MemberID, member.RoleID);
593 } 593 }
594 } 594 }
595 595
@@ -600,7 +600,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
600 600
601 public GroupProfileData GroupProfileRequest(IClientAPI remoteClient, UUID groupID) 601 public GroupProfileData GroupProfileRequest(IClientAPI remoteClient, UUID groupID)
602 { 602 {
603 if (m_debugEnabled) m_log.DebugFormat("[GROUPS] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 603 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
604 604
605 GroupProfileData profile = new GroupProfileData(); 605 GroupProfileData profile = new GroupProfileData();
606 606
@@ -635,21 +635,21 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
635 635
636 public GroupMembershipData[] GetMembershipData(UUID agentID) 636 public GroupMembershipData[] GetMembershipData(UUID agentID)
637 { 637 {
638 if (m_debugEnabled) m_log.DebugFormat("[GROUPS] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 638 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
639 639
640 return m_groupData.GetAgentGroupMemberships(agentID).ToArray(); 640 return m_groupData.GetAgentGroupMemberships(agentID).ToArray();
641 } 641 }
642 642
643 public GroupMembershipData GetMembershipData(UUID groupID, UUID agentID) 643 public GroupMembershipData GetMembershipData(UUID groupID, UUID agentID)
644 { 644 {
645 if (m_debugEnabled) m_log.DebugFormat("[GROUPS] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 645 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
646 646
647 return m_groupData.GetAgentGroupMembership(agentID, groupID); 647 return m_groupData.GetAgentGroupMembership(agentID, groupID);
648 } 648 }
649 649
650 public void UpdateGroupInfo(IClientAPI remoteClient, UUID groupID, string charter, bool showInList, UUID insigniaID, int membershipFee, bool openEnrollment, bool allowPublish, bool maturePublish) 650 public void UpdateGroupInfo(IClientAPI remoteClient, UUID groupID, string charter, bool showInList, UUID insigniaID, int membershipFee, bool openEnrollment, bool allowPublish, bool maturePublish)
651 { 651 {
652 if (m_debugEnabled) m_log.DebugFormat("[GROUPS] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 652 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
653 653
654 // TODO: Security Check? 654 // TODO: Security Check?
655 655
@@ -659,14 +659,14 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
659 public void SetGroupAcceptNotices(IClientAPI remoteClient, UUID groupID, bool acceptNotices, bool listInProfile) 659 public void SetGroupAcceptNotices(IClientAPI remoteClient, UUID groupID, bool acceptNotices, bool listInProfile)
660 { 660 {
661 // TODO: Security Check? 661 // TODO: Security Check?
662 if (m_debugEnabled) m_log.DebugFormat("[GROUPS] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 662 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
663 663
664 m_groupData.SetAgentGroupInfo(remoteClient.AgentId, groupID, acceptNotices, listInProfile); 664 m_groupData.SetAgentGroupInfo(remoteClient.AgentId, groupID, acceptNotices, listInProfile);
665 } 665 }
666 666
667 public UUID CreateGroup(IClientAPI remoteClient, string name, string charter, bool showInList, UUID insigniaID, int membershipFee, bool openEnrollment, bool allowPublish, bool maturePublish) 667 public UUID CreateGroup(IClientAPI remoteClient, string name, string charter, bool showInList, UUID insigniaID, int membershipFee, bool openEnrollment, bool allowPublish, bool maturePublish)
668 { 668 {
669 if (m_debugEnabled) m_log.DebugFormat("[GROUPS] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 669 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
670 670
671 if (m_groupData.GetGroupRecord(UUID.Zero, name) != null) 671 if (m_groupData.GetGroupRecord(UUID.Zero, name) != null)
672 { 672 {
@@ -686,7 +686,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
686 686
687 public GroupNoticeData[] GroupNoticesListRequest(IClientAPI remoteClient, UUID groupID) 687 public GroupNoticeData[] GroupNoticesListRequest(IClientAPI remoteClient, UUID groupID)
688 { 688 {
689 if (m_debugEnabled) m_log.DebugFormat("[GROUPS] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 689 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
690 690
691 // ToDo: check if agent is a member of group and is allowed to see notices? 691 // ToDo: check if agent is a member of group and is allowed to see notices?
692 692
@@ -698,7 +698,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
698 /// </summary> 698 /// </summary>
699 public string GetGroupTitle(UUID avatarID) 699 public string GetGroupTitle(UUID avatarID)
700 { 700 {
701 if (m_debugEnabled) m_log.DebugFormat("[GROUPS] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 701 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
702 702
703 GroupMembershipData membership = m_groupData.GetAgentActiveMembership(avatarID); 703 GroupMembershipData membership = m_groupData.GetAgentActiveMembership(avatarID);
704 if (membership != null) 704 if (membership != null)
@@ -713,7 +713,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
713 /// </summary> 713 /// </summary>
714 public void GroupTitleUpdate(IClientAPI remoteClient, UUID groupID, UUID titleRoleID) 714 public void GroupTitleUpdate(IClientAPI remoteClient, UUID groupID, UUID titleRoleID)
715 { 715 {
716 if (m_debugEnabled) m_log.DebugFormat("[GROUPS] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 716 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
717 717
718 m_groupData.SetAgentActiveGroupRole(remoteClient.AgentId, groupID, titleRoleID); 718 m_groupData.SetAgentActiveGroupRole(remoteClient.AgentId, groupID, titleRoleID);
719 719
@@ -727,7 +727,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
727 727
728 public void GroupRoleUpdate(IClientAPI remoteClient, UUID groupID, UUID roleID, string name, string description, string title, ulong powers, byte updateType) 728 public void GroupRoleUpdate(IClientAPI remoteClient, UUID groupID, UUID roleID, string name, string description, string title, ulong powers, byte updateType)
729 { 729 {
730 if (m_debugEnabled) m_log.DebugFormat("[GROUPS] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 730 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
731 731
732 // TODO: Security Checks? 732 // TODO: Security Checks?
733 733
@@ -760,7 +760,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
760 760
761 public void GroupRoleChanges(IClientAPI remoteClient, UUID groupID, UUID roleID, UUID memberID, uint changes) 761 public void GroupRoleChanges(IClientAPI remoteClient, UUID groupID, UUID roleID, UUID memberID, uint changes)
762 { 762 {
763 if (m_debugEnabled) m_log.DebugFormat("[GROUPS] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 763 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
764 // Todo: Security check 764 // Todo: Security check
765 765
766 switch (changes) 766 switch (changes)
@@ -776,7 +776,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
776 776
777 break; 777 break;
778 default: 778 default:
779 m_log.ErrorFormat("[GROUPS] {0} does not understand changes == {1}", System.Reflection.MethodBase.GetCurrentMethod().Name, changes); 779 m_log.ErrorFormat("[GROUPS]: {0} does not understand changes == {1}", System.Reflection.MethodBase.GetCurrentMethod().Name, changes);
780 break; 780 break;
781 } 781 }
782 782
@@ -786,7 +786,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
786 786
787 public void GroupNoticeRequest(IClientAPI remoteClient, UUID groupNoticeID) 787 public void GroupNoticeRequest(IClientAPI remoteClient, UUID groupNoticeID)
788 { 788 {
789 if (m_debugEnabled) m_log.DebugFormat("[GROUPS] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 789 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
790 790
791 791
792 GroupNoticeInfo data = m_groupData.GetGroupNotice(groupNoticeID); 792 GroupNoticeInfo data = m_groupData.GetGroupNotice(groupNoticeID);
@@ -817,7 +817,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
817 817
818 public GridInstantMessage CreateGroupNoticeIM(UUID agentID, UUID groupNoticeID, byte dialog) 818 public GridInstantMessage CreateGroupNoticeIM(UUID agentID, UUID groupNoticeID, byte dialog)
819 { 819 {
820 if (m_debugEnabled) m_log.DebugFormat("[GROUPS] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 820 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
821 821
822 GridInstantMessage msg = new GridInstantMessage(); 822 GridInstantMessage msg = new GridInstantMessage();
823 msg.imSessionID = UUID.Zero.Guid; 823 msg.imSessionID = UUID.Zero.Guid;
@@ -841,7 +841,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
841 } 841 }
842 else 842 else
843 { 843 {
844 if (m_debugEnabled) m_log.DebugFormat("[GROUPS] Group Notice {0} not found, composing empty message.", groupNoticeID); 844 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: Group Notice {0} not found, composing empty message.", groupNoticeID);
845 msg.fromAgentID = UUID.Zero.Guid; 845 msg.fromAgentID = UUID.Zero.Guid;
846 msg.timestamp = (uint)Util.UnixTimeSinceEpoch(); ; 846 msg.timestamp = (uint)Util.UnixTimeSinceEpoch(); ;
847 msg.fromAgentName = string.Empty; 847 msg.fromAgentName = string.Empty;
@@ -854,7 +854,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
854 854
855 public void SendAgentGroupDataUpdate(IClientAPI remoteClient) 855 public void SendAgentGroupDataUpdate(IClientAPI remoteClient)
856 { 856 {
857 if (m_debugEnabled) m_log.DebugFormat("[GROUPS] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 857 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
858 858
859 // Send agent information about his groups 859 // Send agent information about his groups
860 SendAgentGroupDataUpdate(remoteClient, remoteClient.AgentId); 860 SendAgentGroupDataUpdate(remoteClient, remoteClient.AgentId);
@@ -862,7 +862,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
862 862
863 public void JoinGroupRequest(IClientAPI remoteClient, UUID groupID) 863 public void JoinGroupRequest(IClientAPI remoteClient, UUID groupID)
864 { 864 {
865 if (m_debugEnabled) m_log.DebugFormat("[GROUPS] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 865 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
866 866
867 // Should check to see if OpenEnrollment, or if there's an outstanding invitation 867 // Should check to see if OpenEnrollment, or if there's an outstanding invitation
868 m_groupData.AddAgentToGroup(remoteClient.AgentId, groupID, UUID.Zero); 868 m_groupData.AddAgentToGroup(remoteClient.AgentId, groupID, UUID.Zero);
@@ -875,7 +875,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
875 875
876 public void LeaveGroupRequest(IClientAPI remoteClient, UUID groupID) 876 public void LeaveGroupRequest(IClientAPI remoteClient, UUID groupID)
877 { 877 {
878 if (m_debugEnabled) m_log.DebugFormat("[GROUPS] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 878 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
879 879
880 m_groupData.RemoveAgentFromGroup(remoteClient.AgentId, groupID); 880 m_groupData.RemoveAgentFromGroup(remoteClient.AgentId, groupID);
881 881
@@ -890,7 +890,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
890 890
891 public void EjectGroupMemberRequest(IClientAPI remoteClient, UUID groupID, UUID ejecteeID) 891 public void EjectGroupMemberRequest(IClientAPI remoteClient, UUID groupID, UUID ejecteeID)
892 { 892 {
893 if (m_debugEnabled) m_log.DebugFormat("[GROUPS] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 893 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
894 894
895 // Todo: Security check? 895 // Todo: Security check?
896 m_groupData.RemoveAgentFromGroup(ejecteeID, groupID); 896 m_groupData.RemoveAgentFromGroup(ejecteeID, groupID);
@@ -965,7 +965,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
965 965
966 public void InviteGroupRequest(IClientAPI remoteClient, UUID groupID, UUID invitedAgentID, UUID roleID) 966 public void InviteGroupRequest(IClientAPI remoteClient, UUID groupID, UUID invitedAgentID, UUID roleID)
967 { 967 {
968 if (m_debugEnabled) m_log.DebugFormat("[GROUPS] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 968 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
969 969
970 // Todo: Security check, probably also want to send some kind of notification 970 // Todo: Security check, probably also want to send some kind of notification
971 UUID InviteID = UUID.Random(); 971 UUID InviteID = UUID.Random();
@@ -1036,7 +1036,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
1036 /// </summary> 1036 /// </summary>
1037 private void SendGroupMembershipInfoViaCaps(IClientAPI remoteClient, UUID dataForAgentID, GroupMembershipData[] data) 1037 private void SendGroupMembershipInfoViaCaps(IClientAPI remoteClient, UUID dataForAgentID, GroupMembershipData[] data)
1038 { 1038 {
1039 if (m_debugEnabled) m_log.InfoFormat("[GROUPS] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 1039 if (m_debugEnabled) m_log.InfoFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
1040 1040
1041 OSDArray AgentData = new OSDArray(1); 1041 OSDArray AgentData = new OSDArray(1);
1042 OSDMap AgentDataMap = new OSDMap(1); 1042 OSDMap AgentDataMap = new OSDMap(1);
@@ -1080,7 +1080,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
1080 1080
1081 private void SendScenePresenceUpdate(UUID AgentID, string Title) 1081 private void SendScenePresenceUpdate(UUID AgentID, string Title)
1082 { 1082 {
1083 if (m_debugEnabled) m_log.DebugFormat("[GROUPS] Updating scene title for {0} with title: {1}", AgentID, Title); 1083 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: Updating scene title for {0} with title: {1}", AgentID, Title);
1084 1084
1085 ScenePresence presence = null; 1085 ScenePresence presence = null;
1086 lock (m_sceneList) 1086 lock (m_sceneList)
@@ -1104,7 +1104,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
1104 /// </summary> 1104 /// </summary>
1105 private void UpdateAllClientsWithGroupInfo(UUID dataForClientID) 1105 private void UpdateAllClientsWithGroupInfo(UUID dataForClientID)
1106 { 1106 {
1107 if (m_debugEnabled) m_log.InfoFormat("[GROUPS] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 1107 if (m_debugEnabled) m_log.InfoFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
1108 1108
1109 // TODO: Probably isn't nessesary to update every client in every scene. 1109 // TODO: Probably isn't nessesary to update every client in every scene.
1110 // Need to examine client updates and do only what's nessesary. 1110 // Need to examine client updates and do only what's nessesary.
@@ -1122,7 +1122,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
1122 /// </summary> 1122 /// </summary>
1123 private void SendAgentGroupDataUpdate(IClientAPI client, UUID dataForAgentID) 1123 private void SendAgentGroupDataUpdate(IClientAPI client, UUID dataForAgentID)
1124 { 1124 {
1125 if (m_debugEnabled) m_log.InfoFormat("[GROUPS] {0} called for {1}", System.Reflection.MethodBase.GetCurrentMethod().Name, client.Name); 1125 if (m_debugEnabled) m_log.InfoFormat("[GROUPS]: {0} called for {1}", System.Reflection.MethodBase.GetCurrentMethod().Name, client.Name);
1126 1126
1127 // TODO: All the client update functions need to be reexamined because most do too much and send too much stuff 1127 // TODO: All the client update functions need to be reexamined because most do too much and send too much stuff
1128 1128
@@ -1142,7 +1142,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
1142 1142
1143 private void SendAgentDataUpdate(IClientAPI remoteClient, UUID dataForAgentID, UUID activeGroupID, string activeGroupName, ulong activeGroupPowers, string activeGroupTitle) 1143 private void SendAgentDataUpdate(IClientAPI remoteClient, UUID dataForAgentID, UUID activeGroupID, string activeGroupName, ulong activeGroupPowers, string activeGroupTitle)
1144 { 1144 {
1145 if (m_debugEnabled) m_log.DebugFormat("[GROUPS] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 1145 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
1146 1146
1147 // TODO: All the client update functions need to be reexamined because most do too much and send too much stuff 1147 // TODO: All the client update functions need to be reexamined because most do too much and send too much stuff
1148 UserProfileData userProfile = m_sceneList[0].CommsManager.UserService.GetUserProfile(dataForAgentID); 1148 UserProfileData userProfile = m_sceneList[0].CommsManager.UserService.GetUserProfile(dataForAgentID);
@@ -1169,18 +1169,18 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
1169 1169
1170 private void OutgoingInstantMessage(GridInstantMessage msg, UUID msgTo) 1170 private void OutgoingInstantMessage(GridInstantMessage msg, UUID msgTo)
1171 { 1171 {
1172 if (m_debugEnabled) m_log.InfoFormat("[GROUPS] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 1172 if (m_debugEnabled) m_log.InfoFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
1173 1173
1174 IClientAPI localClient = GetActiveClient(msgTo); 1174 IClientAPI localClient = GetActiveClient(msgTo);
1175 if (localClient != null) 1175 if (localClient != null)
1176 { 1176 {
1177 if (m_debugEnabled) m_log.InfoFormat("[GROUPS] MsgTo ({0}) is local, delivering directly", localClient.Name); 1177 if (m_debugEnabled) m_log.InfoFormat("[GROUPS]: MsgTo ({0}) is local, delivering directly", localClient.Name);
1178 localClient.SendInstantMessage(msg); 1178 localClient.SendInstantMessage(msg);
1179 } 1179 }
1180 else 1180 else
1181 { 1181 {
1182 if (m_debugEnabled) m_log.InfoFormat("[GROUPS] MsgTo ({0}) is not local, delivering via TransferModule", msgTo); 1182 if (m_debugEnabled) m_log.InfoFormat("[GROUPS]: MsgTo ({0}) is not local, delivering via TransferModule", msgTo);
1183 m_msgTransferModule.SendInstantMessage(msg, delegate(bool success) { if (m_debugEnabled) m_log.DebugFormat("[GROUPS] Message Sent: {0}", success?"Succeeded":"Failed"); }); 1183 m_msgTransferModule.SendInstantMessage(msg, delegate(bool success) { if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: Message Sent: {0}", success?"Succeeded":"Failed"); });
1184 } 1184 }
1185 } 1185 }
1186 1186