Add copyright headers. Formatting cleanup.

0.6.5-rc1
Jeff Ames 2009-04-27 05:22:44 +00:00
parent 6077bbda30
commit 8dbcfc70bf
8 changed files with 208 additions and 189 deletions

View File

@ -105,7 +105,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
} }
m_debugEnabled = groupsConfig.GetBoolean("XmlRpcDebugEnabled", true); m_debugEnabled = groupsConfig.GetBoolean("XmlRpcDebugEnabled", true);
} }
m_log.Info("[GROUPS-MESSAGING]: XmlRpcGroupsMessaging starting up"); m_log.Info("[GROUPS-MESSAGING]: XmlRpcGroupsMessaging starting up");
@ -123,7 +122,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
if (m_debugEnabled) m_log.DebugFormat("[GROUPS-MESSAGING] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); if (m_debugEnabled) m_log.DebugFormat("[GROUPS-MESSAGING] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
m_groupsModule = scene.RequestModuleInterface<IGroupsModule>(); m_groupsModule = scene.RequestModuleInterface<IGroupsModule>();
// No groups module, no groups messaging // No groups module, no groups messaging
@ -164,7 +162,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
m_sceneList.Remove(scene); m_sceneList.Remove(scene);
} }
public void Close() public void Close()
{ {
if (!m_groupMessagingEnabled) if (!m_groupMessagingEnabled)
@ -229,12 +226,10 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
if ((msg.fromGroup == true) && if ((msg.fromGroup == true) &&
((msg.dialog == (byte)InstantMessageDialog.SessionSend) ((msg.dialog == (byte)InstantMessageDialog.SessionSend)
|| (msg.dialog == (byte)InstantMessageDialog.SessionAdd) || (msg.dialog == (byte)InstantMessageDialog.SessionAdd)
|| (msg.dialog == (byte)InstantMessageDialog.SessionDrop) || (msg.dialog == (byte)InstantMessageDialog.SessionDrop)))
))
{ {
ProcessMessageFromGroupSession(msg); ProcessMessageFromGroupSession(msg);
} }
} }
private void ProcessMessageFromGroupSession(GridInstantMessage msg) private void ProcessMessageFromGroupSession(GridInstantMessage msg)
@ -297,7 +292,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
, false //isModerator , false //isModerator
, false //text mute , false //text mute
); );
} }
} }
} }
@ -325,8 +319,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
} }
} }
#endregion #endregion
#region ClientEvents #region ClientEvents
@ -424,13 +416,13 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
SendMessageToGroup(im, groupID); SendMessageToGroup(im, groupID);
} }
} }
#endregion #endregion
private void SendMessageToGroup(GridInstantMessage im, UUID groupID) private void SendMessageToGroup(GridInstantMessage im, UUID groupID)
{ {
if (m_debugEnabled) m_log.DebugFormat("[GROUPS-MESSAGING] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); if (m_debugEnabled) m_log.DebugFormat("[GROUPS-MESSAGING] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
foreach (GroupMembersData member in m_groupsModule.GroupMembersRequest(null, groupID)) foreach (GroupMembersData member in m_groupsModule.GroupMembersRequest(null, groupID))
{ {
if (m_agentsDroppedSession[im.imSessionID].Contains(member.AgentID.Guid)) if (m_agentsDroppedSession[im.imSessionID].Contains(member.AgentID.Guid))
@ -488,24 +480,20 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
sessionMap.Add("type", OSD.FromInteger(0)); sessionMap.Add("type", OSD.FromInteger(0));
sessionMap.Add("voice_enabled", OSD.FromBoolean(false)); sessionMap.Add("voice_enabled", OSD.FromBoolean(false));
OSDMap bodyMap = new OSDMap(4); OSDMap bodyMap = new OSDMap(4);
bodyMap.Add("session_id", OSD.FromUUID(groupID)); bodyMap.Add("session_id", OSD.FromUUID(groupID));
bodyMap.Add("temp_session_id", OSD.FromUUID(groupID)); bodyMap.Add("temp_session_id", OSD.FromUUID(groupID));
bodyMap.Add("success", OSD.FromBoolean(true)); bodyMap.Add("success", OSD.FromBoolean(true));
bodyMap.Add("session_info", sessionMap); bodyMap.Add("session_info", sessionMap);
IEventQueue queue = remoteClient.Scene.RequestModuleInterface<IEventQueue>(); IEventQueue queue = remoteClient.Scene.RequestModuleInterface<IEventQueue>();
if (queue != null) if (queue != null)
{ {
queue.Enqueue(EventQueueHelper.buildEvent("ChatterBoxSessionStartReply", bodyMap), remoteClient.AgentId); queue.Enqueue(EventQueueHelper.buildEvent("ChatterBoxSessionStartReply", bodyMap), remoteClient.AgentId);
} }
} }
private void DebugGridInstantMessage(GridInstantMessage im) private void DebugGridInstantMessage(GridInstantMessage im)
{ {
if (m_debugEnabled) if (m_debugEnabled)
@ -555,5 +543,4 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
#endregion #endregion
} }
} }

View File

@ -313,16 +313,13 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
GroupName = "Unknown"; GroupName = "Unknown";
} }
remote_client.SendGroupNameReply(GroupID, GroupName); remote_client.SendGroupNameReply(GroupID, GroupName);
} }
private void OnInstantMessage(IClientAPI remoteClient, GridInstantMessage im) private void OnInstantMessage(IClientAPI remoteClient, GridInstantMessage im)
{ {
if (m_debugEnabled) m_log.DebugFormat("[GROUPS] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); if (m_debugEnabled) m_log.DebugFormat("[GROUPS] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
// Group invitations // Group invitations
if ((im.dialog == (byte)InstantMessageDialog.GroupInvitationAccept) || (im.dialog == (byte)InstantMessageDialog.GroupInvitationDecline)) if ((im.dialog == (byte)InstantMessageDialog.GroupInvitationAccept) || (im.dialog == (byte)InstantMessageDialog.GroupInvitationDecline))
{ {
@ -334,7 +331,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
UUID fromAgentID = new UUID(im.fromAgentID); UUID fromAgentID = new UUID(im.fromAgentID);
if ((inviteInfo != null) && (fromAgentID == inviteInfo.AgentID)) if ((inviteInfo != null) && (fromAgentID == inviteInfo.AgentID))
{ {
// Accept // Accept
if (im.dialog == (byte)InstantMessageDialog.GroupInvitationAccept) if (im.dialog == (byte)InstantMessageDialog.GroupInvitationAccept)
{ {
@ -373,10 +369,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
{ {
if (m_debugEnabled) m_log.DebugFormat("[GROUPS] Received a reject invite notice."); if (m_debugEnabled) m_log.DebugFormat("[GROUPS] Received a reject invite notice.");
m_groupData.RemoveAgentToGroupInvite(inviteID); m_groupData.RemoveAgentToGroupInvite(inviteID);
} }
} }
} }
@ -429,7 +422,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
bucket[18] = 0; //dunno bucket[18] = 0; //dunno
} }
m_groupData.AddGroupNotice(GroupID, NoticeID, im.fromAgentName, Subject, Message, bucket); m_groupData.AddGroupNotice(GroupID, NoticeID, im.fromAgentName, Subject, Message, bucket);
if (OnNewGroupNotice != null) if (OnNewGroupNotice != null)
{ {
@ -446,12 +438,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
msg.toAgentID = member.AgentID.Guid; msg.toAgentID = member.AgentID.Guid;
OutgoingInstantMessage(msg, member.AgentID); OutgoingInstantMessage(msg, member.AgentID);
} }
} }
} }
} }
@ -477,11 +465,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
UUID groupID = new UUID(im.fromAgentID); UUID groupID = new UUID(im.fromAgentID);
ejectee.SendAgentDropGroup(groupID); ejectee.SendAgentDropGroup(groupID);
} }
} }
} }
private void OnGridInstantMessage(GridInstantMessage msg) private void OnGridInstantMessage(GridInstantMessage msg)
@ -491,7 +475,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
// Trigger the above event handler // Trigger the above event handler
OnInstantMessage(null, msg); OnInstantMessage(null, msg);
// If a message from a group arrives here, it may need to be forwarded to a local client // If a message from a group arrives here, it may need to be forwarded to a local client
if (msg.fromGroup == true) if (msg.fromGroup == true)
{ {
@ -508,10 +491,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
break; break;
} }
} }
} }
#endregion #endregion
#region IGroupsModule Members #region IGroupsModule Members

View File

@ -1,4 +1,31 @@
using System; /*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSimulator Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;

View File

@ -1,4 +1,31 @@
using System; /*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSimulator Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;

View File

@ -6894,7 +6894,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
} }
} }
public LSL_String llXorBase64Strings(string str1, string str2) public LSL_String llXorBase64Strings(string str1, string str2)
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
@ -7215,7 +7214,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
// vector profilecut // vector profilecut
res.Add(new LSL_Vector(Shape.ProfileBegin / 50000.0, 1 - Shape.ProfileEnd / 50000.0, 0)); res.Add(new LSL_Vector(Shape.ProfileBegin / 50000.0, 1 - Shape.ProfileEnd / 50000.0, 0));
// vector tapera // vector tapera
res.Add(new LSL_Vector(Shape.PathTaperX / 100.0, Shape.PathTaperY / 100.0, 0)); res.Add(new LSL_Vector(Shape.PathTaperX / 100.0, Shape.PathTaperY / 100.0, 0));
@ -7228,7 +7226,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
// float skew // float skew
res.Add(new LSL_Float(Shape.PathSkew / 100.0)); res.Add(new LSL_Float(Shape.PathSkew / 100.0));
break; break;
} }
break; break;