aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs')
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs54
1 files changed, 28 insertions, 26 deletions
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
index b1fd9ad..8d587b9 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
@@ -86,7 +86,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
86 private bool m_groupsEnabled = false; 86 private bool m_groupsEnabled = false;
87 private bool m_groupNoticesEnabled = true; 87 private bool m_groupNoticesEnabled = true;
88 private bool m_debugEnabled = false; 88 private bool m_debugEnabled = false;
89 private int m_levelGroupCreate = 0; 89 private int m_levelGroupCreate = 0;
90 90
91 #region Region Module interfaceBase Members 91 #region Region Module interfaceBase Members
92 92
@@ -116,9 +116,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
116 116
117 m_log.InfoFormat("[GROUPS]: Initializing {0}", this.Name); 117 m_log.InfoFormat("[GROUPS]: Initializing {0}", this.Name);
118 118
119 m_groupNoticesEnabled = groupsConfig.GetBoolean("NoticesEnabled", true); 119 m_groupNoticesEnabled = groupsConfig.GetBoolean("NoticesEnabled", true);
120 m_debugEnabled = groupsConfig.GetBoolean("DebugEnabled", false); 120 m_debugEnabled = groupsConfig.GetBoolean("DebugEnabled", false);
121 m_levelGroupCreate = groupsConfig.GetInt("LevelGroupCreate", 0); 121 m_levelGroupCreate = groupsConfig.GetInt("LevelGroupCreate", 0);
122 } 122 }
123 } 123 }
124 124
@@ -263,8 +263,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
263 sp.ControllingClient.OnUUIDGroupNameRequest += HandleUUIDGroupNameRequest; 263 sp.ControllingClient.OnUUIDGroupNameRequest += HandleUUIDGroupNameRequest;
264 // Used for Notices and Group Invites/Accept/Reject 264 // Used for Notices and Group Invites/Accept/Reject
265 sp.ControllingClient.OnInstantMessage += OnInstantMessage; 265 sp.ControllingClient.OnInstantMessage += OnInstantMessage;
266// comented out bc some viewers wrongly stoped suporting it 266
267// sp.ControllingClient.AddGenericPacketHandler("avatargroupsrequest", AvatarGroupsRequest); 267 // comented out because some viewers no longer suport it
268 // sp.ControllingClient.AddGenericPacketHandler("avatargroupsrequest", AvatarGroupsRequest);
268 269
269 // we should send a DataUpdate here for compatibility, 270 // we should send a DataUpdate here for compatibility,
270 // but this is a bad place and a bad thread to do it 271 // but this is a bad place and a bad thread to do it
@@ -288,6 +289,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
288 289
289 290
290 } 291 }
292
291/* this should be the right message to ask for other avatars groups 293/* this should be the right message to ask for other avatars groups
292 294
293 private void AvatarGroupsRequest(Object sender, string method, List<String> args) 295 private void AvatarGroupsRequest(Object sender, string method, List<String> args)
@@ -310,8 +312,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
310 } 312 }
311*/ 313*/
312 314
313// this should not be used to send groups memberships, but some viewers do expect it 315 // this should not be used to send groups memberships, but some viewers do expect it
314// it does send unnecessary memberships, when viewers just want other properties information 316 // it does send unnecessary memberships, when viewers just want other properties information
315 private void OnRequestAvatarProperties(IClientAPI remoteClient, UUID avatarID) 317 private void OnRequestAvatarProperties(IClientAPI remoteClient, UUID avatarID)
316 { 318 {
317 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 319 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
@@ -338,25 +340,25 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
338 client.OnInstantMessage -= OnInstantMessage; 340 client.OnInstantMessage -= OnInstantMessage;
339 } 341 }
340 342
341 /* 343/*
342 lock (m_ActiveClients) 344 lock (m_ActiveClients)
343 { 345 {
344 if (m_ActiveClients.ContainsKey(AgentId)) 346 if (m_ActiveClients.ContainsKey(AgentId))
345 { 347 {
346 IClientAPI client = m_ActiveClients[AgentId]; 348 IClientAPI client = m_ActiveClients[AgentId];
347 client.OnUUIDGroupNameRequest -= HandleUUIDGroupNameRequest; 349 client.OnUUIDGroupNameRequest -= HandleUUIDGroupNameRequest;
348 client.OnAgentDataUpdateRequest -= OnAgentDataUpdateRequest; 350 client.OnAgentDataUpdateRequest -= OnAgentDataUpdateRequest;
349 client.OnDirFindQuery -= OnDirFindQuery; 351 client.OnDirFindQuery -= OnDirFindQuery;
350 client.OnInstantMessage -= OnInstantMessage; 352 client.OnInstantMessage -= OnInstantMessage;
351 353
352 m_ActiveClients.Remove(AgentId); 354 m_ActiveClients.Remove(AgentId);
353 } 355 }
354 else 356 else
355 { 357 {
356 if (m_debugEnabled) m_log.WarnFormat("[GROUPS]: Client closed that wasn't registered here."); 358 if (m_debugEnabled) m_log.WarnFormat("[GROUPS]: Client closed that wasn't registered here.");
357 } 359 }
358 } 360 }
359 */ 361*/
360 } 362 }
361 363
362 private void OnAgentDataUpdateRequest(IClientAPI remoteClient, UUID dataForAgentID, UUID sessionID) 364 private void OnAgentDataUpdateRequest(IClientAPI remoteClient, UUID dataForAgentID, UUID sessionID)