From e0bc5c5db2b88691c04b06be2fa73a75746126cb Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Wed, 20 May 2009 01:32:06 +0000 Subject: Add copyright headers, formatting cleanup. --- .../Region/ClientStack/LindenUDP/LLClientView.cs | 2 +- .../Region/ClientStack/LindenUDP/LLPacketQueue.cs | 10 +++---- .../Region/Communications/OGS1/OGS1GridServices.cs | 2 +- .../Region/CoreModules/Agent/IPBan/IPBanModule.cs | 35 +++++++++++++++++++--- .../Region/CoreModules/Agent/IPBan/SceneBanner.cs | 31 +++++++++++++++++-- .../CoreModules/Scripting/LSLHttp/UrlModule.cs | 8 ++--- 6 files changed, 71 insertions(+), 17 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index f6a326f..a52eb9a 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -10708,7 +10708,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP { get { - if(m_userEndPoint is IPEndPoint) + if (m_userEndPoint is IPEndPoint) { IPEndPoint ep = (IPEndPoint)m_userEndPoint; diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs index 4a94814..c315c87 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs @@ -189,7 +189,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } if (item.Sequence != 0) - lock(contents) contents.Add(item.Sequence); + lock (contents) contents.Add(item.Sequence); lock (this) { @@ -241,7 +241,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP item.TickCount = System.Environment.TickCount; if (item.Sequence == 0) return item; - lock(contents) + lock (contents) { if (contents.Contains(item.Sequence)) if (contents.Remove(item.Sequence)) @@ -252,13 +252,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP public void Cancel(uint sequence) { - lock(contents) while (contents.Remove(sequence)) + lock (contents) while (contents.Remove(sequence)) ; } public bool Contains(uint sequence) { - lock(contents) return contents.Contains(sequence); + lock (contents) return contents.Contains(sequence); } public void Flush() @@ -318,7 +318,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP TextureOutgoingPacketQueue.Clear(); AssetOutgoingPacketQueue.Clear(); SendQueue.Clear(); - lock(contents) contents.Clear(); + lock (contents) contents.Clear(); } } diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs index f6da1e4..3067d75 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs @@ -395,7 +395,7 @@ namespace OpenSim.Region.Communications.OGS1 return regionInfo; } - if((!m_useRemoteRegionCache) || (!m_remoteRegionInfoCache.TryGetValue(regionHandle, out regionInfo))) + if ((!m_useRemoteRegionCache) || (!m_remoteRegionInfoCache.TryGetValue(regionHandle, out regionInfo))) { try { diff --git a/OpenSim/Region/CoreModules/Agent/IPBan/IPBanModule.cs b/OpenSim/Region/CoreModules/Agent/IPBan/IPBanModule.cs index 28e0382..bfe2a71 100644 --- a/OpenSim/Region/CoreModules/Agent/IPBan/IPBanModule.cs +++ b/OpenSim/Region/CoreModules/Agent/IPBan/IPBanModule.cs @@ -1,4 +1,31 @@ -using System; +/* + * Copyright (c) Contributors, http://opensimulator.org/ + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSimulator Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +using System; using System.Collections.Generic; using System.IO; using System.Text; @@ -19,11 +46,11 @@ namespace OpenSim.Region.CoreModules.Agent.IPBan { new SceneBanner(scene, m_bans); - lock(m_bans) + lock (m_bans) { foreach (EstateBan ban in scene.RegionInfo.EstateSettings.EstateBans) { - if(!String.IsNullOrEmpty(ban.BannedHostIPMask)) + if (!String.IsNullOrEmpty(ban.BannedHostIPMask)) m_bans.Add(ban.BannedHostIPMask); if (!String.IsNullOrEmpty(ban.BannedHostNameMask)) m_bans.Add(ban.BannedHostNameMask); @@ -33,7 +60,7 @@ namespace OpenSim.Region.CoreModules.Agent.IPBan public void PostInitialise() { - if(File.Exists("bans.txt")) + if (File.Exists("bans.txt")) { string[] bans = File.ReadAllLines("bans.txt"); foreach (string ban in bans) diff --git a/OpenSim/Region/CoreModules/Agent/IPBan/SceneBanner.cs b/OpenSim/Region/CoreModules/Agent/IPBan/SceneBanner.cs index a5e9963..dbfcfee 100644 --- a/OpenSim/Region/CoreModules/Agent/IPBan/SceneBanner.cs +++ b/OpenSim/Region/CoreModules/Agent/IPBan/SceneBanner.cs @@ -1,4 +1,31 @@ -using System.Collections.Generic; +/* + * Copyright (c) Contributors, http://opensimulator.org/ + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSimulator Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +using System.Collections.Generic; using System.Net; using OpenSim.Framework.Client; using OpenSim.Region.Framework.Scenes; @@ -23,7 +50,7 @@ namespace OpenSim.Region.CoreModules.Agent.IPBan void EventManager_OnClientConnect(IClientCore client) { IClientIPEndpoint ipEndpoint; - if(client.TryGet(out ipEndpoint)) + if (client.TryGet(out ipEndpoint)) { IPAddress end = ipEndpoint.EndPoint; diff --git a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs index e808cb2..a3bcd5f 100644 --- a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs @@ -183,11 +183,11 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp public void ScriptRemoved(UUID itemID) { - lock(m_UrlMap) + lock (m_UrlMap) { List removeURLs = new List(); - foreach(KeyValuePair url in m_UrlMap) + foreach (KeyValuePair url in m_UrlMap) { if (url.Value.itemID == itemID) { @@ -205,11 +205,11 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp public void ObjectRemoved(UUID objectID) { - lock(m_UrlMap) + lock (m_UrlMap) { List removeURLs = new List(); - foreach(KeyValuePair url in m_UrlMap) + foreach (KeyValuePair url in m_UrlMap) { if (url.Value.hostID == objectID) { -- cgit v1.1