aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorUbitUmarov2018-01-20 01:28:00 +0000
committerUbitUmarov2018-01-20 01:28:00 +0000
commitc34f07b6f3e4bd27412d248382ff6c6945330917 (patch)
tree8bed8bcbf8bcd90a6ddb74c21c37fbf23561c29a
parent fail to connect to estates service is a fatal error (diff)
downloadopensim-SC-c34f07b6f3e4bd27412d248382ff6c6945330917.zip
opensim-SC-c34f07b6f3e4bd27412d248382ff6c6945330917.tar.gz
opensim-SC-c34f07b6f3e4bd27412d248382ff6c6945330917.tar.bz2
opensim-SC-c34f07b6f3e4bd27412d248382ff6c6945330917.tar.xz
silent ignore mutes on HG visitors, let viewers do it on cache only, proper HG suport is another story... and questionable
-rw-r--r--OpenSim/Region/CoreModules/Avatar/InstantMessage/MuteListModule.cs20
-rw-r--r--bin/Robust.HG.ini.example2
2 files changed, 17 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MuteListModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MuteListModule.cs
index d3c7751..9cbfd4a 100644
--- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MuteListModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MuteListModule.cs
@@ -52,6 +52,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
52 protected bool m_Enabled = false; 52 protected bool m_Enabled = false;
53 protected List<Scene> m_SceneList = new List<Scene>(); 53 protected List<Scene> m_SceneList = new List<Scene>();
54 protected IMuteListService m_service = null; 54 protected IMuteListService m_service = null;
55 private IUserManagement m_userManagementModule;
55 56
56 public void Initialise(IConfigSource config) 57 public void Initialise(IConfigSource config)
57 { 58 {
@@ -89,10 +90,13 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
89 m_Enabled = false; 90 m_Enabled = false;
90 return; 91 return;
91 } 92 }
93
92 lock (m_SceneList) 94 lock (m_SceneList)
93 { 95 {
94 if(m_service == null) 96 if(m_service == null)
95 m_service = srv; 97 m_service = srv;
98 if(m_userManagementModule == null)
99 m_userManagementModule = scene.RequestModuleInterface<IUserManagement>();
96 m_SceneList.Add(scene); 100 m_SceneList.Add(scene);
97 scene.EventManager.OnNewClient += OnNewClient; 101 scene.EventManager.OnNewClient += OnNewClient;
98 } 102 }
@@ -131,7 +135,15 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
131 public void Close() 135 public void Close()
132 { 136 {
133 } 137 }
134 138
139 private bool IsForeign(IClientAPI client)
140 {
141 if(m_userManagementModule == null)
142 return false; // we can't check
143
144 return !m_userManagementModule.IsLocalGridUser(client.AgentId);
145 }
146
135 private void OnNewClient(IClientAPI client) 147 private void OnNewClient(IClientAPI client)
136 { 148 {
137 client.OnMuteListRequest += OnMuteListRequest; 149 client.OnMuteListRequest += OnMuteListRequest;
@@ -141,7 +153,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
141 153
142 private void OnMuteListRequest(IClientAPI client, uint crc) 154 private void OnMuteListRequest(IClientAPI client, uint crc)
143 { 155 {
144 if (!m_Enabled) 156 if (!m_Enabled || IsForeign(client))
145 { 157 {
146 if(crc == 0) 158 if(crc == 0)
147 client.SendEmpytMuteList(); 159 client.SendEmpytMuteList();
@@ -192,7 +204,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
192 204
193 private void OnUpdateMuteListEntry(IClientAPI client, UUID muteID, string muteName, int muteType, uint muteFlags) 205 private void OnUpdateMuteListEntry(IClientAPI client, UUID muteID, string muteName, int muteType, uint muteFlags)
194 { 206 {
195 if (!m_Enabled) 207 if (!m_Enabled || IsForeign(client))
196 return; 208 return;
197 209
198 UUID agentID = client.AgentId; 210 UUID agentID = client.AgentId;
@@ -220,7 +232,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
220 232
221 private void OnRemoveMuteListEntry(IClientAPI client, UUID muteID, string muteName) 233 private void OnRemoveMuteListEntry(IClientAPI client, UUID muteID, string muteName)
222 { 234 {
223 if (!m_Enabled) 235 if (!m_Enabled || IsForeign(client))
224 return; 236 return;
225 m_service.RemoveMute(client.AgentId, muteID, muteName); 237 m_service.RemoveMute(client.AgentId, muteID, muteName);
226 } 238 }
diff --git a/bin/Robust.HG.ini.example b/bin/Robust.HG.ini.example
index 82bed30..a327c6b 100644
--- a/bin/Robust.HG.ini.example
+++ b/bin/Robust.HG.ini.example
@@ -522,7 +522,7 @@
522 522
523 ; If you run this login server behind a proxy, set this to true 523 ; If you run this login server behind a proxy, set this to true
524 ; HasProxy = false 524 ; HasProxy = false
525 525
526 ; Defaults for the users, if none is specified in the useraccounts table entry (ServiceURLs) 526 ; Defaults for the users, if none is specified in the useraccounts table entry (ServiceURLs)
527 ;; If you have GatekeeperURI set under [Hypergrid], no need to set it here, leave it commented 527 ;; If you have GatekeeperURI set under [Hypergrid], no need to set it here, leave it commented
528 ; GatekeeperURI = "${Const|BaseURL}:${Const|PublicPort}" 528 ; GatekeeperURI = "${Const|BaseURL}:${Const|PublicPort}"