diff options
author | UbitUmarov | 2015-09-01 14:54:35 +0100 |
---|---|---|
committer | UbitUmarov | 2015-09-01 14:54:35 +0100 |
commit | 371c9dd2af01a2e7422ec901ee1f80757284a78c (patch) | |
tree | 058d2a513cacb12efcce0c0df0ae14ad135dbfe2 /OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs | |
parent | remove lixo (diff) | |
parent | dont change camera on crossings (diff) | |
download | opensim-SC-371c9dd2af01a2e7422ec901ee1f80757284a78c.zip opensim-SC-371c9dd2af01a2e7422ec901ee1f80757284a78c.tar.gz opensim-SC-371c9dd2af01a2e7422ec901ee1f80757284a78c.tar.bz2 opensim-SC-371c9dd2af01a2e7422ec901ee1f80757284a78c.tar.xz |
bad merge?
Diffstat (limited to 'OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs')
-rw-r--r-- | OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs | 33 |
1 files changed, 25 insertions, 8 deletions
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs index dff3f78..0512e48 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs | |||
@@ -206,6 +206,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
206 | } | 206 | } |
207 | 207 | ||
208 | scene.EventManager.OnNewClient += OnNewClient; | 208 | scene.EventManager.OnNewClient += OnNewClient; |
209 | scene.EventManager.OnMakeRootAgent += OnMakeRoot; | ||
210 | scene.EventManager.OnMakeChildAgent += OnMakeChild; | ||
209 | scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage; | 211 | scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage; |
210 | // The InstantMessageModule itself doesn't do this, | 212 | // The InstantMessageModule itself doesn't do this, |
211 | // so lets see if things explode if we don't do it | 213 | // so lets see if things explode if we don't do it |
@@ -256,19 +258,34 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
256 | #endregion | 258 | #endregion |
257 | 259 | ||
258 | #region EventHandlers | 260 | #region EventHandlers |
261 | |||
262 | private void OnMakeRoot(ScenePresence sp) | ||
263 | { | ||
264 | if (m_debugEnabled) m_log.DebugFormat("[Groups]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); | ||
265 | |||
266 | sp.ControllingClient.OnUUIDGroupNameRequest += HandleUUIDGroupNameRequest; | ||
267 | // Used for Notices and Group Invites/Accept/Reject | ||
268 | sp.ControllingClient.OnInstantMessage += OnInstantMessage; | ||
269 | // Send client their groups information. | ||
270 | // SendAgentGroupDataUpdate(sp.ControllingClient, sp.UUID); | ||
271 | // only send data viwer will ask rest later | ||
272 | OnAgentDataUpdateRequest(sp.ControllingClient, sp.UUID, sp.UUID); | ||
273 | } | ||
274 | |||
275 | private void OnMakeChild(ScenePresence sp) | ||
276 | { | ||
277 | if (m_debugEnabled) m_log.DebugFormat("[Groups]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); | ||
278 | |||
279 | sp.ControllingClient.OnUUIDGroupNameRequest -= HandleUUIDGroupNameRequest; | ||
280 | sp.ControllingClient.OnInstantMessage -= OnInstantMessage; | ||
281 | } | ||
282 | |||
259 | private void OnNewClient(IClientAPI client) | 283 | private void OnNewClient(IClientAPI client) |
260 | { | 284 | { |
261 | if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); | 285 | if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); |
262 | 286 | ||
263 | client.OnUUIDGroupNameRequest += HandleUUIDGroupNameRequest; | ||
264 | client.OnAgentDataUpdateRequest += OnAgentDataUpdateRequest; | 287 | client.OnAgentDataUpdateRequest += OnAgentDataUpdateRequest; |
265 | client.OnRequestAvatarProperties += OnRequestAvatarProperties; | 288 | client.OnRequestAvatarProperties += OnRequestAvatarProperties; |
266 | |||
267 | // Used for Notices and Group Invites/Accept/Reject | ||
268 | client.OnInstantMessage += OnInstantMessage; | ||
269 | |||
270 | // Send client their groups information. | ||
271 | SendAgentGroupDataUpdate(client, client.AgentId); | ||
272 | } | 289 | } |
273 | 290 | ||
274 | private void OnRequestAvatarProperties(IClientAPI remoteClient, UUID avatarID) | 291 | private void OnRequestAvatarProperties(IClientAPI remoteClient, UUID avatarID) |
@@ -984,7 +1001,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
984 | msg.toAgentID = agentID.Guid; | 1001 | msg.toAgentID = agentID.Guid; |
985 | msg.dialog = dialog; | 1002 | msg.dialog = dialog; |
986 | msg.fromGroup = true; | 1003 | msg.fromGroup = true; |
987 | msg.offline = (byte)0; | 1004 | msg.offline = (byte)1; // Allow this message to be stored for offline use |
988 | msg.ParentEstateID = 0; | 1005 | msg.ParentEstateID = 0; |
989 | msg.Position = Vector3.Zero; | 1006 | msg.Position = Vector3.Zero; |
990 | msg.RegionID = UUID.Zero.Guid; | 1007 | msg.RegionID = UUID.Zero.Guid; |