Adds config option "ForwardOfflineGroupMessages" to allow disabling of group messages forwarded while offline. Addresses Mantis #4457

mysql-performance
dahlia 2010-01-07 11:28:38 -08:00
parent b67470af91
commit 1e899704c1
2 changed files with 7 additions and 1 deletions

View File

@ -47,6 +47,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
private bool enabled = true;
private List<Scene> m_SceneList = new List<Scene>();
private string m_RestURL = String.Empty;
private bool m_ForwardOfflineGroupMessages = true;
public void Initialise(Scene scene, IConfigSource config)
{
@ -67,6 +68,9 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
return;
}
if (cnf != null)
m_ForwardOfflineGroupMessages = cnf.GetBoolean("ForwardOfflineGroupMessages", m_ForwardOfflineGroupMessages);
lock (m_SceneList)
{
if (m_SceneList.Count == 0)
@ -182,7 +186,8 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
private void UndeliveredMessage(GridInstantMessage im)
{
if (im.offline != 0)
if ((im.offline != 0)
&& (!im.fromGroup || (im.fromGroup && m_ForwardOfflineGroupMessages)))
{
bool success = SynchronousRestObjectPoster.BeginPostObject<GridInstantMessage, bool>(
"POST", m_RestURL+"/SaveMessage/", im);

View File

@ -473,6 +473,7 @@
; OfflineMessageURL = http://yourserver/Offline.php
; MuteListModule = MuteListModule
; MuteListURL = http://yourserver/Mute.php
; ForwardOfflineGroupMessages = true
[ODEPhysicsSettings]