aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Groups/GroupsModule.cs11
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupData.cs61
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsMessaging.cs63
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsModule.cs2
4 files changed, 65 insertions, 72 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Groups/GroupsModule.cs b/OpenSim/Region/CoreModules/Avatar/Groups/GroupsModule.cs
index 4daea1f..02ea4cd 100644
--- a/OpenSim/Region/CoreModules/Avatar/Groups/GroupsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Groups/GroupsModule.cs
@@ -87,7 +87,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Groups
87 osGroup.GroupName = "OpenSimulator Testing"; 87 osGroup.GroupName = "OpenSimulator Testing";
88 osGroup.GroupPowers = 88 osGroup.GroupPowers =
89 (uint)(GroupPowers.AllowLandmark | 89 (uint)(GroupPowers.AllowLandmark |
90 GroupPowers.AllowSetHome); 90 GroupPowers.AllowSetHome);
91 m_GroupMap[opensimulatorGroupID] = osGroup; 91 m_GroupMap[opensimulatorGroupID] = osGroup;
92 } 92 }
93 m_SceneList.Add(scene); 93 m_SceneList.Add(scene);
@@ -96,8 +96,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Groups
96 96
97 scene.EventManager.OnNewClient += OnNewClient; 97 scene.EventManager.OnNewClient += OnNewClient;
98 scene.EventManager.OnClientClosed += OnClientClosed; 98 scene.EventManager.OnClientClosed += OnClientClosed;
99 scene.EventManager.OnIncomingInstantMessage += 99 scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage;
100 OnGridInstantMessage;
101 } 100 }
102 101
103 public void PostInitialise() 102 public void PostInitialise()
@@ -152,7 +151,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Groups
152 } 151 }
153 152
154 private void OnAgentDataUpdateRequest(IClientAPI remoteClient, 153 private void OnAgentDataUpdateRequest(IClientAPI remoteClient,
155 UUID AgentID, UUID SessionID) 154 UUID AgentID, UUID SessionID)
156 { 155 {
157 UUID ActiveGroupID; 156 UUID ActiveGroupID;
158 string ActiveGroupName; 157 string ActiveGroupName;
@@ -168,8 +167,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Groups
168 ActiveGroupPowers = osGroup.GroupPowers; 167 ActiveGroupPowers = osGroup.GroupPowers;
169 168
170 remoteClient.SendAgentDataUpdate(AgentID, ActiveGroupID, firstname, 169 remoteClient.SendAgentDataUpdate(AgentID, ActiveGroupID, firstname,
171 lastname, ActiveGroupPowers, ActiveGroupName, 170 lastname, ActiveGroupPowers, ActiveGroupName,
172 ActiveGroupTitle); 171 ActiveGroupTitle);
173 } 172 }
174 173
175 private void OnInstantMessage(IClientAPI client, GridInstantMessage im) 174 private void OnInstantMessage(IClientAPI client, GridInstantMessage im)
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupData.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupData.cs
index ada6cfd..30839cc 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupData.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupData.cs
@@ -52,7 +52,13 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
52 52
53 private string m_serviceURL = string.Empty; 53 private string m_serviceURL = string.Empty;
54 54
55 public const GroupPowers m_DefaultEveryonePowers = GroupPowers.AllowSetHome | GroupPowers.Accountable | GroupPowers.JoinChat | GroupPowers.AllowVoiceChat | GroupPowers.ReceiveNotices | GroupPowers.StartProposal | GroupPowers.VoteOnProposal; 55 public const GroupPowers m_DefaultEveryonePowers = GroupPowers.AllowSetHome |
56 GroupPowers.Accountable |
57 GroupPowers.JoinChat |
58 GroupPowers.AllowVoiceChat |
59 GroupPowers.ReceiveNotices |
60 GroupPowers.StartProposal |
61 GroupPowers.VoteOnProposal;
56 62
57 private bool m_disableKeepAlive = false; 63 private bool m_disableKeepAlive = false;
58 64
@@ -73,7 +79,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
73 /// <summary> 79 /// <summary>
74 /// 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. 80 /// 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.
75 /// </summary> 81 /// </summary>
76 public UUID CreateGroup(string name, string charter, bool showInList, UUID insigniaID, int membershipFee, bool openEnrollment, bool allowPublish, bool maturePublish, UUID founderID) 82 public UUID CreateGroup(string name, string charter, bool showInList, UUID insigniaID,
83 int membershipFee, bool openEnrollment, bool allowPublish,
84 bool maturePublish, UUID founderID)
77 { 85 {
78 UUID GroupID = UUID.Random(); 86 UUID GroupID = UUID.Random();
79 UUID OwnerRoleID = UUID.Random(); 87 UUID OwnerRoleID = UUID.Random();
@@ -140,9 +148,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
140 | GroupPowers.VoteOnProposal; 148 | GroupPowers.VoteOnProposal;
141 param["OwnersPowers"] = ((ulong)OwnerPowers).ToString(); 149 param["OwnersPowers"] = ((ulong)OwnerPowers).ToString();
142 150
143
144
145
146 Hashtable respData = XmlRpcCall("groups.createGroup", param); 151 Hashtable respData = XmlRpcCall("groups.createGroup", param);
147 152
148 if (respData.Contains("error")) 153 if (respData.Contains("error"))
@@ -155,7 +160,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
155 return UUID.Parse((string)respData["GroupID"]); 160 return UUID.Parse((string)respData["GroupID"]);
156 } 161 }
157 162
158 public void UpdateGroup(UUID groupID, string charter, bool showInList, UUID insigniaID, int membershipFee, bool openEnrollment, bool allowPublish, bool maturePublish) 163 public void UpdateGroup(UUID groupID, string charter, bool showInList,
164 UUID insigniaID, int membershipFee, bool openEnrollment,
165 bool allowPublish, bool maturePublish)
159 { 166 {
160 Hashtable param = new Hashtable(); 167 Hashtable param = new Hashtable();
161 param["GroupID"] = groupID.ToString(); 168 param["GroupID"] = groupID.ToString();
@@ -170,7 +177,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
170 XmlRpcCall("groups.updateGroup", param); 177 XmlRpcCall("groups.updateGroup", param);
171 } 178 }
172 179
173 public void AddGroupRole(UUID groupID, UUID roleID, string name, string description, string title, ulong powers) 180 public void AddGroupRole(UUID groupID, UUID roleID, string name, string description,
181 string title, ulong powers)
174 { 182 {
175 Hashtable param = new Hashtable(); 183 Hashtable param = new Hashtable();
176 param["GroupID"] = groupID.ToString(); 184 param["GroupID"] = groupID.ToString();
@@ -193,7 +201,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
193 201
194 } 202 }
195 203
196 public void UpdateGroupRole(UUID groupID, UUID roleID, string name, string description, string title, ulong powers) 204 public void UpdateGroupRole(UUID groupID, UUID roleID, string name, string description,
205 string title, ulong powers)
197 { 206 {
198 Hashtable param = new Hashtable(); 207 Hashtable param = new Hashtable();
199 param["GroupID"] = groupID.ToString(); 208 param["GroupID"] = groupID.ToString();
@@ -479,11 +488,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
479 488
480 if (respData.Contains("error")) 489 if (respData.Contains("error"))
481 { 490 {
482 return null; 491 return null;
483 } 492 }
484 493
485 return HashTableToGroupMembershipData(respData); 494 return HashTableToGroupMembershipData(respData);
486 } 495 }
487 496
488 497
489 public List<GroupMembershipData> GetAgentGroupMemberships(UUID AgentID) 498 public List<GroupMembershipData> GetAgentGroupMemberships(UUID AgentID)
@@ -533,8 +542,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
533 } 542 }
534 543
535 return Roles; 544 return Roles;
536
537
538 } 545 }
539 546
540 public List<GroupRolesData> GetGroupRoles(UUID GroupID) 547 public List<GroupRolesData> GetGroupRoles(UUID GroupID)
@@ -565,7 +572,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
565 } 572 }
566 573
567 return Roles; 574 return Roles;
568
569 } 575 }
570 576
571 private static GroupMembershipData HashTableToGroupMembershipData(Hashtable respData) 577 private static GroupMembershipData HashTableToGroupMembershipData(Hashtable respData)
@@ -633,7 +639,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
633 } 639 }
634 640
635 return members; 641 return members;
636
637 } 642 }
638 643
639 public List<GroupRoleMembersData> GetGroupRoleMembers(UUID GroupID) 644 public List<GroupRoleMembersData> GetGroupRoleMembers(UUID GroupID)
@@ -647,15 +652,15 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
647 652
648 if (!respData.Contains("error")) 653 if (!respData.Contains("error"))
649 { 654 {
650 foreach (Hashtable membership in respData.Values) 655 foreach (Hashtable membership in respData.Values)
651 { 656 {
652 GroupRoleMembersData data = new GroupRoleMembersData(); 657 GroupRoleMembersData data = new GroupRoleMembersData();
653 658
654 data.MemberID = new UUID((string)membership["AgentID"]); 659 data.MemberID = new UUID((string)membership["AgentID"]);
655 data.RoleID = new UUID((string)membership["RoleID"]); 660 data.RoleID = new UUID((string)membership["RoleID"]);
656 661
657 members.Add(data); 662 members.Add(data);
658 } 663 }
659 } 664 }
660 return members; 665 return members;
661 } 666 }
@@ -697,8 +702,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
697 702
698 if (!respData.Contains("error")) 703 if (!respData.Contains("error"))
699 { 704 {
700 return null; 705 return null;
701 } 706 }
702 707
703 GroupNoticeInfo data = new GroupNoticeInfo(); 708 GroupNoticeInfo data = new GroupNoticeInfo();
704 data.GroupID = UUID.Parse((string)respData["GroupID"]); 709 data.GroupID = UUID.Parse((string)respData["GroupID"]);
@@ -799,11 +804,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
799 foreach (string line in lines) 804 foreach (string line in lines)
800 { 805 {
801 m_log.ErrorFormat("[GROUPDATA] {0}", line); 806 m_log.ErrorFormat("[GROUPDATA] {0}", line);
802 } 807 }
803
804 } 808 }
805 } 809 }
806
807 } 810 }
808 811
809 public class GroupNoticeInfo 812 public class GroupNoticeInfo
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsMessaging.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsMessaging.cs
index 34af325..b1b25aa 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsMessaging.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsMessaging.cs
@@ -229,31 +229,28 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
229 // Force? open the group session dialog??? 229 // Force? open the group session dialog???
230 IEventQueue eq = m_ActiveClients[msg.toAgentID].Scene.RequestModuleInterface<IEventQueue>(); 230 IEventQueue eq = m_ActiveClients[msg.toAgentID].Scene.RequestModuleInterface<IEventQueue>();
231 eq.ChatterboxInvitation( 231 eq.ChatterboxInvitation(
232 GroupID 232 GroupID,
233 , GroupInfo.GroupName 233 GroupInfo.GroupName,
234 , new UUID(msg.fromAgentID) 234 new UUID(msg.fromAgentID),
235 , msg.message, new UUID(msg.toAgentID) 235 msg.message, new UUID(msg.toAgentID),
236 , msg.fromAgentName 236 msg.fromAgentName,
237 , msg.dialog 237 msg.dialog,
238 , msg.timestamp 238 msg.timestamp,
239 , msg.offline==1 239 msg.offline == 1,
240 , (int)msg.ParentEstateID 240 (int)msg.ParentEstateID,
241 , msg.Position 241 msg.Position,
242 , 1 242 1,
243 , new UUID(msg.imSessionID) 243 new UUID(msg.imSessionID),
244 , msg.fromGroup 244 msg.fromGroup,
245 , Utils.StringToBytes(GroupInfo.GroupName) 245 Utils.StringToBytes(GroupInfo.GroupName));
246 );
247 246
248 eq.ChatterBoxSessionAgentListUpdates( 247 eq.ChatterBoxSessionAgentListUpdates(
249 new UUID(GroupID) 248 new UUID(GroupID),
250 , new UUID(msg.fromAgentID) 249 new UUID(msg.fromAgentID),
251 , new UUID(msg.toAgentID) 250 new UUID(msg.toAgentID),
252 , false //canVoiceChat 251 false, //canVoiceChat
253 , false //isModerator 252 false, //isModerator
254 , false //text mute 253 false); //text mute
255 );
256
257 } 254 }
258 } 255 }
259 } 256 }
@@ -285,13 +282,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
285 282
286 IEventQueue queue = remoteClient.Scene.RequestModuleInterface<IEventQueue>(); 283 IEventQueue queue = remoteClient.Scene.RequestModuleInterface<IEventQueue>();
287 queue.ChatterBoxSessionAgentListUpdates( 284 queue.ChatterBoxSessionAgentListUpdates(
288 new UUID(GroupID) 285 new UUID(GroupID),
289 , new UUID(im.fromAgentID) 286 new UUID(im.fromAgentID),
290 , new UUID(im.toAgentID) 287 new UUID(im.toAgentID),
291 , false //canVoiceChat 288 false, //canVoiceChat
292 , false //isModerator 289 false, //isModerator
293 , false //text mute 290 false); //text mute
294 );
295 } 291 }
296 } 292 }
297 293
@@ -373,12 +369,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
373 msg.ParentEstateID = im.ParentEstateID; 369 msg.ParentEstateID = im.ParentEstateID;
374 msg.Position = im.Position; 370 msg.Position = im.Position;
375 msg.RegionID = im.RegionID; 371 msg.RegionID = im.RegionID;
376 msg.binaryBucket = new byte[1] { 0 }; 372 msg.binaryBucket = new byte[1]{0};
377 373
378 foreach (GroupMembersData member in m_GroupsModule.GroupMembersRequest(null, groupID)) 374 foreach (GroupMembersData member in m_GroupsModule.GroupMembersRequest(null, groupID))
379 { 375 {
380 msg.toAgentID = member.AgentID.Guid; 376 msg.toAgentID = member.AgentID.Guid;
381 m_MsgTransferModule.SendInstantMessage(msg, delegate(bool success) { }); 377 m_MsgTransferModule.SendInstantMessage(msg, delegate(bool success) {});
382 } 378 }
383 } 379 }
384 380
@@ -402,14 +398,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
402 bodyMap.Add("success", OSD.FromBoolean(true)); 398 bodyMap.Add("success", OSD.FromBoolean(true));
403 bodyMap.Add("session_info", sessionMap); 399 bodyMap.Add("session_info", sessionMap);
404 400
405
406 IEventQueue queue = remoteClient.Scene.RequestModuleInterface<IEventQueue>(); 401 IEventQueue queue = remoteClient.Scene.RequestModuleInterface<IEventQueue>();
407 402
408 if (queue != null) 403 if (queue != null)
409 { 404 {
410 queue.Enqueue(EventQueueHelper.buildEvent("ChatterBoxSessionStartReply", bodyMap), remoteClient.AgentId); 405 queue.Enqueue(EventQueueHelper.buildEvent("ChatterBoxSessionStartReply", bodyMap), remoteClient.AgentId);
411 } 406 }
412
413 } 407 }
414 408
415 409
@@ -428,6 +422,5 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
428 m_log.WarnFormat("[GROUPS-MESSAGING] IM: binaryBucket({0})", OpenMetaverse.Utils.BytesToHexString(im.binaryBucket, "BinaryBucket")); 422 m_log.WarnFormat("[GROUPS-MESSAGING] IM: binaryBucket({0})", OpenMetaverse.Utils.BytesToHexString(im.binaryBucket, "BinaryBucket"));
429 } 423 }
430 } 424 }
431
432 } 425 }
433} 426}
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsModule.cs
index 3d9477f..9ba78c5 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsModule.cs
@@ -155,13 +155,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
155 return; 155 return;
156 } 156 }
157 157
158
159 m_sceneList.Add(scene); 158 m_sceneList.Add(scene);
160 159
161 scene.EventManager.OnNewClient += OnNewClient; 160 scene.EventManager.OnNewClient += OnNewClient;
162 scene.EventManager.OnClientClosed += OnClientClosed; 161 scene.EventManager.OnClientClosed += OnClientClosed;
163 scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage; 162 scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage;
164
165 } 163 }
166 164
167 public void RemoveRegion(Scene scene) 165 public void RemoveRegion(Scene scene)