Merge branch 'master' of ssh://opensimulator.org/var/git/opensim

remove-scene-viewer
Mic Bowman 2011-11-02 17:11:10 -07:00
commit 99a347ee11
4 changed files with 36 additions and 22 deletions

View File

@ -356,12 +356,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
PresenceInfo[] presences = PresenceService.GetAgents(new string[] { fid }); PresenceInfo[] presences = PresenceService.GetAgents(new string[] { fid });
if (presences != null && presences.Length > 0) if (presences != null && presences.Length > 0)
presence = presences[0]; presence = presences[0];
if (presence != null)
im.offline = 0; im.offline = 0;
im.fromAgentID = fromAgentID.Guid; im.fromAgentID = fromAgentID.Guid;
im.fromAgentName = firstname + " " + lastname; im.fromAgentName = firstname + " " + lastname;
im.offline = (byte)((presence == null) ? 1 : 0);
im.imSessionID = im.fromAgentID; im.imSessionID = im.fromAgentID;
im.message = FriendshipMessage(fid); im.message = FriendshipMessage(fid);

View File

@ -201,9 +201,26 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
private void UndeliveredMessage(GridInstantMessage im) private void UndeliveredMessage(GridInstantMessage im)
{ {
if ((im.offline != 0) if (im.dialog != (byte)InstantMessageDialog.MessageFromObject &&
&& (!im.fromGroup || (im.fromGroup && m_ForwardOfflineGroupMessages))) im.dialog != (byte)InstantMessageDialog.MessageFromAgent &&
im.dialog != (byte)InstantMessageDialog.GroupNotice &&
im.dialog != (byte)InstantMessageDialog.GroupInvitation &&
im.dialog != (byte)InstantMessageDialog.InventoryOffered)
{ {
return;
}
if (!m_ForwardOfflineGroupMessages)
{
if (im.dialog == (byte)InstantMessageDialog.GroupNotice ||
im.dialog != (byte)InstantMessageDialog.GroupInvitation)
return;
}
Scene scene = FindScene(new UUID(im.fromAgentID));
if (scene == null)
scene = m_SceneList[0];
bool success = SynchronousRestObjectRequester.MakeRequest<GridInstantMessage, bool>( bool success = SynchronousRestObjectRequester.MakeRequest<GridInstantMessage, bool>(
"POST", m_RestURL+"/SaveMessage/", im); "POST", m_RestURL+"/SaveMessage/", im);
@ -224,5 +241,4 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
} }
} }
} }
}

View File

@ -1494,7 +1494,7 @@ namespace OpenSim.Region.Framework.Scenes
msg.fromAgentName = "Server"; msg.fromAgentName = "Server";
msg.dialog = (byte)19; // Object msg msg.dialog = (byte)19; // Object msg
msg.fromGroup = false; msg.fromGroup = false;
msg.offline = (byte)1; msg.offline = (byte)0;
msg.ParentEstateID = RegionInfo.EstateSettings.ParentEstateID; msg.ParentEstateID = RegionInfo.EstateSettings.ParentEstateID;
msg.Position = Vector3.Zero; msg.Position = Vector3.Zero;
msg.RegionID = RegionInfo.RegionID.Guid; msg.RegionID = RegionInfo.RegionID.Guid;

View File

@ -881,7 +881,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
msg.dialog = dialog; msg.dialog = dialog;
// msg.dialog = (byte)OpenMetaverse.InstantMessageDialog.GroupNotice; // msg.dialog = (byte)OpenMetaverse.InstantMessageDialog.GroupNotice;
msg.fromGroup = true; msg.fromGroup = true;
msg.offline = (byte)1; // Allow this message to be stored for offline use msg.offline = (byte)0;
msg.ParentEstateID = 0; msg.ParentEstateID = 0;
msg.Position = Vector3.Zero; msg.Position = Vector3.Zero;
msg.RegionID = UUID.Zero.Guid; msg.RegionID = UUID.Zero.Guid;