aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authordahlia2010-01-07 11:28:38 -0800
committerdahlia2010-01-07 11:28:38 -0800
commit1e899704c1c19a8c42ff313677a13f35b46605da (patch)
treea7afde547393d8dac3bf74b0f3e66abab6887737 /OpenSim/Region
parentFixes the newly added packets as per Melanie's request. (diff)
downloadopensim-SC-1e899704c1c19a8c42ff313677a13f35b46605da.zip
opensim-SC-1e899704c1c19a8c42ff313677a13f35b46605da.tar.gz
opensim-SC-1e899704c1c19a8c42ff313677a13f35b46605da.tar.bz2
opensim-SC-1e899704c1c19a8c42ff313677a13f35b46605da.tar.xz
Adds config option "ForwardOfflineGroupMessages" to allow disabling of group messages forwarded while offline. Addresses Mantis #4457
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs7
1 files changed, 6 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs
index 1614b70..450897c 100644
--- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs
@@ -47,6 +47,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
47 private bool enabled = true; 47 private bool enabled = true;
48 private List<Scene> m_SceneList = new List<Scene>(); 48 private List<Scene> m_SceneList = new List<Scene>();
49 private string m_RestURL = String.Empty; 49 private string m_RestURL = String.Empty;
50 private bool m_ForwardOfflineGroupMessages = true;
50 51
51 public void Initialise(Scene scene, IConfigSource config) 52 public void Initialise(Scene scene, IConfigSource config)
52 { 53 {
@@ -67,6 +68,9 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
67 return; 68 return;
68 } 69 }
69 70
71 if (cnf != null)
72 m_ForwardOfflineGroupMessages = cnf.GetBoolean("ForwardOfflineGroupMessages", m_ForwardOfflineGroupMessages);
73
70 lock (m_SceneList) 74 lock (m_SceneList)
71 { 75 {
72 if (m_SceneList.Count == 0) 76 if (m_SceneList.Count == 0)
@@ -182,7 +186,8 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
182 186
183 private void UndeliveredMessage(GridInstantMessage im) 187 private void UndeliveredMessage(GridInstantMessage im)
184 { 188 {
185 if (im.offline != 0) 189 if ((im.offline != 0)
190 && (!im.fromGroup || (im.fromGroup && m_ForwardOfflineGroupMessages)))
186 { 191 {
187 bool success = SynchronousRestObjectPoster.BeginPostObject<GridInstantMessage, bool>( 192 bool success = SynchronousRestObjectPoster.BeginPostObject<GridInstantMessage, bool>(
188 "POST", m_RestURL+"/SaveMessage/", im); 193 "POST", m_RestURL+"/SaveMessage/", im);