silent ignore mutes on HG visitors, let viewers do it on cache only, proper HG suport is another story... and questionable
parent
e89f1e635b
commit
c34f07b6f3
|
@ -52,6 +52,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
||||||
protected bool m_Enabled = false;
|
protected bool m_Enabled = false;
|
||||||
protected List<Scene> m_SceneList = new List<Scene>();
|
protected List<Scene> m_SceneList = new List<Scene>();
|
||||||
protected IMuteListService m_service = null;
|
protected IMuteListService m_service = null;
|
||||||
|
private IUserManagement m_userManagementModule;
|
||||||
|
|
||||||
public void Initialise(IConfigSource config)
|
public void Initialise(IConfigSource config)
|
||||||
{
|
{
|
||||||
|
@ -89,10 +90,13 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
||||||
m_Enabled = false;
|
m_Enabled = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
lock (m_SceneList)
|
lock (m_SceneList)
|
||||||
{
|
{
|
||||||
if(m_service == null)
|
if(m_service == null)
|
||||||
m_service = srv;
|
m_service = srv;
|
||||||
|
if(m_userManagementModule == null)
|
||||||
|
m_userManagementModule = scene.RequestModuleInterface<IUserManagement>();
|
||||||
m_SceneList.Add(scene);
|
m_SceneList.Add(scene);
|
||||||
scene.EventManager.OnNewClient += OnNewClient;
|
scene.EventManager.OnNewClient += OnNewClient;
|
||||||
}
|
}
|
||||||
|
@ -131,7 +135,15 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
||||||
public void Close()
|
public void Close()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private bool IsForeign(IClientAPI client)
|
||||||
|
{
|
||||||
|
if(m_userManagementModule == null)
|
||||||
|
return false; // we can't check
|
||||||
|
|
||||||
|
return !m_userManagementModule.IsLocalGridUser(client.AgentId);
|
||||||
|
}
|
||||||
|
|
||||||
private void OnNewClient(IClientAPI client)
|
private void OnNewClient(IClientAPI client)
|
||||||
{
|
{
|
||||||
client.OnMuteListRequest += OnMuteListRequest;
|
client.OnMuteListRequest += OnMuteListRequest;
|
||||||
|
@ -141,7 +153,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
||||||
|
|
||||||
private void OnMuteListRequest(IClientAPI client, uint crc)
|
private void OnMuteListRequest(IClientAPI client, uint crc)
|
||||||
{
|
{
|
||||||
if (!m_Enabled)
|
if (!m_Enabled || IsForeign(client))
|
||||||
{
|
{
|
||||||
if(crc == 0)
|
if(crc == 0)
|
||||||
client.SendEmpytMuteList();
|
client.SendEmpytMuteList();
|
||||||
|
@ -192,7 +204,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
||||||
|
|
||||||
private void OnUpdateMuteListEntry(IClientAPI client, UUID muteID, string muteName, int muteType, uint muteFlags)
|
private void OnUpdateMuteListEntry(IClientAPI client, UUID muteID, string muteName, int muteType, uint muteFlags)
|
||||||
{
|
{
|
||||||
if (!m_Enabled)
|
if (!m_Enabled || IsForeign(client))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
UUID agentID = client.AgentId;
|
UUID agentID = client.AgentId;
|
||||||
|
@ -220,7 +232,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
||||||
|
|
||||||
private void OnRemoveMuteListEntry(IClientAPI client, UUID muteID, string muteName)
|
private void OnRemoveMuteListEntry(IClientAPI client, UUID muteID, string muteName)
|
||||||
{
|
{
|
||||||
if (!m_Enabled)
|
if (!m_Enabled || IsForeign(client))
|
||||||
return;
|
return;
|
||||||
m_service.RemoveMute(client.AgentId, muteID, muteName);
|
m_service.RemoveMute(client.AgentId, muteID, muteName);
|
||||||
}
|
}
|
||||||
|
|
|
@ -522,7 +522,7 @@
|
||||||
|
|
||||||
; If you run this login server behind a proxy, set this to true
|
; If you run this login server behind a proxy, set this to true
|
||||||
; HasProxy = false
|
; HasProxy = false
|
||||||
|
|
||||||
; Defaults for the users, if none is specified in the useraccounts table entry (ServiceURLs)
|
; Defaults for the users, if none is specified in the useraccounts table entry (ServiceURLs)
|
||||||
;; If you have GatekeeperURI set under [Hypergrid], no need to set it here, leave it commented
|
;; If you have GatekeeperURI set under [Hypergrid], no need to set it here, leave it commented
|
||||||
; GatekeeperURI = "${Const|BaseURL}:${Const|PublicPort}"
|
; GatekeeperURI = "${Const|BaseURL}:${Const|PublicPort}"
|
||||||
|
|
Loading…
Reference in New Issue