/// <summary> /// Check to see if the client has baked textures that belong to banned clients /// </summary> /// <param name="client"></param> /// <param name="textureEntry"></param> public void CheckForBannedViewer(IClientAPI client, Primitive.TextureEntry textureEntry) { try { //Read the website once! if (m_map == null) { m_map = (OSDMap)OSDParser.Deserialize(Utilities.ReadExternalWebsite("http://auroraserver.ath.cx:8080/client_tags.xml")); } //This is the givaway texture! for (int i = 0; i < textureEntry.FaceTextures.Length; i++) { if (textureEntry.FaceTextures[i] != null) { if (m_map.ContainsKey(textureEntry.FaceTextures[i].TextureID.ToString())) { OSDMap viewerMap = (OSDMap)m_map[textureEntry.FaceTextures[i].TextureID.ToString()]; //Check the names if (BannedViewers.Contains(viewerMap["name"].ToString())) { client.Kick("You cannot use " + viewerMap["name"] + " in this sim."); IEntityTransferModule transferModule = client.Scene.RequestModuleInterface <IEntityTransferModule> (); if (transferModule != null) { transferModule.IncomingCloseAgent(((Scene)client.Scene), client.AgentId); } } else if (m_banEvilViewersByDefault && viewerMap.ContainsKey("evil") && (viewerMap["evil"].AsBoolean() == true)) { client.Kick("You cannot use " + viewerMap["name"] + " in this sim."); IEntityTransferModule transferModule = client.Scene.RequestModuleInterface <IEntityTransferModule> (); if (transferModule != null) { transferModule.IncomingCloseAgent(((Scene)client.Scene), client.AgentId); } } } } } } catch { } }
/// <summary> /// Check to see if the client has baked textures that belong to banned clients /// </summary> /// <param name="client"></param> /// <param name="textureEntry"></param> public void CheckForBannedViewer(IClientAPI client, Primitive.TextureEntry textureEntry) { try { //Read the website once! if (m_map == null) { m_map = (OSDMap)OSDParser.Deserialize(Utilities.ReadExternalWebsite(m_viewerTagURL)); } //This is the givaway texture! for (int i = 0; i < textureEntry.FaceTextures.Length; i++) { if (textureEntry.FaceTextures[i] != null) { if (m_map.ContainsKey(textureEntry.FaceTextures[i].TextureID.ToString())) { OSDMap viewerMap = (OSDMap)m_map[textureEntry.FaceTextures[i].TextureID.ToString()]; //Check the names if (IsViewerBanned(viewerMap["name"].ToString(), viewerMap["evil"].AsBoolean())) { client.Kick("You cannot use " + viewerMap["name"] + " in this sim."); IEntityTransferModule transferModule = client.Scene.RequestModuleInterface <IEntityTransferModule> (); if (transferModule != null) { transferModule.IncomingCloseAgent(((Scene)client.Scene), client.AgentId); } break; } break; } } } } catch { } }
/// <summary> /// Deactivates the client if we don't receive any packets within a certain amount of time (default 60 seconds). /// </summary> /// <remarks> /// If a connection is active then we will always receive packets even if nothing else is happening, due to /// regular client pings. /// </remarks> /// <param name='client'></param> private void DeactivateClientDueToTimeout(IClientAPI client) { // We must set IsActive synchronously so that we can stop the packet loop reinvoking this method, even // though it's set later on by LLClientView.Close() client.IsActive = false; m_log.WarnFormat( "[LLUDPSERVER]: Ack timeout, disconnecting {0} agent for {1} in {2}", client.SceneAgent.IsChildAgent ? "child" : "root", client.Name, m_scene.RegionInfo.RegionName); StatsManager.SimExtraStats.AddAbnormalClientThreadTermination(); if (!client.SceneAgent.IsChildAgent) client.Kick("Simulator logged you out due to connection timeout"); client.Close(); }
/// <summary> /// Check to see if the client has baked textures that belong to banned clients /// </summary> /// <param name="client"></param> /// <param name="textureEntry"></param> public void CheckForBannedViewer(IClientAPI client, Primitive.TextureEntry textureEntry) { try { //Read the website once! if (m_map == null) m_map = (OSDMap)OSDParser.Deserialize(Utilities.ReadExternalWebsite("http://auroraserver.ath.cx:8080/client_tags.xml")); //This is the givaway texture! for (int i = 0; i < textureEntry.FaceTextures.Length; i++) { if (textureEntry.FaceTextures[i] != null) { if (m_map.ContainsKey(textureEntry.FaceTextures[i].TextureID.ToString())) { OSDMap viewerMap = (OSDMap)m_map[textureEntry.FaceTextures[i].TextureID.ToString()]; //Check the names if (BannedViewers.Contains(viewerMap["name"].ToString())) { client.Kick("You cannot use " + viewerMap["name"] + " in this sim."); IEntityTransferModule transferModule = client.Scene.RequestModuleInterface<IEntityTransferModule> (); if (transferModule != null) transferModule.IncomingCloseAgent (((Scene)client.Scene), client.AgentId); } else if (m_banEvilViewersByDefault && viewerMap.ContainsKey("evil") && (viewerMap["evil"].AsBoolean() == true)) { client.Kick("You cannot use " + viewerMap["name"] + " in this sim."); IEntityTransferModule transferModule = client.Scene.RequestModuleInterface<IEntityTransferModule> (); if (transferModule != null) transferModule.IncomingCloseAgent (((Scene)client.Scene), client.AgentId); } } } } } catch { } }
/// <summary> /// Check to see if the client has baked textures that belong to banned clients /// </summary> /// <param name="client"></param> /// <param name="textureEntry"></param> public void CheckForBannedViewer(IClientAPI client, Primitive.TextureEntry textureEntry) { try { //Read the website once! if (m_map == null) m_map = (OSDMap)OSDParser.Deserialize (Utilities.ReadExternalWebsite (m_viewerTagURL)); //This is the givaway texture! for (int i = 0; i < textureEntry.FaceTextures.Length; i++) { if (textureEntry.FaceTextures[i] != null) { if (m_map.ContainsKey(textureEntry.FaceTextures[i].TextureID.ToString())) { OSDMap viewerMap = (OSDMap)m_map[textureEntry.FaceTextures[i].TextureID.ToString()]; //Check the names if (IsViewerBanned (viewerMap["name"].ToString (), viewerMap["evil"].AsBoolean ())) { client.Kick("You cannot use " + viewerMap["name"] + " in this sim."); IEntityTransferModule transferModule = client.Scene.RequestModuleInterface<IEntityTransferModule> (); if (transferModule != null) transferModule.IncomingCloseAgent (((Scene)client.Scene), client.AgentId); break; } break; } } } } catch { } }