diff options
author | Mic Bowman | 2011-11-02 17:11:10 -0700 |
---|---|---|
committer | Mic Bowman | 2011-11-02 17:11:10 -0700 |
commit | 99a347ee11d8fd807a765bb0ce2ed89e811baab2 (patch) | |
tree | 972a46394ccdac8ea9abd51f63742418969c71b0 /OpenSim/Region | |
parent | fix CopyTo call that was breaking under mono 2.10 (diff) | |
parent | Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim (diff) | |
download | opensim-SC-99a347ee11d8fd807a765bb0ce2ed89e811baab2.zip opensim-SC-99a347ee11d8fd807a765bb0ce2ed89e811baab2.tar.gz opensim-SC-99a347ee11d8fd807a765bb0ce2ed89e811baab2.tar.bz2 opensim-SC-99a347ee11d8fd807a765bb0ce2ed89e811baab2.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region')
4 files changed, 37 insertions, 23 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs index 1da9aab..c952ebf 100644 --- a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs | |||
@@ -356,12 +356,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
356 | PresenceInfo[] presences = PresenceService.GetAgents(new string[] { fid }); | 356 | PresenceInfo[] presences = PresenceService.GetAgents(new string[] { fid }); |
357 | if (presences != null && presences.Length > 0) | 357 | if (presences != null && presences.Length > 0) |
358 | presence = presences[0]; | 358 | presence = presences[0]; |
359 | if (presence != null) | 359 | im.offline = 0; |
360 | im.offline = 0; | ||
361 | 360 | ||
362 | im.fromAgentID = fromAgentID.Guid; | 361 | im.fromAgentID = fromAgentID.Guid; |
363 | im.fromAgentName = firstname + " " + lastname; | 362 | im.fromAgentName = firstname + " " + lastname; |
364 | im.offline = (byte)((presence == null) ? 1 : 0); | ||
365 | im.imSessionID = im.fromAgentID; | 363 | im.imSessionID = im.fromAgentID; |
366 | im.message = FriendshipMessage(fid); | 364 | im.message = FriendshipMessage(fid); |
367 | 365 | ||
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs index 8d055d4..de25048 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs | |||
@@ -201,26 +201,42 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
201 | 201 | ||
202 | private void UndeliveredMessage(GridInstantMessage im) | 202 | private void UndeliveredMessage(GridInstantMessage im) |
203 | { | 203 | { |
204 | if ((im.offline != 0) | 204 | if (im.dialog != (byte)InstantMessageDialog.MessageFromObject && |
205 | && (!im.fromGroup || (im.fromGroup && m_ForwardOfflineGroupMessages))) | 205 | im.dialog != (byte)InstantMessageDialog.MessageFromAgent && |
206 | im.dialog != (byte)InstantMessageDialog.GroupNotice && | ||
207 | im.dialog != (byte)InstantMessageDialog.GroupInvitation && | ||
208 | im.dialog != (byte)InstantMessageDialog.InventoryOffered) | ||
206 | { | 209 | { |
207 | bool success = SynchronousRestObjectRequester.MakeRequest<GridInstantMessage, bool>( | 210 | return; |
208 | "POST", m_RestURL+"/SaveMessage/", im); | 211 | } |
209 | 212 | ||
210 | if (im.dialog == (byte)InstantMessageDialog.MessageFromAgent) | 213 | if (!m_ForwardOfflineGroupMessages) |
211 | { | 214 | { |
212 | IClientAPI client = FindClient(new UUID(im.fromAgentID)); | 215 | if (im.dialog == (byte)InstantMessageDialog.GroupNotice || |
213 | if (client == null) | 216 | im.dialog != (byte)InstantMessageDialog.GroupInvitation) |
214 | return; | 217 | return; |
215 | 218 | } | |
216 | client.SendInstantMessage(new GridInstantMessage( | 219 | |
217 | null, new UUID(im.toAgentID), | 220 | Scene scene = FindScene(new UUID(im.fromAgentID)); |
218 | "System", new UUID(im.fromAgentID), | 221 | if (scene == null) |
219 | (byte)InstantMessageDialog.MessageFromAgent, | 222 | scene = m_SceneList[0]; |
220 | "User is not logged in. "+ | 223 | |
221 | (success ? "Message saved." : "Message not saved"), | 224 | bool success = SynchronousRestObjectRequester.MakeRequest<GridInstantMessage, bool>( |
222 | false, new Vector3())); | 225 | "POST", m_RestURL+"/SaveMessage/", im); |
223 | } | 226 | |
227 | if (im.dialog == (byte)InstantMessageDialog.MessageFromAgent) | ||
228 | { | ||
229 | IClientAPI client = FindClient(new UUID(im.fromAgentID)); | ||
230 | if (client == null) | ||
231 | return; | ||
232 | |||
233 | client.SendInstantMessage(new GridInstantMessage( | ||
234 | null, new UUID(im.toAgentID), | ||
235 | "System", new UUID(im.fromAgentID), | ||
236 | (byte)InstantMessageDialog.MessageFromAgent, | ||
237 | "User is not logged in. "+ | ||
238 | (success ? "Message saved." : "Message not saved"), | ||
239 | false, new Vector3())); | ||
224 | } | 240 | } |
225 | } | 241 | } |
226 | } | 242 | } |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index f012d72..dff43fd 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -1494,7 +1494,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1494 | msg.fromAgentName = "Server"; | 1494 | msg.fromAgentName = "Server"; |
1495 | msg.dialog = (byte)19; // Object msg | 1495 | msg.dialog = (byte)19; // Object msg |
1496 | msg.fromGroup = false; | 1496 | msg.fromGroup = false; |
1497 | msg.offline = (byte)1; | 1497 | msg.offline = (byte)0; |
1498 | msg.ParentEstateID = RegionInfo.EstateSettings.ParentEstateID; | 1498 | msg.ParentEstateID = RegionInfo.EstateSettings.ParentEstateID; |
1499 | msg.Position = Vector3.Zero; | 1499 | msg.Position = Vector3.Zero; |
1500 | msg.RegionID = RegionInfo.RegionID.Guid; | 1500 | msg.RegionID = RegionInfo.RegionID.Guid; |
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs index b2c0f48..d452905 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs | |||
@@ -881,7 +881,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
881 | msg.dialog = dialog; | 881 | msg.dialog = dialog; |
882 | // msg.dialog = (byte)OpenMetaverse.InstantMessageDialog.GroupNotice; | 882 | // msg.dialog = (byte)OpenMetaverse.InstantMessageDialog.GroupNotice; |
883 | msg.fromGroup = true; | 883 | msg.fromGroup = true; |
884 | msg.offline = (byte)1; // Allow this message to be stored for offline use | 884 | msg.offline = (byte)0; |
885 | msg.ParentEstateID = 0; | 885 | msg.ParentEstateID = 0; |
886 | msg.Position = Vector3.Zero; | 886 | msg.Position = Vector3.Zero; |
887 | msg.RegionID = UUID.Zero.Guid; | 887 | msg.RegionID = UUID.Zero.Guid; |