aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules
diff options
context:
space:
mode:
authorDiva Canto2010-04-05 19:56:03 -0700
committerDiva Canto2010-04-05 19:56:03 -0700
commit80346ad2e246a363dcf4c9a2819b52b1d7a0739c (patch)
tree0812abc8aa88ab3f07641ec6e302154924d4aaaa /OpenSim/Region/OptionalModules
parent* In the async asset fetch method, cache check before firing any async code. ... (diff)
downloadopensim-SC-80346ad2e246a363dcf4c9a2819b52b1d7a0739c.zip
opensim-SC-80346ad2e246a363dcf4c9a2819b52b1d7a0739c.tar.gz
opensim-SC-80346ad2e246a363dcf4c9a2819b52b1d7a0739c.tar.bz2
opensim-SC-80346ad2e246a363dcf4c9a2819b52b1d7a0739c.tar.xz
* May fix mantis #4603.
* My local git wants to commit the groups files for line endings, I'm gonna let it do it.
Diffstat (limited to 'OpenSim/Region/OptionalModules')
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs128
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs6
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/IGroupsServicesConnector.cs12
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs104
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs144
5 files changed, 197 insertions, 197 deletions
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs
index 17a5349..185d44d 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs
@@ -49,9 +49,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
49 49
50 private List<Scene> m_sceneList = new List<Scene>(); 50 private List<Scene> m_sceneList = new List<Scene>();
51 51
52 private IMessageTransferModule m_msgTransferModule = null; 52 private IMessageTransferModule m_msgTransferModule = null;
53 53
54 private IGroupsServicesConnector m_groupData = null; 54 private IGroupsServicesConnector m_groupData = null;
55 55
56 // Config Options 56 // Config Options
57 private bool m_groupMessagingEnabled = false; 57 private bool m_groupMessagingEnabled = false;
@@ -108,13 +108,13 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
108 if (!m_groupMessagingEnabled) 108 if (!m_groupMessagingEnabled)
109 return; 109 return;
110 110
111 if (m_debugEnabled) m_log.DebugFormat("[GROUPS-MESSAGING]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 111 if (m_debugEnabled) m_log.DebugFormat("[GROUPS-MESSAGING]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
112 112
113 m_groupData = scene.RequestModuleInterface<IGroupsServicesConnector>(); 113 m_groupData = scene.RequestModuleInterface<IGroupsServicesConnector>();
114 114
115 // No groups module, no groups messaging 115 // No groups module, no groups messaging
116 if (m_groupData == null) 116 if (m_groupData == null)
117 { 117 {
118 m_log.Error("[GROUPS-MESSAGING]: Could not get IGroupsServicesConnector, GroupsMessagingModule is now disabled."); 118 m_log.Error("[GROUPS-MESSAGING]: Could not get IGroupsServicesConnector, GroupsMessagingModule is now disabled.");
119 Close(); 119 Close();
120 m_groupMessagingEnabled = false; 120 m_groupMessagingEnabled = false;
@@ -190,9 +190,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
190 190
191 #endregion 191 #endregion
192 192
193 /// <summary> 193 /// <summary>
194 /// Not really needed, but does confirm that the group exists. 194 /// Not really needed, but does confirm that the group exists.
195 /// </summary> 195 /// </summary>
196 public bool StartGroupChatSession(UUID agentID, UUID groupID) 196 public bool StartGroupChatSession(UUID agentID, UUID groupID)
197 { 197 {
198 if (m_debugEnabled) 198 if (m_debugEnabled)
@@ -201,7 +201,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
201 GroupRecord groupInfo = m_groupData.GetGroupRecord(agentID, groupID, null); 201 GroupRecord groupInfo = m_groupData.GetGroupRecord(agentID, groupID, null);
202 202
203 if (groupInfo != null) 203 if (groupInfo != null)
204 { 204 {
205 return true; 205 return true;
206 } 206 }
207 else 207 else
@@ -213,11 +213,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
213 public void SendMessageToGroup(GridInstantMessage im, UUID groupID) 213 public void SendMessageToGroup(GridInstantMessage im, UUID groupID)
214 { 214 {
215 if (m_debugEnabled) 215 if (m_debugEnabled)
216 m_log.DebugFormat("[GROUPS-MESSAGING]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 216 m_log.DebugFormat("[GROUPS-MESSAGING]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
217 217
218 218
219 foreach (GroupMembersData member in m_groupData.GetGroupMembers(UUID.Zero, groupID)) 219 foreach (GroupMembersData member in m_groupData.GetGroupMembers(UUID.Zero, groupID))
220 { 220 {
221 if (m_groupData.hasAgentDroppedGroupChatSession(member.AgentID, groupID)) 221 if (m_groupData.hasAgentDroppedGroupChatSession(member.AgentID, groupID))
222 { 222 {
223 // Don't deliver messages to people who have dropped this session 223 // Don't deliver messages to people who have dropped this session
@@ -226,7 +226,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
226 } 226 }
227 227
228 // Copy Message 228 // Copy Message
229 GridInstantMessage msg = new GridInstantMessage(); 229 GridInstantMessage msg = new GridInstantMessage();
230 msg.imSessionID = groupID.Guid; 230 msg.imSessionID = groupID.Guid;
231 msg.fromAgentName = im.fromAgentName; 231 msg.fromAgentName = im.fromAgentName;
232 msg.message = im.message; 232 msg.message = im.message;
@@ -259,13 +259,13 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
259 } 259 }
260 } 260 }
261 261
262 #region SimGridEventHandlers 262 #region SimGridEventHandlers
263 263
264 void OnClientLogin(IClientAPI client) 264 void OnClientLogin(IClientAPI client)
265 { 265 {
266 if (m_debugEnabled) m_log.DebugFormat("[GROUPS-MESSAGING]: OnInstantMessage registered for {0}", client.Name); 266 if (m_debugEnabled) m_log.DebugFormat("[GROUPS-MESSAGING]: OnInstantMessage registered for {0}", client.Name);
267 267
268 268
269 } 269 }
270 270
271 private void OnNewClient(IClientAPI client) 271 private void OnNewClient(IClientAPI client)
@@ -303,28 +303,28 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
303 303
304 private void ProcessMessageFromGroupSession(GridInstantMessage msg) 304 private void ProcessMessageFromGroupSession(GridInstantMessage msg)
305 { 305 {
306 if (m_debugEnabled) m_log.DebugFormat("[GROUPS-MESSAGING]: Session message from {0} going to agent {1}", msg.fromAgentName, msg.toAgentID); 306 if (m_debugEnabled) m_log.DebugFormat("[GROUPS-MESSAGING]: Session message from {0} going to agent {1}", msg.fromAgentName, msg.toAgentID);
307 307
308 UUID AgentID = new UUID(msg.fromAgentID); 308 UUID AgentID = new UUID(msg.fromAgentID);
309 UUID GroupID = new UUID(msg.imSessionID); 309 UUID GroupID = new UUID(msg.imSessionID);
310 310
311 switch (msg.dialog) 311 switch (msg.dialog)
312 { 312 {
313 case (byte)InstantMessageDialog.SessionAdd: 313 case (byte)InstantMessageDialog.SessionAdd:
314 m_groupData.AgentInvitedToGroupChatSession(AgentID, GroupID); 314 m_groupData.AgentInvitedToGroupChatSession(AgentID, GroupID);
315 break; 315 break;
316 316
317 case (byte)InstantMessageDialog.SessionDrop: 317 case (byte)InstantMessageDialog.SessionDrop:
318 m_groupData.AgentDroppedFromGroupChatSession(AgentID, GroupID); 318 m_groupData.AgentDroppedFromGroupChatSession(AgentID, GroupID);
319 break; 319 break;
320 320
321 case (byte)InstantMessageDialog.SessionSend: 321 case (byte)InstantMessageDialog.SessionSend:
322 if (!m_groupData.hasAgentDroppedGroupChatSession(AgentID, GroupID) 322 if (!m_groupData.hasAgentDroppedGroupChatSession(AgentID, GroupID)
323 && !m_groupData.hasAgentBeenInvitedToGroupChatSession(AgentID, GroupID) 323 && !m_groupData.hasAgentBeenInvitedToGroupChatSession(AgentID, GroupID)
324 ) 324 )
325 { 325 {
326 // Agent not in session and hasn't dropped from session 326 // Agent not in session and hasn't dropped from session
327 // Add them to the session for now, and Invite them 327 // Add them to the session for now, and Invite them
328 m_groupData.AgentInvitedToGroupChatSession(AgentID, GroupID); 328 m_groupData.AgentInvitedToGroupChatSession(AgentID, GroupID);
329 329
330 UUID toAgentID = new UUID(msg.toAgentID); 330 UUID toAgentID = new UUID(msg.toAgentID);
@@ -336,10 +336,10 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
336 { 336 {
337 if (m_debugEnabled) m_log.DebugFormat("[GROUPS-MESSAGING]: Sending chatterbox invite instant message"); 337 if (m_debugEnabled) m_log.DebugFormat("[GROUPS-MESSAGING]: Sending chatterbox invite instant message");
338 338
339 // Force? open the group session dialog??? 339 // Force? open the group session dialog???
340 // and simultanously deliver the message, so we don't need to do a seperate client.SendInstantMessage(msg); 340 // and simultanously deliver the message, so we don't need to do a seperate client.SendInstantMessage(msg);
341 IEventQueue eq = activeClient.Scene.RequestModuleInterface<IEventQueue>(); 341 IEventQueue eq = activeClient.Scene.RequestModuleInterface<IEventQueue>();
342 eq.ChatterboxInvitation( 342 eq.ChatterboxInvitation(
343 GroupID 343 GroupID
344 , groupInfo.GroupName 344 , groupInfo.GroupName
345 , new UUID(msg.fromAgentID) 345 , new UUID(msg.fromAgentID)
@@ -357,7 +357,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
357 , Utils.StringToBytes(groupInfo.GroupName) 357 , Utils.StringToBytes(groupInfo.GroupName)
358 ); 358 );
359 359
360 eq.ChatterBoxSessionAgentListUpdates( 360 eq.ChatterBoxSessionAgentListUpdates(
361 new UUID(GroupID) 361 new UUID(GroupID)
362 , new UUID(msg.fromAgentID) 362 , new UUID(msg.fromAgentID)
363 , new UUID(msg.toAgentID) 363 , new UUID(msg.toAgentID)
@@ -367,7 +367,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
367 ); 367 );
368 } 368 }
369 } 369 }
370 } 370 }
371 else if (!m_groupData.hasAgentDroppedGroupChatSession(AgentID, GroupID)) 371 else if (!m_groupData.hasAgentDroppedGroupChatSession(AgentID, GroupID))
372 { 372 {
373 // User hasn't dropped, so they're in the session, 373 // User hasn't dropped, so they're in the session,
@@ -394,8 +394,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
394 394
395 #endregion 395 #endregion
396 396
397 397
398 #region ClientEvents 398 #region ClientEvents
399 private void OnInstantMessage(IClientAPI remoteClient, GridInstantMessage im) 399 private void OnInstantMessage(IClientAPI remoteClient, GridInstantMessage im)
400 { 400 {
401 if (m_debugEnabled) 401 if (m_debugEnabled)
@@ -407,23 +407,23 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
407 407
408 // Start group IM session 408 // Start group IM session
409 if ((im.dialog == (byte)InstantMessageDialog.SessionGroupStart)) 409 if ((im.dialog == (byte)InstantMessageDialog.SessionGroupStart))
410 { 410 {
411 if (m_debugEnabled) m_log.InfoFormat("[GROUPS-MESSAGING]: imSessionID({0}) toAgentID({1})", im.imSessionID, im.toAgentID); 411 if (m_debugEnabled) m_log.InfoFormat("[GROUPS-MESSAGING]: imSessionID({0}) toAgentID({1})", im.imSessionID, im.toAgentID);
412 412
413 UUID GroupID = new UUID(im.imSessionID); 413 UUID GroupID = new UUID(im.imSessionID);
414 UUID AgentID = new UUID(im.fromAgentID); 414 UUID AgentID = new UUID(im.fromAgentID);
415 415
416 GroupRecord groupInfo = m_groupData.GetGroupRecord(UUID.Zero, GroupID, null); 416 GroupRecord groupInfo = m_groupData.GetGroupRecord(UUID.Zero, GroupID, null);
417 417
418 if (groupInfo != null) 418 if (groupInfo != null)
419 { 419 {
420 m_groupData.AgentInvitedToGroupChatSession(AgentID, GroupID); 420 m_groupData.AgentInvitedToGroupChatSession(AgentID, GroupID);
421 421
422 ChatterBoxSessionStartReplyViaCaps(remoteClient, groupInfo.GroupName, GroupID); 422 ChatterBoxSessionStartReplyViaCaps(remoteClient, groupInfo.GroupName, GroupID);
423 423
424 IEventQueue queue = remoteClient.Scene.RequestModuleInterface<IEventQueue>(); 424 IEventQueue queue = remoteClient.Scene.RequestModuleInterface<IEventQueue>();
425 queue.ChatterBoxSessionAgentListUpdates( 425 queue.ChatterBoxSessionAgentListUpdates(
426 GroupID 426 GroupID
427 , AgentID 427 , AgentID
428 , new UUID(im.toAgentID) 428 , new UUID(im.toAgentID)
429 , false //canVoiceChat 429 , false //canVoiceChat
@@ -435,16 +435,16 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
435 435
436 // Send a message from locally connected client to a group 436 // Send a message from locally connected client to a group
437 if ((im.dialog == (byte)InstantMessageDialog.SessionSend)) 437 if ((im.dialog == (byte)InstantMessageDialog.SessionSend))
438 { 438 {
439 UUID GroupID = new UUID(im.imSessionID); 439 UUID GroupID = new UUID(im.imSessionID);
440 UUID AgentID = new UUID(im.fromAgentID); 440 UUID AgentID = new UUID(im.fromAgentID);
441 441
442 if (m_debugEnabled) 442 if (m_debugEnabled)
443 m_log.DebugFormat("[GROUPS-MESSAGING]: Send message to session for group {0} with session ID {1}", GroupID, im.imSessionID.ToString()); 443 m_log.DebugFormat("[GROUPS-MESSAGING]: Send message to session for group {0} with session ID {1}", GroupID, im.imSessionID.ToString());
444 444
445 //If this agent is sending a message, then they want to be in the session 445 //If this agent is sending a message, then they want to be in the session
446 m_groupData.AgentInvitedToGroupChatSession(AgentID, GroupID); 446 m_groupData.AgentInvitedToGroupChatSession(AgentID, GroupID);
447 447
448 SendMessageToGroup(im, GroupID); 448 SendMessageToGroup(im, GroupID);
449 } 449 }
450 } 450 }
@@ -501,7 +501,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
501 /// Try to find an active IClientAPI reference for agentID giving preference to root connections 501 /// Try to find an active IClientAPI reference for agentID giving preference to root connections
502 /// </summary> 502 /// </summary>
503 private IClientAPI GetActiveClient(UUID agentID) 503 private IClientAPI GetActiveClient(UUID agentID)
504 { 504 {
505 if (m_debugEnabled) m_log.WarnFormat("[GROUPS-MESSAGING]: Looking for local client {0}", agentID); 505 if (m_debugEnabled) m_log.WarnFormat("[GROUPS-MESSAGING]: Looking for local client {0}", agentID);
506 506
507 IClientAPI child = null; 507 IClientAPI child = null;
@@ -514,26 +514,26 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
514 { 514 {
515 ScenePresence user = (ScenePresence)scene.Entities[agentID]; 515 ScenePresence user = (ScenePresence)scene.Entities[agentID];
516 if (!user.IsChildAgent) 516 if (!user.IsChildAgent)
517 { 517 {
518 if (m_debugEnabled) m_log.WarnFormat("[GROUPS-MESSAGING]: Found root agent for client : {0}", user.ControllingClient.Name); 518 if (m_debugEnabled) m_log.WarnFormat("[GROUPS-MESSAGING]: Found root agent for client : {0}", user.ControllingClient.Name);
519 return user.ControllingClient; 519 return user.ControllingClient;
520 } 520 }
521 else 521 else
522 { 522 {
523 if (m_debugEnabled) m_log.WarnFormat("[GROUPS-MESSAGING]: Found child agent for client : {0}", user.ControllingClient.Name); 523 if (m_debugEnabled) m_log.WarnFormat("[GROUPS-MESSAGING]: Found child agent for client : {0}", user.ControllingClient.Name);
524 child = user.ControllingClient; 524 child = user.ControllingClient;
525 } 525 }
526 } 526 }
527 } 527 }
528 528
529 // If we didn't find a root, then just return whichever child we found, or null if none 529 // If we didn't find a root, then just return whichever child we found, or null if none
530 if (child == null) 530 if (child == null)
531 { 531 {
532 if (m_debugEnabled) m_log.WarnFormat("[GROUPS-MESSAGING]: Could not find local client for agent : {0}", agentID); 532 if (m_debugEnabled) m_log.WarnFormat("[GROUPS-MESSAGING]: Could not find local client for agent : {0}", agentID);
533 } 533 }
534 else 534 else
535 { 535 {
536 if (m_debugEnabled) m_log.WarnFormat("[GROUPS-MESSAGING]: Returning child agent for client : {0}", child.Name); 536 if (m_debugEnabled) m_log.WarnFormat("[GROUPS-MESSAGING]: Returning child agent for client : {0}", child.Name);
537 } 537 }
538 return child; 538 return child;
539 } 539 }
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
index e5dab93..56c0d98 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
@@ -175,13 +175,13 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
175 } 175 }
176 176
177 scene.EventManager.OnNewClient += OnNewClient; 177 scene.EventManager.OnNewClient += OnNewClient;
178 scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage; 178 scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage;
179 // The InstantMessageModule itself doesn't do this, 179 // The InstantMessageModule itself doesn't do this,
180 // so lets see if things explode if we don't do it 180 // so lets see if things explode if we don't do it
181 // scene.EventManager.OnClientClosed += OnClientClosed; 181 // scene.EventManager.OnClientClosed += OnClientClosed;
182 182
183 } 183 }
184 184
185 public void RemoveRegion(Scene scene) 185 public void RemoveRegion(Scene scene)
186 { 186 {
187 if (!m_groupsEnabled) 187 if (!m_groupsEnabled)
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/IGroupsServicesConnector.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/IGroupsServicesConnector.cs
index 54ffc81..a046e09 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/IGroupsServicesConnector.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/IGroupsServicesConnector.cs
@@ -70,12 +70,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
70 70
71 void AddGroupNotice(UUID RequestingAgentID, UUID groupID, UUID noticeID, string fromName, string subject, string message, byte[] binaryBucket); 71 void AddGroupNotice(UUID RequestingAgentID, UUID groupID, UUID noticeID, string fromName, string subject, string message, byte[] binaryBucket);
72 GroupNoticeInfo GetGroupNotice(UUID RequestingAgentID, UUID noticeID); 72 GroupNoticeInfo GetGroupNotice(UUID RequestingAgentID, UUID noticeID);
73 List<GroupNoticeData> GetGroupNotices(UUID RequestingAgentID, UUID GroupID); 73 List<GroupNoticeData> GetGroupNotices(UUID RequestingAgentID, UUID GroupID);
74 74
75 void ResetAgentGroupChatSessions(UUID agentID); 75 void ResetAgentGroupChatSessions(UUID agentID);
76 bool hasAgentBeenInvitedToGroupChatSession(UUID agentID, UUID groupID); 76 bool hasAgentBeenInvitedToGroupChatSession(UUID agentID, UUID groupID);
77 bool hasAgentDroppedGroupChatSession(UUID agentID, UUID groupID); 77 bool hasAgentDroppedGroupChatSession(UUID agentID, UUID groupID);
78 void AgentDroppedFromGroupChatSession(UUID agentID, UUID groupID); 78 void AgentDroppedFromGroupChatSession(UUID agentID, UUID groupID);
79 void AgentInvitedToGroupChatSession(UUID agentID, UUID groupID); 79 void AgentInvitedToGroupChatSession(UUID agentID, UUID groupID);
80 } 80 }
81 81
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs
index 4867c01..669373f 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs
@@ -203,12 +203,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
203 return; 203 return;
204 } 204 }
205 205
206 m_log.InfoFormat("[GROUPS-CONNECTOR]: Initializing {0}", this.Name); 206 m_log.InfoFormat("[GROUPS-CONNECTOR]: Initializing {0}", this.Name);
207 207
208 m_groupsServerURI = groupsConfig.GetString("GroupsServerURI", string.Empty); 208 m_groupsServerURI = groupsConfig.GetString("GroupsServerURI", string.Empty);
209 if ((m_groupsServerURI == null) || 209 if ((m_groupsServerURI == null) ||
210 (m_groupsServerURI == string.Empty)) 210 (m_groupsServerURI == string.Empty))
211 { 211 {
212 m_log.ErrorFormat("Please specify a valid Simian Server for GroupsServerURI in OpenSim.ini, [Groups]"); 212 m_log.ErrorFormat("Please specify a valid Simian Server for GroupsServerURI in OpenSim.ini, [Groups]");
213 m_connectorEnabled = false; 213 m_connectorEnabled = false;
214 return; 214 return;
@@ -1000,53 +1000,53 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
1000 SimianAddGeneric(groupID, "GroupNotice", noticeID.ToString(), Notice); 1000 SimianAddGeneric(groupID, "GroupNotice", noticeID.ToString(), Notice);
1001 1001
1002 } 1002 }
1003 #endregion 1003 #endregion
1004 1004
1005 #region GroupSessionTracking 1005 #region GroupSessionTracking
1006 1006
1007 public void ResetAgentGroupChatSessions(UUID agentID) 1007 public void ResetAgentGroupChatSessions(UUID agentID)
1008 { 1008 {
1009 Dictionary<string, OSDMap> agentSessions; 1009 Dictionary<string, OSDMap> agentSessions;
1010 1010
1011 if (SimianGetGenericEntries(agentID, "GroupSessionDropped", out agentSessions)) 1011 if (SimianGetGenericEntries(agentID, "GroupSessionDropped", out agentSessions))
1012 { 1012 {
1013 foreach (string GroupID in agentSessions.Keys) 1013 foreach (string GroupID in agentSessions.Keys)
1014 { 1014 {
1015 SimianRemoveGenericEntry(agentID, "GroupSessionDropped", GroupID); 1015 SimianRemoveGenericEntry(agentID, "GroupSessionDropped", GroupID);
1016 } 1016 }
1017 } 1017 }
1018 1018
1019 if (SimianGetGenericEntries(agentID, "GroupSessionInvited", out agentSessions)) 1019 if (SimianGetGenericEntries(agentID, "GroupSessionInvited", out agentSessions))
1020 { 1020 {
1021 foreach (string GroupID in agentSessions.Keys) 1021 foreach (string GroupID in agentSessions.Keys)
1022 { 1022 {
1023 SimianRemoveGenericEntry(agentID, "GroupSessionInvited", GroupID); 1023 SimianRemoveGenericEntry(agentID, "GroupSessionInvited", GroupID);
1024 } 1024 }
1025 } 1025 }
1026 } 1026 }
1027 1027
1028 public bool hasAgentDroppedGroupChatSession(UUID agentID, UUID groupID) 1028 public bool hasAgentDroppedGroupChatSession(UUID agentID, UUID groupID)
1029 { 1029 {
1030 OSDMap session; 1030 OSDMap session;
1031 return SimianGetGenericEntry(agentID, "GroupSessionDropped", groupID.ToString(), out session); 1031 return SimianGetGenericEntry(agentID, "GroupSessionDropped", groupID.ToString(), out session);
1032 } 1032 }
1033 1033
1034 public void AgentDroppedFromGroupChatSession(UUID agentID, UUID groupID) 1034 public void AgentDroppedFromGroupChatSession(UUID agentID, UUID groupID)
1035 { 1035 {
1036 SimianAddGeneric(agentID, "GroupSessionDropped", groupID.ToString(), new OSDMap()); 1036 SimianAddGeneric(agentID, "GroupSessionDropped", groupID.ToString(), new OSDMap());
1037 } 1037 }
1038 1038
1039 public void AgentInvitedToGroupChatSession(UUID agentID, UUID groupID) 1039 public void AgentInvitedToGroupChatSession(UUID agentID, UUID groupID)
1040 { 1040 {
1041 SimianAddGeneric(agentID, "GroupSessionInvited", groupID.ToString(), new OSDMap()); 1041 SimianAddGeneric(agentID, "GroupSessionInvited", groupID.ToString(), new OSDMap());
1042 } 1042 }
1043 1043
1044 public bool hasAgentBeenInvitedToGroupChatSession(UUID agentID, UUID groupID) 1044 public bool hasAgentBeenInvitedToGroupChatSession(UUID agentID, UUID groupID)
1045 { 1045 {
1046 OSDMap session; 1046 OSDMap session;
1047 return SimianGetGenericEntry(agentID, "GroupSessionDropped", groupID.ToString(), out session); 1047 return SimianGetGenericEntry(agentID, "GroupSessionDropped", groupID.ToString(), out session);
1048 } 1048 }
1049 1049
1050 #endregion 1050 #endregion
1051 1051
1052 private void EnsureRoleNotSelectedByMember(UUID groupID, UUID roleID, UUID userID) 1052 private void EnsureRoleNotSelectedByMember(UUID groupID, UUID roleID, UUID userID)
@@ -1321,8 +1321,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
1321 return false; 1321 return false;
1322 } 1322 }
1323 } 1323 }
1324 #endregion 1324 #endregion
1325 1325
1326 } 1326 }
1327 1327
1328} 1328}
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs
index 8e7aa68..523dfbe 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs
@@ -68,14 +68,14 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
68 private string m_groupReadKey = string.Empty; 68 private string m_groupReadKey = string.Empty;
69 private string m_groupWriteKey = string.Empty; 69 private string m_groupWriteKey = string.Empty;
70 70
71 private IUserAccountService m_accountService = null; 71 private IUserAccountService m_accountService = null;
72 72
73 // Used to track which agents are have dropped from a group chat session 73 // Used to track which agents are have dropped from a group chat session
74 // Should be reset per agent, on logon 74 // Should be reset per agent, on logon
75 // TODO: move this to Flotsam XmlRpc Service 75 // TODO: move this to Flotsam XmlRpc Service
76 // SessionID, List<AgentID> 76 // SessionID, List<AgentID>
77 private Dictionary<UUID, List<UUID>> m_groupsAgentsDroppedFromChatSession = new Dictionary<UUID, List<UUID>>(); 77 private Dictionary<UUID, List<UUID>> m_groupsAgentsDroppedFromChatSession = new Dictionary<UUID, List<UUID>>();
78 private Dictionary<UUID, List<UUID>> m_groupsAgentsInvitedToChatSession = new Dictionary<UUID, List<UUID>>(); 78 private Dictionary<UUID, List<UUID>> m_groupsAgentsInvitedToChatSession = new Dictionary<UUID, List<UUID>>();
79 79
80 80
81 #region IRegionModuleBase Members 81 #region IRegionModuleBase Members
@@ -111,12 +111,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
111 return; 111 return;
112 } 112 }
113 113
114 m_log.InfoFormat("[GROUPS-CONNECTOR]: Initializing {0}", this.Name); 114 m_log.InfoFormat("[GROUPS-CONNECTOR]: Initializing {0}", this.Name);
115 115
116 m_groupsServerURI = groupsConfig.GetString("GroupsServerURI", string.Empty); 116 m_groupsServerURI = groupsConfig.GetString("GroupsServerURI", string.Empty);
117 if ((m_groupsServerURI == null) || 117 if ((m_groupsServerURI == null) ||
118 (m_groupsServerURI == string.Empty)) 118 (m_groupsServerURI == string.Empty))
119 { 119 {
120 m_log.ErrorFormat("Please specify a valid URL for GroupsServerURI in OpenSim.ini, [Groups]"); 120 m_log.ErrorFormat("Please specify a valid URL for GroupsServerURI in OpenSim.ini, [Groups]");
121 m_connectorEnabled = false; 121 m_connectorEnabled = false;
122 return; 122 return;
@@ -766,67 +766,67 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
766 766
767 767
768 768
769 #endregion 769 #endregion
770 770
771 #region GroupSessionTracking 771 #region GroupSessionTracking
772 772
773 public void ResetAgentGroupChatSessions(UUID agentID) 773 public void ResetAgentGroupChatSessions(UUID agentID)
774 { 774 {
775 foreach (List<UUID> agentList in m_groupsAgentsDroppedFromChatSession.Values) 775 foreach (List<UUID> agentList in m_groupsAgentsDroppedFromChatSession.Values)
776 { 776 {
777 agentList.Remove(agentID); 777 agentList.Remove(agentID);
778 } 778 }
779 } 779 }
780 780
781 public bool hasAgentBeenInvitedToGroupChatSession(UUID agentID, UUID groupID) 781 public bool hasAgentBeenInvitedToGroupChatSession(UUID agentID, UUID groupID)
782 { 782 {
783 // If we're tracking this group, and we can find them in the tracking, then they've been invited 783 // If we're tracking this group, and we can find them in the tracking, then they've been invited
784 return m_groupsAgentsInvitedToChatSession.ContainsKey(groupID) 784 return m_groupsAgentsInvitedToChatSession.ContainsKey(groupID)
785 && m_groupsAgentsInvitedToChatSession[groupID].Contains(agentID); 785 && m_groupsAgentsInvitedToChatSession[groupID].Contains(agentID);
786 } 786 }
787 787
788 public bool hasAgentDroppedGroupChatSession(UUID agentID, UUID groupID) 788 public bool hasAgentDroppedGroupChatSession(UUID agentID, UUID groupID)
789 { 789 {
790 // If we're tracking drops for this group, 790 // If we're tracking drops for this group,
791 // and we find them, well... then they've dropped 791 // and we find them, well... then they've dropped
792 return m_groupsAgentsDroppedFromChatSession.ContainsKey(groupID) 792 return m_groupsAgentsDroppedFromChatSession.ContainsKey(groupID)
793 && m_groupsAgentsDroppedFromChatSession[groupID].Contains(agentID); 793 && m_groupsAgentsDroppedFromChatSession[groupID].Contains(agentID);
794 } 794 }
795 795
796 public void AgentDroppedFromGroupChatSession(UUID agentID, UUID groupID) 796 public void AgentDroppedFromGroupChatSession(UUID agentID, UUID groupID)
797 { 797 {
798 if (m_groupsAgentsDroppedFromChatSession.ContainsKey(groupID)) 798 if (m_groupsAgentsDroppedFromChatSession.ContainsKey(groupID))
799 { 799 {
800 // If not in dropped list, add 800 // If not in dropped list, add
801 if (!m_groupsAgentsDroppedFromChatSession[groupID].Contains(agentID)) 801 if (!m_groupsAgentsDroppedFromChatSession[groupID].Contains(agentID))
802 { 802 {
803 m_groupsAgentsDroppedFromChatSession[groupID].Add(agentID); 803 m_groupsAgentsDroppedFromChatSession[groupID].Add(agentID);
804 } 804 }
805 } 805 }
806 } 806 }
807 807
808 public void AgentInvitedToGroupChatSession(UUID agentID, UUID groupID) 808 public void AgentInvitedToGroupChatSession(UUID agentID, UUID groupID)
809 { 809 {
810 // Add Session Status if it doesn't exist for this session 810 // Add Session Status if it doesn't exist for this session
811 CreateGroupChatSessionTracking(groupID); 811 CreateGroupChatSessionTracking(groupID);
812 812
813 // If nessesary, remove from dropped list 813 // If nessesary, remove from dropped list
814 if (m_groupsAgentsDroppedFromChatSession[groupID].Contains(agentID)) 814 if (m_groupsAgentsDroppedFromChatSession[groupID].Contains(agentID))
815 { 815 {
816 m_groupsAgentsDroppedFromChatSession[groupID].Remove(agentID); 816 m_groupsAgentsDroppedFromChatSession[groupID].Remove(agentID);
817 } 817 }
818 } 818 }
819 819
820 private void CreateGroupChatSessionTracking(UUID groupID) 820 private void CreateGroupChatSessionTracking(UUID groupID)
821 { 821 {
822 if (!m_groupsAgentsDroppedFromChatSession.ContainsKey(groupID)) 822 if (!m_groupsAgentsDroppedFromChatSession.ContainsKey(groupID))
823 { 823 {
824 m_groupsAgentsDroppedFromChatSession.Add(groupID, new List<UUID>()); 824 m_groupsAgentsDroppedFromChatSession.Add(groupID, new List<UUID>());
825 m_groupsAgentsInvitedToChatSession.Add(groupID, new List<UUID>()); 825 m_groupsAgentsInvitedToChatSession.Add(groupID, new List<UUID>());
826 } 826 }
827 827
828 } 828 }
829 #endregion 829 #endregion
830 830
831 #region XmlRpcHashtableMarshalling 831 #region XmlRpcHashtableMarshalling
832 private GroupProfileData GroupProfileHashtableToGroupProfileData(Hashtable groupProfile) 832 private GroupProfileData GroupProfileHashtableToGroupProfileData(Hashtable groupProfile)