aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules
diff options
context:
space:
mode:
authorAdam Frisby2008-05-01 18:04:42 +0000
committerAdam Frisby2008-05-01 18:04:42 +0000
commit20a9bf08f51351e1e0a9de94f184ff56cd572665 (patch)
tree52da64dab26353b903c8e4befed0178fa72a188b /OpenSim/Region/Environment/Modules
parentMore config cleanup in LaunchSLClient. (diff)
downloadopensim-SC_OLD-20a9bf08f51351e1e0a9de94f184ff56cd572665.zip
opensim-SC_OLD-20a9bf08f51351e1e0a9de94f184ff56cd572665.tar.gz
opensim-SC_OLD-20a9bf08f51351e1e0a9de94f184ff56cd572665.tar.bz2
opensim-SC_OLD-20a9bf08f51351e1e0a9de94f184ff56cd572665.tar.xz
* Rolled back a few changes.
Diffstat (limited to 'OpenSim/Region/Environment/Modules')
-rw-r--r--OpenSim/Region/Environment/Modules/Agent/AssetDownload/AssetDownloadModule.cs21
-rw-r--r--OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AgentAssetsTransactions.cs20
-rw-r--r--OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AssetTransactionModule.cs13
-rw-r--r--OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureDownloadModule.cs9
-rw-r--r--OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureNotFoundSender.cs6
-rw-r--r--OpenSim/Region/Environment/Modules/Agent/TextureSender/TextureSender.cs19
-rw-r--r--OpenSim/Region/Environment/Modules/Agent/Xfer/XferModule.cs12
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs56
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs80
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs34
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/Groups/GroupsModule.cs10
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/Inventory/InventoryModule.cs2
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/Profiles/AvatarProfilesModule.cs6
-rw-r--r--OpenSim/Region/Environment/Modules/Framework/Commander.cs22
-rw-r--r--OpenSim/Region/Environment/Modules/Framework/CommanderTestModule.cs2
-rw-r--r--OpenSim/Region/Environment/Modules/Grid/Interregion/InterregionModule.cs4
-rw-r--r--OpenSim/Region/Environment/Modules/Scripting/DynamicTexture/DynamicTextureModule.cs10
-rw-r--r--OpenSim/Region/Environment/Modules/Scripting/HttpRequest/ScriptsHttpRequests.cs6
-rw-r--r--OpenSim/Region/Environment/Modules/Scripting/LoadImageURL/LoadImageURLModule.cs10
-rw-r--r--OpenSim/Region/Environment/Modules/Scripting/VectorRender/VectorRenderModule.cs10
-rw-r--r--OpenSim/Region/Environment/Modules/Scripting/WorldComm/WorldCommModule.cs8
-rw-r--r--OpenSim/Region/Environment/Modules/Scripting/XMLRPC/XMLRPCModule.cs24
-rw-r--r--OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs30
-rw-r--r--OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs6
-rw-r--r--OpenSim/Region/Environment/Modules/World/Land/LandObject.cs30
-rw-r--r--OpenSim/Region/Environment/Modules/World/Serialiser/SerialiserModule.cs14
-rw-r--r--OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs2
-rw-r--r--OpenSim/Region/Environment/Modules/World/Terrain/Effects/CookieCutter.cs2
-rw-r--r--OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/LLRAW.cs4
-rw-r--r--OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/Terragen.cs6
-rw-r--r--OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/FlattenSphere.cs1
-rw-r--r--OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/NoiseSphere.cs2
-rw-r--r--OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/RevertSphere.cs2
-rw-r--r--OpenSim/Region/Environment/Modules/World/Terrain/TerrainException.cs2
-rw-r--r--OpenSim/Region/Environment/Modules/World/Terrain/TerrainModule.cs6
-rw-r--r--OpenSim/Region/Environment/Modules/World/TreePopulator/TreePopulatorModule.cs4
36 files changed, 263 insertions, 232 deletions
diff --git a/OpenSim/Region/Environment/Modules/Agent/AssetDownload/AssetDownloadModule.cs b/OpenSim/Region/Environment/Modules/Agent/AssetDownload/AssetDownloadModule.cs
index 550b673..48db51b 100644
--- a/OpenSim/Region/Environment/Modules/Agent/AssetDownload/AssetDownloadModule.cs
+++ b/OpenSim/Region/Environment/Modules/Agent/AssetDownload/AssetDownloadModule.cs
@@ -40,16 +40,15 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetDownload
40 /// <summary> 40 /// <summary>
41 /// Asset requests with data which are ready to be sent back to requesters. This includes textures. 41 /// Asset requests with data which are ready to be sent back to requesters. This includes textures.
42 /// </summary> 42 /// </summary>
43 private readonly List<AssetRequest> AssetRequests; 43 private List<AssetRequest> AssetRequests;
44 44
45 private readonly Dictionary<LLUUID, Scene> RegisteredScenes = new Dictionary<LLUUID, Scene>(); 45 private Scene m_scene;
46 private Dictionary<LLUUID, Scene> RegisteredScenes = new Dictionary<LLUUID, Scene>();
46 47
47 /// 48 ///
48 /// Assets requests (for each user) which are waiting for asset server data. This includes texture requests 49 /// Assets requests (for each user) which are waiting for asset server data. This includes texture requests
49 /// </summary> 50 /// </summary>
50 private readonly Dictionary<LLUUID, Dictionary<LLUUID, AssetRequest>> RequestedAssets; 51 private Dictionary<LLUUID, Dictionary<LLUUID, AssetRequest>> RequestedAssets;
51
52 private Scene m_scene;
53 52
54 public AssetDownloadModule() 53 public AssetDownloadModule()
55 { 54 {
@@ -206,18 +205,22 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetDownload
206 { 205 {
207 public AssetBase AssetInf; 206 public AssetBase AssetInf;
208 public byte AssetRequestSource = 2; 207 public byte AssetRequestSource = 2;
209 public long DataPointer; 208 public long DataPointer = 0;
210 public int DiscardLevel = -1; 209 public int DiscardLevel = -1;
211 public AssetBase ImageInfo; 210 public AssetBase ImageInfo;
212 public bool IsTextureRequest; 211 public bool IsTextureRequest;
213 public int NumPackets; 212 public int NumPackets = 0;
214 public int PacketCounter; 213 public int PacketCounter = 0;
215 public byte[] Params; 214 public byte[] Params = null;
216 public LLUUID RequestAssetID; 215 public LLUUID RequestAssetID;
217 public IClientAPI RequestUser; 216 public IClientAPI RequestUser;
218 public LLUUID TransferRequestID; 217 public LLUUID TransferRequestID;
219 //public bool AssetInCache; 218 //public bool AssetInCache;
220 //public int TimeRequested; 219 //public int TimeRequested;
220
221 public AssetRequest()
222 {
223 }
221 } 224 }
222 225
223 #endregion 226 #endregion
diff --git a/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AgentAssetsTransactions.cs b/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AgentAssetsTransactions.cs
index 008daa2..555d5f4 100644
--- a/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AgentAssetsTransactions.cs
+++ b/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AgentAssetsTransactions.cs
@@ -44,7 +44,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
44 // = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); 44 // = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
45 45
46 // Fields 46 // Fields
47 private readonly bool m_dumpAssetsToFile; 47 private bool m_dumpAssetsToFile;
48 public AgentAssetTransactionsManager Manager; 48 public AgentAssetTransactionsManager Manager;
49 public LLUUID UserID; 49 public LLUUID UserID;
50 public Dictionary<LLUUID, AssetXferUploader> XferUploaders = new Dictionary<LLUUID, AssetXferUploader>(); 50 public Dictionary<LLUUID, AssetXferUploader> XferUploaders = new Dictionary<LLUUID, AssetXferUploader>();
@@ -141,23 +141,23 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
141 public class AssetXferUploader 141 public class AssetXferUploader
142 { 142 {
143 // Fields 143 // Fields
144 private readonly bool m_dumpAssetToFile;
145 private readonly AgentAssetTransactions m_userTransactions;
146 public bool AddToInventory; 144 public bool AddToInventory;
147 public AssetBase Asset; 145 public AssetBase Asset;
148 public LLUUID InventFolder = LLUUID.Zero; 146 public LLUUID InventFolder = LLUUID.Zero;
149 private sbyte invType; 147 private sbyte invType = 0;
150 private bool m_createItem; 148 private bool m_createItem = false;
151 private string m_description = String.Empty; 149 private string m_description = String.Empty;
152 private bool m_finished; 150 private bool m_dumpAssetToFile;
151 private bool m_finished = false;
153 private string m_name = String.Empty; 152 private string m_name = String.Empty;
154 private bool m_storeLocal; 153 private bool m_storeLocal;
155 private uint nextPerm; 154 private AgentAssetTransactions m_userTransactions;
155 private uint nextPerm = 0;
156 private IClientAPI ourClient; 156 private IClientAPI ourClient;
157 public LLUUID TransactionID = LLUUID.Zero; 157 public LLUUID TransactionID = LLUUID.Zero;
158 private sbyte type; 158 private sbyte type = 0;
159 public bool UploadComplete; 159 public bool UploadComplete;
160 private byte wearableType; 160 private byte wearableType = 0;
161 public ulong XferID; 161 public ulong XferID;
162 162
163 public AssetXferUploader(AgentAssetTransactions transactions, bool dumpAssetToFile) 163 public AssetXferUploader(AgentAssetTransactions transactions, bool dumpAssetToFile)
@@ -390,7 +390,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
390 item.BasePermissions = 2147483647; 390 item.BasePermissions = 2147483647;
391 item.CurrentPermissions = 2147483647; 391 item.CurrentPermissions = 2147483647;
392 item.NextPermissions = nextPerm; 392 item.NextPermissions = nextPerm;
393 item.Flags = wearableType; 393 item.Flags = (uint) wearableType;
394 394
395 userInfo.AddItem(ourClient.AgentId, item); 395 userInfo.AddItem(ourClient.AgentId, item);
396 ourClient.SendInventoryItemCreateUpdate(item); 396 ourClient.SendInventoryItemCreateUpdate(item);
diff --git a/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AssetTransactionModule.cs b/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AssetTransactionModule.cs
index d7f5804..fcd0e0c 100644
--- a/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AssetTransactionModule.cs
+++ b/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AssetTransactionModule.cs
@@ -40,11 +40,16 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
40 public class AssetTransactionModule : IRegionModule, IAgentAssetTransactions 40 public class AssetTransactionModule : IRegionModule, IAgentAssetTransactions
41 { 41 {
42 private readonly Dictionary<LLUUID, Scene> RegisteredScenes = new Dictionary<LLUUID, Scene>(); 42 private readonly Dictionary<LLUUID, Scene> RegisteredScenes = new Dictionary<LLUUID, Scene>();
43 private bool m_dumpAssetsToFile; 43 private bool m_dumpAssetsToFile = false;
44 private Scene m_scene; 44 private Scene m_scene = null;
45 45
46 private AgentAssetTransactionsManager m_transactionManager; 46 private AgentAssetTransactionsManager m_transactionManager;
47 47
48 public AssetTransactionModule()
49 {
50 // System.Console.WriteLine("creating AgentAssetTransactionModule");
51 }
52
48 #region IAgentAssetTransactions Members 53 #region IAgentAssetTransactions Members
49 54
50 public void HandleItemCreationFromTransaction(IClientAPI remoteClient, LLUUID transactionID, LLUUID folderID, 55 public void HandleItemCreationFromTransaction(IClientAPI remoteClient, LLUUID transactionID, LLUUID folderID,
@@ -140,13 +145,13 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
140 /// <summary> 145 /// <summary>
141 /// Each agent has its own singleton collection of transactions 146 /// Each agent has its own singleton collection of transactions
142 /// </summary> 147 /// </summary>
143 private readonly Dictionary<LLUUID, AgentAssetTransactions> AgentTransactions = 148 private Dictionary<LLUUID, AgentAssetTransactions> AgentTransactions =
144 new Dictionary<LLUUID, AgentAssetTransactions>(); 149 new Dictionary<LLUUID, AgentAssetTransactions>();
145 150
146 /// <summary> 151 /// <summary>
147 /// Should we dump uploaded assets to the filesystem? 152 /// Should we dump uploaded assets to the filesystem?
148 /// </summary> 153 /// </summary>
149 private readonly bool m_dumpAssetsToFile; 154 private bool m_dumpAssetsToFile;
150 155
151 public Scene MyScene; 156 public Scene MyScene;
152 157
diff --git a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureDownloadModule.cs b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureDownloadModule.cs
index 96ef61f..474ac75 100644
--- a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureDownloadModule.cs
+++ b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureDownloadModule.cs
@@ -47,8 +47,6 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload
47 private readonly BlockingQueue<ITextureSender> m_queueSenders 47 private readonly BlockingQueue<ITextureSender> m_queueSenders
48 = new BlockingQueue<ITextureSender>(); 48 = new BlockingQueue<ITextureSender>();
49 49
50 private readonly List<Scene> m_scenes = new List<Scene>();
51
52 /// <summary> 50 /// <summary>
53 /// Each user has their own texture download service. 51 /// Each user has their own texture download service.
54 /// </summary> 52 /// </summary>
@@ -56,9 +54,14 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload
56 new Dictionary<LLUUID, UserTextureDownloadService>(); 54 new Dictionary<LLUUID, UserTextureDownloadService>();
57 55
58 private Scene m_scene; 56 private Scene m_scene;
57 private List<Scene> m_scenes = new List<Scene>();
59 58
60 private Thread m_thread; 59 private Thread m_thread;
61 60
61 public TextureDownloadModule()
62 {
63 }
64
62 #region IRegionModule Members 65 #region IRegionModule Members
63 66
64 public void Initialise(Scene scene, IConfigSource config) 67 public void Initialise(Scene scene, IConfigSource config)
@@ -66,7 +69,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload
66 if (m_scene == null) 69 if (m_scene == null)
67 { 70 {
68 //Console.WriteLine("Creating Texture download module"); 71 //Console.WriteLine("Creating Texture download module");
69 m_thread = new Thread(ProcessTextureSenders); 72 m_thread = new Thread(new ThreadStart(ProcessTextureSenders));
70 m_thread.Name = "ProcessTextureSenderThread"; 73 m_thread.Name = "ProcessTextureSenderThread";
71 m_thread.IsBackground = true; 74 m_thread.IsBackground = true;
72 m_thread.Start(); 75 m_thread.Start();
diff --git a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureNotFoundSender.cs b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureNotFoundSender.cs
index 7d4c919..70e44d4 100644
--- a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureNotFoundSender.cs
+++ b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureNotFoundSender.cs
@@ -40,13 +40,13 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload
40 //private static readonly log4net.ILog m_log 40 //private static readonly log4net.ILog m_log
41 // = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); 41 // = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
42 42
43 private readonly LLUUID m_textureId; 43 private bool m_cancel = false;
44 private bool m_cancel;
45 private IClientAPI m_client; 44 private IClientAPI m_client;
46 45
47 // See ITextureSender 46 // See ITextureSender
48 47
49 private bool m_sending; 48 private bool m_sending = false;
49 private LLUUID m_textureId;
50 50
51 // See ITextureSender 51 // See ITextureSender
52 52
diff --git a/OpenSim/Region/Environment/Modules/Agent/TextureSender/TextureSender.cs b/OpenSim/Region/Environment/Modules/Agent/TextureSender/TextureSender.cs
index 44b9a23..02c541b 100644
--- a/OpenSim/Region/Environment/Modules/Agent/TextureSender/TextureSender.cs
+++ b/OpenSim/Region/Environment/Modules/Agent/TextureSender/TextureSender.cs
@@ -43,14 +43,12 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureSender
43 private static readonly ILog m_log 43 private static readonly ILog m_log
44 = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 44 = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
45 45
46 private readonly IClientAPI RequestUser;
47
48 /// <summary> 46 /// <summary>
49 /// Records the number of times texture send has been called. 47 /// Records the number of times texture send has been called.
50 /// </summary> 48 /// </summary>
51 public int counter; 49 public int counter = 0;
52 50
53 public bool ImageLoaded; 51 public bool ImageLoaded = false;
54 52
55 /// <summary> 53 /// <summary>
56 /// Holds the texture asset to send. 54 /// Holds the texture asset to send.
@@ -59,26 +57,27 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureSender
59 57
60 //public LLUUID assetID { get { return m_asset.FullID; } } 58 //public LLUUID assetID { get { return m_asset.FullID; } }
61 59
62 private bool m_cancel; 60 private bool m_cancel = false;
63 61
64 // See ITextureSender 62 // See ITextureSender
65 63
66 private bool m_sending; 64 private bool m_sending = false;
67 65
68 /// <summary> 66 /// <summary>
69 /// This is actually the number of extra packets required to send the texture data! We always assume 67 /// This is actually the number of extra packets required to send the texture data! We always assume
70 /// at least one is required. 68 /// at least one is required.
71 /// </summary> 69 /// </summary>
72 private int NumPackets; 70 private int NumPackets = 0;
73 71
74 /// <summary> 72 /// <summary>
75 /// Holds the packet number to send next. In this case, each packet is 1000 bytes long and starts 73 /// Holds the packet number to send next. In this case, each packet is 1000 bytes long and starts
76 /// at the 600th byte (0th indexed). 74 /// at the 600th byte (0th indexed).
77 /// </summary> 75 /// </summary>
78 private int PacketCounter; 76 private int PacketCounter = 0;
79 77
80 private int RequestedDiscardLevel = -1; 78 private int RequestedDiscardLevel = -1;
81 private uint StartPacketNumber; 79 private IClientAPI RequestUser;
80 private uint StartPacketNumber = 0;
82 81
83 public TextureSender(IClientAPI client, int discardLevel, uint packetNumber) 82 public TextureSender(IClientAPI client, int discardLevel, uint packetNumber)
84 { 83 {
@@ -191,7 +190,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureSender
191 catch (ArgumentOutOfRangeException) 190 catch (ArgumentOutOfRangeException)
192 { 191 {
193 m_log.Error("[TEXTURE SENDER]: Unable to separate texture into multiple packets: Array bounds failure on asset:" + 192 m_log.Error("[TEXTURE SENDER]: Unable to separate texture into multiple packets: Array bounds failure on asset:" +
194 m_asset.FullID); 193 m_asset.FullID.ToString());
195 return; 194 return;
196 } 195 }
197 RequestUser.OutPacket(im, ThrottleOutPacketType.Texture); 196 RequestUser.OutPacket(im, ThrottleOutPacketType.Texture);
diff --git a/OpenSim/Region/Environment/Modules/Agent/Xfer/XferModule.cs b/OpenSim/Region/Environment/Modules/Agent/Xfer/XferModule.cs
index eaf2198..8e90d17 100644
--- a/OpenSim/Region/Environment/Modules/Agent/Xfer/XferModule.cs
+++ b/OpenSim/Region/Environment/Modules/Agent/Xfer/XferModule.cs
@@ -41,6 +41,10 @@ namespace OpenSim.Region.Environment.Modules.Agent.Xfer
41 public Dictionary<string, byte[]> NewFiles = new Dictionary<string, byte[]>(); 41 public Dictionary<string, byte[]> NewFiles = new Dictionary<string, byte[]>();
42 public Dictionary<ulong, XferDownLoad> Transfers = new Dictionary<ulong, XferDownLoad>(); 42 public Dictionary<ulong, XferDownLoad> Transfers = new Dictionary<ulong, XferDownLoad>();
43 43
44 public XferModule()
45 {
46 }
47
44 #region IRegionModule Members 48 #region IRegionModule Members
45 49
46 public void Initialise(Scene scene, IConfigSource config) 50 public void Initialise(Scene scene, IConfigSource config)
@@ -145,11 +149,11 @@ namespace OpenSim.Region.Environment.Modules.Agent.Xfer
145 public IClientAPI Client; 149 public IClientAPI Client;
146 private bool complete; 150 private bool complete;
147 public byte[] Data = new byte[0]; 151 public byte[] Data = new byte[0];
148 public int DataPointer; 152 public int DataPointer = 0;
149 public string FileName = String.Empty; 153 public string FileName = String.Empty;
150 public uint Packet; 154 public uint Packet = 0;
151 public uint Serial = 1; 155 public uint Serial = 1;
152 public ulong XferID; 156 public ulong XferID = 0;
153 157
154 public XferDownLoad(string fileName, byte[] data, ulong xferID, IClientAPI client) 158 public XferDownLoad(string fileName, byte[] data, ulong xferID, IClientAPI client)
155 { 159 {
@@ -213,7 +217,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.Xfer
213 { 217 {
214 byte[] transferData = new byte[Data.Length - DataPointer]; 218 byte[] transferData = new byte[Data.Length - DataPointer];
215 Array.Copy(Data, DataPointer, transferData, 0, Data.Length - DataPointer); 219 Array.Copy(Data, DataPointer, transferData, 0, Data.Length - DataPointer);
216 uint endPacket = Packet |= 0x80000000; 220 uint endPacket = Packet |= (uint) 0x80000000;
217 Client.SendXferPacket(XferID, endPacket, transferData); 221 Client.SendXferPacket(XferID, endPacket, transferData);
218 Packet++; 222 Packet++;
219 DataPointer += (Data.Length - DataPointer); 223 DataPointer += (Data.Length - DataPointer);
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs
index 8d42681..15720fc 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs
@@ -44,15 +44,15 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
44 public class ChatModule : IRegionModule, ISimChat 44 public class ChatModule : IRegionModule, ISimChat
45 { 45 {
46 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 46 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
47 private readonly List<Scene> m_scenes = new List<Scene>(); 47 private string m_defaultzone = null;
48 private string m_defaultzone;
49 48
50 private IRCChatModule m_irc; 49 private IRCChatModule m_irc = null;
51 private Thread m_irc_connector; 50 private Thread m_irc_connector = null;
52 51
53 private string m_last_leaving_user; 52 private string m_last_leaving_user = null;
54 private string m_last_new_user; 53 private string m_last_new_user = null;
55 private int m_saydistance = 30; 54 private int m_saydistance = 30;
55 private List<Scene> m_scenes = new List<Scene>();
56 private int m_shoutdistance = 100; 56 private int m_shoutdistance = 100;
57 internal object m_syncInit = new object(); 57 internal object m_syncInit = new object();
58 internal object m_syncLogout = new object(); 58 internal object m_syncLogout = new object();
@@ -257,7 +257,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
257 } 257 }
258 catch (Exception ex) 258 catch (Exception ex)
259 { 259 {
260 m_log.Error("[IRC]: NewClient exception trap:" + ex); 260 m_log.Error("[IRC]: NewClient exception trap:" + ex.ToString());
261 } 261 }
262 } 262 }
263 263
@@ -284,7 +284,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
284 } 284 }
285 catch (Exception ex) 285 catch (Exception ex)
286 { 286 {
287 m_log.Error("[IRC]: ClientLoggedOut exception trap:" + ex); 287 m_log.Error("[IRC]: ClientLoggedOut exception trap:" + ex.ToString());
288 } 288 }
289 } 289 }
290 } 290 }
@@ -372,24 +372,24 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
372 #endregion 372 #endregion
373 373
374 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 374 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
375
376 private readonly string m_basenick;
377 private readonly string m_channel;
378 private readonly bool m_enabled;
379 private readonly uint m_port = 6668;
380 private readonly string m_privmsgformat = "PRIVMSG {0} :<{1} in {2}>: {3}";
381 private readonly string m_user = "USER OpenSimBot 8 * :I'm a OpenSim to irc bot";
382 private Thread listener; 375 private Thread listener;
383 private bool m_connected; 376
384 private List<Scene> m_last_scenes; 377 private string m_basenick = null;
385 private string m_nick; 378 private string m_channel = null;
379 private bool m_connected = false;
380 private bool m_enabled = false;
381 private List<Scene> m_last_scenes = null;
382 private string m_nick = null;
383 private uint m_port = 6668;
384 private string m_privmsgformat = "PRIVMSG {0} :<{1} in {2}>: {3}";
386 private StreamReader m_reader; 385 private StreamReader m_reader;
387 private List<Scene> m_scenes; 386 private List<Scene> m_scenes = null;
388 private string m_server; 387 private string m_server = null;
389 388
390 private NetworkStream m_stream; 389 private NetworkStream m_stream;
391 internal object m_syncConnect = new object(); 390 internal object m_syncConnect = new object();
392 private TcpClient m_tcp; 391 private TcpClient m_tcp;
392 private string m_user = "USER OpenSimBot 8 * :I'm a OpenSim to irc bot";
393 private StreamWriter m_writer; 393 private StreamWriter m_writer;
394 394
395 private Thread pingSender; 395 private Thread pingSender;
@@ -478,13 +478,13 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
478 m_reader = new StreamReader(m_stream); 478 m_reader = new StreamReader(m_stream);
479 m_writer = new StreamWriter(m_stream); 479 m_writer = new StreamWriter(m_stream);
480 480
481 pingSender = new Thread(PingRun); 481 pingSender = new Thread(new ThreadStart(PingRun));
482 pingSender.Name = "PingSenderThread"; 482 pingSender.Name = "PingSenderThread";
483 pingSender.IsBackground = true; 483 pingSender.IsBackground = true;
484 pingSender.Start(); 484 pingSender.Start();
485 ThreadTracker.Add(pingSender); 485 ThreadTracker.Add(pingSender);
486 486
487 listener = new Thread(ListenerRun); 487 listener = new Thread(new ThreadStart(ListenerRun));
488 listener.Name = "IRCChatModuleListenerThread"; 488 listener.Name = "IRCChatModuleListenerThread";
489 listener.IsBackground = true; 489 listener.IsBackground = true;
490 listener.Start(); 490 listener.Start();
@@ -545,7 +545,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
545 } 545 }
546 catch (Exception ex) 546 catch (Exception ex)
547 { 547 {
548 m_log.Error("[IRC]: PrivMsg exception trap:" + ex); 548 m_log.Error("[IRC]: PrivMsg exception trap:" + ex.ToString());
549 } 549 }
550 } 550 }
551 551
@@ -588,7 +588,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
588 { 588 {
589 try 589 try
590 { 590 {
591 if (m_connected) 591 if (m_connected == true)
592 { 592 {
593 m_writer.WriteLine("PING :" + m_server); 593 m_writer.WriteLine("PING :" + m_server);
594 m_writer.Flush(); 594 m_writer.Flush();
@@ -602,7 +602,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
602 } 602 }
603 catch (Exception ex) 603 catch (Exception ex)
604 { 604 {
605 m_log.Error("[IRC]: PingRun exception trap:" + ex + "\n" + ex.StackTrace); 605 m_log.Error("[IRC]: PingRun exception trap:" + ex.ToString() + "\n" + ex.StackTrace);
606 } 606 }
607 } 607 }
608 } 608 }
@@ -615,7 +615,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
615 { 615 {
616 try 616 try
617 { 617 {
618 while (m_connected && ((inputLine = m_reader.ReadLine()) != null)) 618 while ((m_connected == true) && ((inputLine = m_reader.ReadLine()) != null))
619 { 619 {
620 // Console.WriteLine(inputLine); 620 // Console.WriteLine(inputLine);
621 if (inputLine.Contains(m_channel)) 621 if (inputLine.Contains(m_channel))
@@ -659,7 +659,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
659 } 659 }
660 catch (Exception ex) 660 catch (Exception ex)
661 { 661 {
662 m_log.Error("[IRC]: ListenerRun exception trap:" + ex + "\n" + ex.StackTrace); 662 m_log.Error("[IRC]: ListenerRun exception trap:" + ex.ToString() + "\n" + ex.StackTrace);
663 } 663 }
664 } 664 }
665 } 665 }
@@ -685,7 +685,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
685 } 685 }
686 catch (Exception ex) // IRC gate should not crash Sim 686 catch (Exception ex) // IRC gate should not crash Sim
687 { 687 {
688 m_log.Error("[IRC]: BroadcastSim Exception Trap:" + ex + "\n" + ex.StackTrace); 688 m_log.Error("[IRC]: BroadcastSim Exception Trap:" + ex.ToString() + "\n" + ex.StackTrace);
689 } 689 }
690 } 690 }
691 691
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs
index cc6fd77..966c5e2 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs
@@ -65,55 +65,55 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
65 public class SampleMoneyModule : IMoneyModule 65 public class SampleMoneyModule : IMoneyModule
66 { 66 {
67 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 67 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
68 private readonly Dictionary<LLUUID, int> m_KnownClientFunds = new Dictionary<LLUUID, int>();
69
70 /// <summary>
71 /// Region UUIDS indexed by AgentID
72 /// </summary>
73 private readonly Dictionary<LLUUID, LLUUID> m_rootAgents = new Dictionary<LLUUID, LLUUID>();
74
75 /// <summary>
76 /// Scenes by Region Handle
77 /// </summary>
78 private readonly Dictionary<ulong, Scene> m_scenel = new Dictionary<ulong, Scene>();
79 68
80 /// <summary> 69 /// <summary>
81 /// Where Stipends come from and Fees go to. 70 /// Where Stipends come from and Fees go to.
82 /// </summary> 71 /// </summary>
83 private LLUUID EconomyBaseAccount = LLUUID.Zero; 72 private LLUUID EconomyBaseAccount = LLUUID.Zero;
84 73
85 private float EnergyEfficiency; 74 private float EnergyEfficiency = 0f;
86 private bool gridmode; 75 private bool gridmode = false;
87 private ObjectPaid handerOnObjectPaid; 76 private ObjectPaid handerOnObjectPaid;
88 private bool m_enabled = true; 77 private bool m_enabled = true;
89 78
90 private IConfigSource m_gConfig; 79 private IConfigSource m_gConfig;
91 80
92 private bool m_keepMoneyAcrossLogins = true; 81 private bool m_keepMoneyAcrossLogins = true;
82 private Dictionary<LLUUID, int> m_KnownClientFunds = new Dictionary<LLUUID, int>();
93 private string m_LandAddress = String.Empty; 83 private string m_LandAddress = String.Empty;
94 84
95 private int m_minFundsBeforeRefresh = 100; 85 private int m_minFundsBeforeRefresh = 100;
96 private string m_MoneyAddress = String.Empty; 86 private string m_MoneyAddress = String.Empty;
97 87
88 /// <summary>
89 /// Region UUIDS indexed by AgentID
90 /// </summary>
91 private Dictionary<LLUUID, LLUUID> m_rootAgents = new Dictionary<LLUUID, LLUUID>();
92
93 /// <summary>
94 /// Scenes by Region Handle
95 /// </summary>
96 private Dictionary<ulong, Scene> m_scenel = new Dictionary<ulong, Scene>();
97
98 private int m_stipend = 1000; 98 private int m_stipend = 1000;
99 99
100 private int ObjectCapacity = 45000; 100 private int ObjectCapacity = 45000;
101 private int ObjectCount; 101 private int ObjectCount = 0;
102 private int PriceEnergyUnit; 102 private int PriceEnergyUnit = 0;
103 private int PriceGroupCreate; 103 private int PriceGroupCreate = 0;
104 private int PriceObjectClaim; 104 private int PriceObjectClaim = 0;
105 private float PriceObjectRent; 105 private float PriceObjectRent = 0f;
106 private float PriceObjectScaleFactor; 106 private float PriceObjectScaleFactor = 0f;
107 private int PriceParcelClaim; 107 private int PriceParcelClaim = 0;
108 private float PriceParcelClaimFactor; 108 private float PriceParcelClaimFactor = 0f;
109 private int PriceParcelRent; 109 private int PriceParcelRent = 0;
110 private int PricePublicObjectDecay; 110 private int PricePublicObjectDecay = 0;
111 private int PricePublicObjectDelete; 111 private int PricePublicObjectDelete = 0;
112 private int PriceRentLight; 112 private int PriceRentLight = 0;
113 private int PriceUpload; 113 private int PriceUpload = 0;
114 private int TeleportMinPrice; 114 private int TeleportMinPrice = 0;
115 115
116 private float TeleportPriceExponent; 116 private float TeleportPriceExponent = 0f;
117 private int UserLevelPaysFees = 2; 117 private int UserLevelPaysFees = 2;
118 private Scene XMLRPCHandler; 118 private Scene XMLRPCHandler;
119 119
@@ -305,7 +305,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
305 Hashtable hbinfo = 305 Hashtable hbinfo =
306 GetBalanceForUserFromMoneyServer(client.AgentId, client.SecureSessionId, s.RegionInfo.originRegionID.ToString(), 306 GetBalanceForUserFromMoneyServer(client.AgentId, client.SecureSessionId, s.RegionInfo.originRegionID.ToString(),
307 s.RegionInfo.regionSecret); 307 s.RegionInfo.regionSecret);
308 if ((bool) hbinfo["success"]) 308 if ((bool) hbinfo["success"] == true)
309 { 309 {
310 Helpers.TryParse((string) hbinfo["agentId"], out agentID); 310 Helpers.TryParse((string) hbinfo["agentId"], out agentID);
311 try 311 try
@@ -333,7 +333,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
333 else 333 else
334 { 334 {
335 m_log.WarnFormat("[MONEY]: Getting Money for user {0} failed with the following message:{1}", agentID, 335 m_log.WarnFormat("[MONEY]: Getting Money for user {0} failed with the following message:{1}", agentID,
336 hbinfo["errorMessage"]); 336 (string) hbinfo["errorMessage"]);
337 client.SendAlertMessage((string) hbinfo["errorMessage"]); 337 client.SendAlertMessage((string) hbinfo["errorMessage"]);
338 } 338 }
339 SendMoneyBalance(client, agentID, client.SessionId, LLUUID.Zero); 339 SendMoneyBalance(client, agentID, client.SessionId, LLUUID.Zero);
@@ -660,7 +660,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
660 660
661 Hashtable hresult = genericCurrencyXMLRPCRequest(ht, "regionMoveMoney"); 661 Hashtable hresult = genericCurrencyXMLRPCRequest(ht, "regionMoveMoney");
662 662
663 if ((bool) hresult["success"]) 663 if ((bool) hresult["success"] == true)
664 { 664 {
665 int funds1 = 0; 665 int funds1 = 0;
666 int funds2 = 0; 666 int funds2 = 0;
@@ -718,7 +718,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
718 Hashtable hbinfo = 718 Hashtable hbinfo =
719 GetBalanceForUserFromMoneyServer(aClient.AgentId, aClient.SecureSessionId, s.RegionInfo.originRegionID.ToString(), 719 GetBalanceForUserFromMoneyServer(aClient.AgentId, aClient.SecureSessionId, s.RegionInfo.originRegionID.ToString(),
720 s.RegionInfo.regionSecret); 720 s.RegionInfo.regionSecret);
721 if ((bool) hbinfo["success"]) 721 if ((bool) hbinfo["success"] == true)
722 { 722 {
723 try 723 try
724 { 724 {
@@ -743,7 +743,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
743 else 743 else
744 { 744 {
745 m_log.WarnFormat("[MONEY]: Getting Money for user {0} failed with the following message:{1}", agentId, 745 m_log.WarnFormat("[MONEY]: Getting Money for user {0} failed with the following message:{1}", agentId,
746 hbinfo["errorMessage"]); 746 (string) hbinfo["errorMessage"]);
747 aClient.SendAlertMessage((string) hbinfo["errorMessage"]); 747 aClient.SendAlertMessage((string) hbinfo["errorMessage"]);
748 } 748 }
749 } 749 }
@@ -812,7 +812,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
812 string secret = (string) requestData["secret"]; 812 string secret = (string) requestData["secret"];
813 813
814 Scene userScene = GetRandomScene(); 814 Scene userScene = GetRandomScene();
815 if (userScene.RegionInfo.regionSecret == secret) 815 if (userScene.RegionInfo.regionSecret.ToString() == secret)
816 { 816 {
817 IClientAPI client = LocateClientObject(agentId); 817 IClientAPI client = LocateClientObject(agentId);
818 818
@@ -1238,7 +1238,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
1238 { 1238 {
1239 lock (e) 1239 lock (e)
1240 { 1240 {
1241 if (e.economyValidated && e.transactionID == 0) 1241 if (e.economyValidated == true && e.transactionID == 0)
1242 { 1242 {
1243 e.transactionID = Util.UnixTimeSinceEpoch(); 1243 e.transactionID = Util.UnixTimeSinceEpoch();
1244 1244
@@ -1328,7 +1328,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
1328 else 1328 else
1329 { 1329 {
1330 m_log.Warn("[MONEY]: Potential Fraud Warning, got money transfer request for avatar that isn't in this simulator - Details; Sender:" + 1330 m_log.Warn("[MONEY]: Potential Fraud Warning, got money transfer request for avatar that isn't in this simulator - Details; Sender:" +
1331 e.sender + " Receiver: " + e.receiver + " Amount: " + e.amount); 1331 e.sender.ToString() + " Receiver: " + e.receiver.ToString() + " Amount: " + e.amount.ToString());
1332 } 1332 }
1333 } 1333 }
1334 1334
@@ -1400,7 +1400,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
1400 { 1400 {
1401 Hashtable hresult = 1401 Hashtable hresult =
1402 claim_user(avatar.UUID, avatar.ControllingClient.SecureSessionId, regionID, RegionItem.RegionInfo.regionSecret); 1402 claim_user(avatar.UUID, avatar.ControllingClient.SecureSessionId, regionID, RegionItem.RegionInfo.regionSecret);
1403 if ((bool) hresult["success"]) 1403 if ((bool) hresult["success"] == true)
1404 { 1404 {
1405 int funds = 0; 1405 int funds = 0;
1406 try 1406 try
@@ -1432,7 +1432,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
1432 if (RegionItem != null) 1432 if (RegionItem != null)
1433 { 1433 {
1434 Hashtable hresult = claim_user(avatar.UUID, avatar.ControllingClient.SecureSessionId, regionID, RegionItem.RegionInfo.regionSecret); 1434 Hashtable hresult = claim_user(avatar.UUID, avatar.ControllingClient.SecureSessionId, regionID, RegionItem.RegionInfo.regionSecret);
1435 if ((bool) hresult["success"]) 1435 if ((bool) hresult["success"] == true)
1436 { 1436 {
1437 int funds = 0; 1437 int funds = 0;
1438 try 1438 try
@@ -1460,7 +1460,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
1460 #endregion 1460 #endregion
1461 } 1461 }
1462 1462
1463 public enum TransactionType 1463 public enum TransactionType : int
1464 { 1464 {
1465 SystemGenerated = 0, 1465 SystemGenerated = 0,
1466 RegionMoneyRequest = 1, 1466 RegionMoneyRequest = 1,
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs
index 1dffc62..dd6a92e 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs
@@ -42,10 +42,10 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
42 { 42 {
43 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 43 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
44 44
45 private readonly Dictionary<LLUUID, List<FriendListItem>> FriendLists = new Dictionary<LLUUID, List<FriendListItem>>(); 45 private Dictionary<LLUUID, List<FriendListItem>> FriendLists = new Dictionary<LLUUID, List<FriendListItem>>();
46 private readonly Dictionary<LLUUID, LLUUID> m_pendingFriendRequests = new Dictionary<LLUUID, LLUUID>(); 46 private Dictionary<LLUUID, LLUUID> m_pendingFriendRequests = new Dictionary<LLUUID, LLUUID>();
47 private readonly Dictionary<LLUUID, ulong> m_rootAgents = new Dictionary<LLUUID, ulong>(); 47 private Dictionary<LLUUID, ulong> m_rootAgents = new Dictionary<LLUUID, ulong>();
48 private readonly List<Scene> m_scene = new List<Scene>(); 48 private List<Scene> m_scene = new List<Scene>();
49 49
50 #region IRegionModule Members 50 #region IRegionModule Members
51 51
@@ -213,7 +213,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
213 List<LLUUID> updateUsers = new List<LLUUID>(); 213 List<LLUUID> updateUsers = new List<LLUUID>();
214 foreach (FriendListItem fli in lfli) 214 foreach (FriendListItem fli in lfli)
215 { 215 {
216 if (fli.onlinestatus) 216 if (fli.onlinestatus == true)
217 { 217 {
218 updateUsers.Add(fli.Friend); 218 updateUsers.Add(fli.Friend);
219 } 219 }
@@ -357,20 +357,20 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
357 // https://wiki.secondlife.com/wiki/ImprovedInstantMessage 357 // https://wiki.secondlife.com/wiki/ImprovedInstantMessage
358 358
359 // 38 == Offer friendship 359 // 38 == Offer friendship
360 if (dialog == 38) 360 if (dialog == (byte) 38)
361 { 361 {
362 LLUUID friendTransactionID = LLUUID.Random(); 362 LLUUID friendTransactionID = LLUUID.Random();
363 363
364 m_pendingFriendRequests.Add(friendTransactionID, fromAgentID); 364 m_pendingFriendRequests.Add(friendTransactionID, fromAgentID);
365 365
366 m_log.Info("[FRIEND]: 38 - From:" + fromAgentID + " To: " + toAgentID + " Session:" + imSessionID + " Message:" + 366 m_log.Info("[FRIEND]: 38 - From:" + fromAgentID.ToString() + " To: " + toAgentID.ToString() + " Session:" + imSessionID.ToString() + " Message:" +
367 message); 367 message);
368 GridInstantMessage msg = new GridInstantMessage(); 368 GridInstantMessage msg = new GridInstantMessage();
369 msg.fromAgentID = fromAgentID.UUID; 369 msg.fromAgentID = fromAgentID.UUID;
370 msg.fromAgentSession = fromAgentSession.UUID; 370 msg.fromAgentSession = fromAgentSession.UUID;
371 msg.toAgentID = toAgentID.UUID; 371 msg.toAgentID = toAgentID.UUID;
372 msg.imSessionID = friendTransactionID.UUID; // This is the item we're mucking with here 372 msg.imSessionID = friendTransactionID.UUID; // This is the item we're mucking with here
373 m_log.Info("[FRIEND]: Filling Session: " + msg.imSessionID); 373 m_log.Info("[FRIEND]: Filling Session: " + msg.imSessionID.ToString());
374 msg.timestamp = timestamp; 374 msg.timestamp = timestamp;
375 if (client != null) 375 if (client != null)
376 { 376 {
@@ -393,16 +393,16 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
393 } 393 }
394 394
395 // 39 == Accept Friendship 395 // 39 == Accept Friendship
396 if (dialog == 39) 396 if (dialog == (byte) 39)
397 { 397 {
398 m_log.Info("[FRIEND]: 39 - From:" + fromAgentID + " To: " + toAgentID + " Session:" + imSessionID + " Message:" + 398 m_log.Info("[FRIEND]: 39 - From:" + fromAgentID.ToString() + " To: " + toAgentID.ToString() + " Session:" + imSessionID.ToString() + " Message:" +
399 message); 399 message);
400 } 400 }
401 401
402 // 40 == Decline Friendship 402 // 40 == Decline Friendship
403 if (dialog == 40) 403 if (dialog == (byte) 40)
404 { 404 {
405 m_log.Info("[FRIEND]: 40 - From:" + fromAgentID + " To: " + toAgentID + " Session:" + imSessionID + " Message:" + 405 m_log.Info("[FRIEND]: 40 - From:" + fromAgentID.ToString() + " To: " + toAgentID.ToString() + " Session:" + imSessionID.ToString() + " Message:" +
406 message); 406 message);
407 } 407 }
408 } 408 }
@@ -433,14 +433,14 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
433 msg.ParentEstateID = 0; 433 msg.ParentEstateID = 0;
434 msg.timestamp = (uint) Util.UnixTimeSinceEpoch(); 434 msg.timestamp = (uint) Util.UnixTimeSinceEpoch();
435 msg.RegionID = SceneAgentIn.RegionInfo.RegionID.UUID; 435 msg.RegionID = SceneAgentIn.RegionInfo.RegionID.UUID;
436 msg.dialog = 39; // Approved friend request 436 msg.dialog = (byte) 39; // Approved friend request
437 msg.Position = new sLLVector3(); 437 msg.Position = new sLLVector3();
438 msg.offline = 0; 438 msg.offline = (byte) 0;
439 msg.binaryBucket = new byte[0]; 439 msg.binaryBucket = new byte[0];
440 // We don't really care which scene we pipe it through, it goes to the shared IM Module and/or the database 440 // We don't really care which scene we pipe it through, it goes to the shared IM Module and/or the database
441 441
442 SceneAgentIn.TriggerGridInstantMessage(msg, InstantMessageReceiver.IMModule); 442 SceneAgentIn.TriggerGridInstantMessage(msg, InstantMessageReceiver.IMModule);
443 SceneAgentIn.StoreAddFriendship(m_pendingFriendRequests[transactionID], agentID, 1); 443 SceneAgentIn.StoreAddFriendship(m_pendingFriendRequests[transactionID], agentID, (uint) 1);
444 m_pendingFriendRequests.Remove(transactionID); 444 m_pendingFriendRequests.Remove(transactionID);
445 445
446 // TODO: Inform agent that the friend is online 446 // TODO: Inform agent that the friend is online
@@ -471,9 +471,9 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
471 msg.ParentEstateID = 0; 471 msg.ParentEstateID = 0;
472 msg.timestamp = (uint) Util.UnixTimeSinceEpoch(); 472 msg.timestamp = (uint) Util.UnixTimeSinceEpoch();
473 msg.RegionID = SceneAgentIn.RegionInfo.RegionID.UUID; 473 msg.RegionID = SceneAgentIn.RegionInfo.RegionID.UUID;
474 msg.dialog = 40; // Deny friend request 474 msg.dialog = (byte) 40; // Deny friend request
475 msg.Position = new sLLVector3(); 475 msg.Position = new sLLVector3();
476 msg.offline = 0; 476 msg.offline = (byte) 0;
477 msg.binaryBucket = new byte[0]; 477 msg.binaryBucket = new byte[0];
478 SceneAgentIn.TriggerGridInstantMessage(msg, InstantMessageReceiver.IMModule); 478 SceneAgentIn.TriggerGridInstantMessage(msg, InstantMessageReceiver.IMModule);
479 m_pendingFriendRequests.Remove(transactionID); 479 m_pendingFriendRequests.Remove(transactionID);
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Groups/GroupsModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Groups/GroupsModule.cs
index 858cf21..6edc44d 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Groups/GroupsModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Groups/GroupsModule.cs
@@ -41,10 +41,10 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups
41 { 41 {
42 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 42 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
43 43
44 private readonly Dictionary<LLUUID, GroupList> m_grouplistmap = new Dictionary<LLUUID, GroupList>(); 44 private Dictionary<LLUUID, GroupList> m_grouplistmap = new Dictionary<LLUUID, GroupList>();
45 private readonly Dictionary<LLUUID, GroupData> m_groupmap = new Dictionary<LLUUID, GroupData>(); 45 private Dictionary<LLUUID, GroupData> m_groupmap = new Dictionary<LLUUID, GroupData>();
46 private readonly Dictionary<LLUUID, IClientAPI> m_iclientmap = new Dictionary<LLUUID, IClientAPI>(); 46 private Dictionary<LLUUID, IClientAPI> m_iclientmap = new Dictionary<LLUUID, IClientAPI>();
47 private readonly List<Scene> m_scene = new List<Scene>(); 47 private List<Scene> m_scene = new List<Scene>();
48 48
49 #region IRegionModule Members 49 #region IRegionModule Members
50 50
@@ -214,7 +214,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups
214 } 214 }
215 else 215 else
216 { 216 {
217 m_log.Info("[GROUP]: Removing all reference to groups for " + agentID); 217 m_log.Info("[GROUP]: Removing all reference to groups for " + agentID.ToString());
218 } 218 }
219 m_iclientmap.Remove(agentID); 219 m_iclientmap.Remove(agentID);
220 } 220 }
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Inventory/InventoryModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Inventory/InventoryModule.cs
index 9f2d461..624f307 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Inventory/InventoryModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Inventory/InventoryModule.cs
@@ -46,7 +46,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Inventory
46 /// occurs in the initial offer message, not the accept message. So this dictionary links 46 /// occurs in the initial offer message, not the accept message. So this dictionary links
47 /// IM Session Ids to ItemIds 47 /// IM Session Ids to ItemIds
48 /// </summary> 48 /// </summary>
49 private readonly IDictionary<LLUUID, LLUUID> m_pendingOffers = new Dictionary<LLUUID, LLUUID>(); 49 private IDictionary<LLUUID, LLUUID> m_pendingOffers = new Dictionary<LLUUID, LLUUID>();
50 50
51 private Scene m_scene; 51 private Scene m_scene;
52 52
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Profiles/AvatarProfilesModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Profiles/AvatarProfilesModule.cs
index 87f0177..15825b6 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Profiles/AvatarProfilesModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Profiles/AvatarProfilesModule.cs
@@ -41,6 +41,10 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Profiles
41 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 41 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
42 private Scene m_scene; 42 private Scene m_scene;
43 43
44 public AvatarProfilesModule()
45 {
46 }
47
44 #region IRegionModule Members 48 #region IRegionModule Members
45 49
46 public void Initialise(Scene scene, IConfigSource config) 50 public void Initialise(Scene scene, IConfigSource config)
@@ -100,7 +104,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Profiles
100 } 104 }
101 else 105 else
102 { 106 {
103 m_log.Debug("[AvatarProfilesModule]: Got null for profile for " + avatarID); 107 m_log.Debug("[AvatarProfilesModule]: Got null for profile for " + avatarID.ToString());
104 } 108 }
105 } 109 }
106 110
diff --git a/OpenSim/Region/Environment/Modules/Framework/Commander.cs b/OpenSim/Region/Environment/Modules/Framework/Commander.cs
index d226c3d..4430c10 100644
--- a/OpenSim/Region/Environment/Modules/Framework/Commander.cs
+++ b/OpenSim/Region/Environment/Modules/Framework/Commander.cs
@@ -42,11 +42,11 @@ namespace OpenSim.Region.Environment.Modules.Framework
42 public class Command : ICommand 42 public class Command : ICommand
43 { 43 {
44 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 44 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
45 private readonly List<CommandArgument> m_args = new List<CommandArgument>(); 45 private List<CommandArgument> m_args = new List<CommandArgument>();
46 46
47 private readonly Action<object[]> m_command; 47 private Action<object[]> m_command;
48 private readonly string m_help; 48 private string m_help;
49 private readonly string m_name; 49 private string m_name;
50 50
51 public Command(string name, Action<Object[]> command, string help) 51 public Command(string name, Action<Object[]> command, string help)
52 { 52 {
@@ -164,9 +164,9 @@ namespace OpenSim.Region.Environment.Modules.Framework
164 /// </summary> 164 /// </summary>
165 public class CommandArgument 165 public class CommandArgument
166 { 166 {
167 private readonly string m_help; 167 private string m_help;
168 private readonly string m_name; 168 private string m_name;
169 private readonly string m_type; 169 private string m_type;
170 private Object m_val; 170 private Object m_val;
171 171
172 public CommandArgument(string name, string help, string type) 172 public CommandArgument(string name, string help, string type)
@@ -204,8 +204,8 @@ namespace OpenSim.Region.Environment.Modules.Framework
204 public class Commander : ICommander 204 public class Commander : ICommander
205 { 205 {
206 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 206 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
207 private readonly Dictionary<string, ICommand> m_commands = new Dictionary<string, ICommand>(); 207 private Dictionary<string, ICommand> m_commands = new Dictionary<string, ICommand>();
208 private readonly string m_name; 208 private string m_name;
209 209
210 public Commander(string name) 210 public Commander(string name)
211 { 211 {
@@ -235,11 +235,11 @@ namespace OpenSim.Region.Environment.Modules.Framework
235 } 235 }
236 classSrc = classSrc.Remove(classSrc.Length - 1); // Delete the last comma 236 classSrc = classSrc.Remove(classSrc.Length - 1); // Delete the last comma
237 classSrc += " )\n\t{\n"; 237 classSrc += " )\n\t{\n";
238 classSrc += "\t\tObject[] args = new Object[" + com.Arguments.Count + "];\n"; 238 classSrc += "\t\tObject[] args = new Object[" + com.Arguments.Count.ToString() + "];\n";
239 int i = 0; 239 int i = 0;
240 foreach (KeyValuePair<string, string> arg in com.Arguments) 240 foreach (KeyValuePair<string, string> arg in com.Arguments)
241 { 241 {
242 classSrc += "\t\targs[" + i + "] = " + Util.Md5Hash(arg.Key) + " " + ";\n"; 242 classSrc += "\t\targs[" + i.ToString() + "] = " + Util.Md5Hash(arg.Key) + " " + ";\n";
243 i++; 243 i++;
244 } 244 }
245 classSrc += "\t\tGetCommander(\"" + m_name + "\").Run(\"" + com.Name + "\", args);\n"; 245 classSrc += "\t\tGetCommander(\"" + m_name + "\").Run(\"" + com.Name + "\", args);\n";
diff --git a/OpenSim/Region/Environment/Modules/Framework/CommanderTestModule.cs b/OpenSim/Region/Environment/Modules/Framework/CommanderTestModule.cs
index 3df9129..7b5c981 100644
--- a/OpenSim/Region/Environment/Modules/Framework/CommanderTestModule.cs
+++ b/OpenSim/Region/Environment/Modules/Framework/CommanderTestModule.cs
@@ -34,7 +34,7 @@ namespace OpenSim.Region.Environment.Modules.Framework
34{ 34{
35 public class CommanderTestModule : IRegionModule, ICommandableModule 35 public class CommanderTestModule : IRegionModule, ICommandableModule
36 { 36 {
37 private readonly Commander m_commander = new Commander("CommanderTest"); 37 private Commander m_commander = new Commander("CommanderTest");
38 private Scene m_scene; 38 private Scene m_scene;
39 39
40 #region ICommandableModule Members 40 #region ICommandableModule Members
diff --git a/OpenSim/Region/Environment/Modules/Grid/Interregion/InterregionModule.cs b/OpenSim/Region/Environment/Modules/Grid/Interregion/InterregionModule.cs
index ac2ac0b..2ca4df9 100644
--- a/OpenSim/Region/Environment/Modules/Grid/Interregion/InterregionModule.cs
+++ b/OpenSim/Region/Environment/Modules/Grid/Interregion/InterregionModule.cs
@@ -29,14 +29,14 @@ namespace OpenSim.Region.Environment.Modules.Grid.Interregion
29 #endregion 29 #endregion
30 30
31 private readonly Dictionary<Type, Object> m_interfaces = new Dictionary<Type, object>(); 31 private readonly Dictionary<Type, Object> m_interfaces = new Dictionary<Type, object>();
32 private readonly Object m_lockObject = new object();
33 private readonly List<Location> m_myLocations = new List<Location>(); 32 private readonly List<Location> m_myLocations = new List<Location>();
34 33
35 private readonly Dictionary<Location, string[]> m_neighbourInterfaces = new Dictionary<Location, string[]>(); 34 private readonly Dictionary<Location, string[]> m_neighbourInterfaces = new Dictionary<Location, string[]>();
36 private readonly Dictionary<Location, RemotingObject> m_neighbourRemote = new Dictionary<Location, RemotingObject>(); 35 private readonly Dictionary<Location, RemotingObject> m_neighbourRemote = new Dictionary<Location, RemotingObject>();
37 private IConfigSource m_config; 36 private IConfigSource m_config;
38 private bool m_enabled; 37 private bool m_enabled = false;
39 38
39 private Object m_lockObject = new object();
40 private RemotingObject m_myRemote; 40 private RemotingObject m_myRemote;
41 private TcpChannel m_tcpChannel; 41 private TcpChannel m_tcpChannel;
42 private int m_tcpPort = 10101; 42 private int m_tcpPort = 10101;
diff --git a/OpenSim/Region/Environment/Modules/Scripting/DynamicTexture/DynamicTextureModule.cs b/OpenSim/Region/Environment/Modules/Scripting/DynamicTexture/DynamicTextureModule.cs
index d926714..c0e3d3b 100644
--- a/OpenSim/Region/Environment/Modules/Scripting/DynamicTexture/DynamicTextureModule.cs
+++ b/OpenSim/Region/Environment/Modules/Scripting/DynamicTexture/DynamicTextureModule.cs
@@ -40,12 +40,12 @@ namespace OpenSim.Region.Environment.Modules.Scripting.DynamicTexture
40{ 40{
41 public class DynamicTextureModule : IRegionModule, IDynamicTextureManager 41 public class DynamicTextureModule : IRegionModule, IDynamicTextureManager
42 { 42 {
43 private readonly Dictionary<LLUUID, Scene> RegisteredScenes = new Dictionary<LLUUID, Scene>(); 43 private Dictionary<LLUUID, Scene> RegisteredScenes = new Dictionary<LLUUID, Scene>();
44 44
45 private readonly Dictionary<string, IDynamicTextureRender> RenderPlugins = 45 private Dictionary<string, IDynamicTextureRender> RenderPlugins =
46 new Dictionary<string, IDynamicTextureRender>(); 46 new Dictionary<string, IDynamicTextureRender>();
47 47
48 private readonly Dictionary<LLUUID, DynamicTextureUpdater> Updaters = new Dictionary<LLUUID, DynamicTextureUpdater>(); 48 private Dictionary<LLUUID, DynamicTextureUpdater> Updaters = new Dictionary<LLUUID, DynamicTextureUpdater>();
49 49
50 #region IDynamicTextureManager Members 50 #region IDynamicTextureManager Members
51 51
@@ -176,14 +176,14 @@ namespace OpenSim.Region.Environment.Modules.Scripting.DynamicTexture
176 176
177 public class DynamicTextureUpdater 177 public class DynamicTextureUpdater
178 { 178 {
179 public bool BlendWithOldTexture; 179 public bool BlendWithOldTexture = false;
180 public string BodyData; 180 public string BodyData;
181 public string ContentType; 181 public string ContentType;
182 public byte FrontAlpha = 255; 182 public byte FrontAlpha = 255;
183 public LLUUID LastAssetID; 183 public LLUUID LastAssetID;
184 public string Params; 184 public string Params;
185 public LLUUID PrimID; 185 public LLUUID PrimID;
186 public bool SetNewFrontAlpha; 186 public bool SetNewFrontAlpha = false;
187 public LLUUID SimUUID; 187 public LLUUID SimUUID;
188 public LLUUID UpdaterID; 188 public LLUUID UpdaterID;
189 public int UpdateTimer; 189 public int UpdateTimer;
diff --git a/OpenSim/Region/Environment/Modules/Scripting/HttpRequest/ScriptsHttpRequests.cs b/OpenSim/Region/Environment/Modules/Scripting/HttpRequest/ScriptsHttpRequests.cs
index 4bde33b..e1339a3 100644
--- a/OpenSim/Region/Environment/Modules/Scripting/HttpRequest/ScriptsHttpRequests.cs
+++ b/OpenSim/Region/Environment/Modules/Scripting/HttpRequest/ScriptsHttpRequests.cs
@@ -84,7 +84,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.HttpRequest
84{ 84{
85 public class HttpRequestModule : IRegionModule, IHttpRequests 85 public class HttpRequestModule : IRegionModule, IHttpRequests
86 { 86 {
87 private readonly object HttpListLock = new object(); 87 private object HttpListLock = new object();
88 private int httpTimeout = 30000; 88 private int httpTimeout = 30000;
89 private string m_name = "HttpScriptRequests"; 89 private string m_name = "HttpScriptRequests";
90 90
@@ -93,6 +93,10 @@ namespace OpenSim.Region.Environment.Modules.Scripting.HttpRequest
93 private Scene m_scene; 93 private Scene m_scene;
94 private Queue<HttpRequestClass> rpcQueue = new Queue<HttpRequestClass>(); 94 private Queue<HttpRequestClass> rpcQueue = new Queue<HttpRequestClass>();
95 95
96 public HttpRequestModule()
97 {
98 }
99
96 #region IHttpRequests Members 100 #region IHttpRequests Members
97 101
98 public LLUUID MakeHttpRequest(string url, string parameters, string body) 102 public LLUUID MakeHttpRequest(string url, string parameters, string body)
diff --git a/OpenSim/Region/Environment/Modules/Scripting/LoadImageURL/LoadImageURLModule.cs b/OpenSim/Region/Environment/Modules/Scripting/LoadImageURL/LoadImageURLModule.cs
index f39f16d..c828ef0 100644
--- a/OpenSim/Region/Environment/Modules/Scripting/LoadImageURL/LoadImageURLModule.cs
+++ b/OpenSim/Region/Environment/Modules/Scripting/LoadImageURL/LoadImageURLModule.cs
@@ -120,9 +120,9 @@ namespace OpenSim.Region.Environment.Modules.Scripting.LoadImageURL
120 120
121 private void MakeHttpRequest(string url, LLUUID requestID) 121 private void MakeHttpRequest(string url, LLUUID requestID)
122 { 122 {
123 WebRequest request = WebRequest.Create(url); 123 WebRequest request = HttpWebRequest.Create(url);
124 RequestState state = new RequestState((HttpWebRequest) request, requestID); 124 RequestState state = new RequestState((HttpWebRequest) request, requestID);
125 IAsyncResult result = request.BeginGetResponse(HttpRequestReturn, state); 125 IAsyncResult result = request.BeginGetResponse(new AsyncCallback(HttpRequestReturn), state);
126 126
127 TimeSpan t = (DateTime.UtcNow - new DateTime(1970, 1, 1)); 127 TimeSpan t = (DateTime.UtcNow - new DateTime(1970, 1, 1));
128 state.TimeOfRequest = (int) t.TotalSeconds; 128 state.TimeOfRequest = (int) t.TotalSeconds;
@@ -131,7 +131,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.LoadImageURL
131 private void HttpRequestReturn(IAsyncResult result) 131 private void HttpRequestReturn(IAsyncResult result)
132 { 132 {
133 RequestState state = (RequestState) result.AsyncState; 133 RequestState state = (RequestState) result.AsyncState;
134 WebRequest request = state.Request; 134 WebRequest request = (WebRequest) state.Request;
135 HttpWebResponse response = (HttpWebResponse) request.EndGetResponse(result); 135 HttpWebResponse response = (HttpWebResponse) request.EndGetResponse(result);
136 if (response.StatusCode == HttpStatusCode.OK) 136 if (response.StatusCode == HttpStatusCode.OK)
137 { 137 {
@@ -175,9 +175,9 @@ namespace OpenSim.Region.Environment.Modules.Scripting.LoadImageURL
175 175
176 public class RequestState 176 public class RequestState
177 { 177 {
178 public HttpWebRequest Request; 178 public HttpWebRequest Request = null;
179 public LLUUID RequestID = LLUUID.Zero; 179 public LLUUID RequestID = LLUUID.Zero;
180 public int TimeOfRequest; 180 public int TimeOfRequest = 0;
181 181
182 public RequestState(HttpWebRequest request, LLUUID requestID) 182 public RequestState(HttpWebRequest request, LLUUID requestID)
183 { 183 {
diff --git a/OpenSim/Region/Environment/Modules/Scripting/VectorRender/VectorRenderModule.cs b/OpenSim/Region/Environment/Modules/Scripting/VectorRender/VectorRenderModule.cs
index 8e434c7..626c60f 100644
--- a/OpenSim/Region/Environment/Modules/Scripting/VectorRender/VectorRenderModule.cs
+++ b/OpenSim/Region/Environment/Modules/Scripting/VectorRender/VectorRenderModule.cs
@@ -48,6 +48,10 @@ namespace OpenSim.Region.Environment.Modules.Scripting.VectorRender
48 private Scene m_scene; 48 private Scene m_scene;
49 private IDynamicTextureManager m_textureManager; 49 private IDynamicTextureManager m_textureManager;
50 50
51 public VectorRenderModule()
52 {
53 }
54
51 #region IDynamicTextureRender Members 55 #region IDynamicTextureRender Members
52 56
53 public string GetContentType() 57 public string GetContentType()
@@ -134,7 +138,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.VectorRender
134 catch (Exception e) 138 catch (Exception e)
135 { 139 {
136//Ckrinke: Add a WriteLine to remove the warning about 'e' defined but not used 140//Ckrinke: Add a WriteLine to remove the warning about 'e' defined but not used
137 Console.WriteLine("Problem with Draw. Please verify parameters." + e); 141 Console.WriteLine("Problem with Draw. Please verify parameters." + e.ToString());
138 } 142 }
139 143
140 if ((size < 128) || (size > 1024)) 144 if ((size < 128) || (size > 1024))
@@ -256,7 +260,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.VectorRender
256 endPoint.X = (int) x; 260 endPoint.X = (int) x;
257 endPoint.Y = (int) y; 261 endPoint.Y = (int) y;
258 Image image = ImageHttpRequest(nextLine); 262 Image image = ImageHttpRequest(nextLine);
259 graph.DrawImage(image, startPoint.X, startPoint.Y, x, y); 263 graph.DrawImage(image, (float) startPoint.X, (float) startPoint.Y, x, y);
260 startPoint.X += endPoint.X; 264 startPoint.X += endPoint.X;
261 startPoint.Y += endPoint.Y; 265 startPoint.Y += endPoint.Y;
262 } 266 }
@@ -349,7 +353,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.VectorRender
349 353
350 private Bitmap ImageHttpRequest(string url) 354 private Bitmap ImageHttpRequest(string url)
351 { 355 {
352 WebRequest request = WebRequest.Create(url); 356 WebRequest request = HttpWebRequest.Create(url);
353//Ckrinke: Comment out for now as 'str' is unused. Bring it back into play later when it is used. 357//Ckrinke: Comment out for now as 'str' is unused. Bring it back into play later when it is used.
354//Ckrinke Stream str = null; 358//Ckrinke Stream str = null;
355 HttpWebResponse response = (HttpWebResponse) (request).GetResponse(); 359 HttpWebResponse response = (HttpWebResponse) (request).GetResponse();
diff --git a/OpenSim/Region/Environment/Modules/Scripting/WorldComm/WorldCommModule.cs b/OpenSim/Region/Environment/Modules/Scripting/WorldComm/WorldCommModule.cs
index c4c1718..e79b2bd 100644
--- a/OpenSim/Region/Environment/Modules/Scripting/WorldComm/WorldCommModule.cs
+++ b/OpenSim/Region/Environment/Modules/Scripting/WorldComm/WorldCommModule.cs
@@ -75,6 +75,10 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm
75 private Queue m_pendingQ; 75 private Queue m_pendingQ;
76 private Scene m_scene; 76 private Scene m_scene;
77 77
78 public WorldCommModule()
79 {
80 }
81
78 #region IRegionModule Members 82 #region IRegionModule Members
79 83
80 public void Initialise(Scene scene, IConfigSource config) 84 public void Initialise(Scene scene, IConfigSource config)
@@ -320,8 +324,8 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm
320 public class ListenerManager 324 public class ListenerManager
321 { 325 {
322 //private Dictionary<int, ListenerInfo> m_listeners; 326 //private Dictionary<int, ListenerInfo> m_listeners;
323 private readonly Hashtable m_listeners = Hashtable.Synchronized(new Hashtable());
324 private object ListenersLock = new object(); 327 private object ListenersLock = new object();
328 private Hashtable m_listeners = Hashtable.Synchronized(new Hashtable());
325 private int m_MaxListeners = 100; 329 private int m_MaxListeners = 100;
326 330
327 public int AddListener(uint localID, LLUUID itemID, LLUUID hostID, int channel, string name, string id, string msg) 331 public int AddListener(uint localID, LLUUID itemID, LLUUID hostID, int channel, string name, string id, string msg)
@@ -481,7 +485,6 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm
481 485
482 public class ListenerInfo 486 public class ListenerInfo
483 { 487 {
484 private readonly LLUUID m_sourceItemID; // ID of the scenePart or avatar source of the message
485 private bool m_active; // Listener is active or not 488 private bool m_active; // Listener is active or not
486 private int m_channel; // Channel 489 private int m_channel; // Channel
487 private int m_handle; // Assigned handle of this listener 490 private int m_handle; // Assigned handle of this listener
@@ -491,6 +494,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm
491 private uint m_localID; // Local ID from script engine 494 private uint m_localID; // Local ID from script engine
492 private string m_message; // The message 495 private string m_message; // The message
493 private string m_name; // Object name to filter messages from 496 private string m_name; // Object name to filter messages from
497 private LLUUID m_sourceItemID; // ID of the scenePart or avatar source of the message
494 498
495 public ListenerInfo(uint localID, int handle, LLUUID ItemID, LLUUID hostID, int channel, string name, LLUUID id, string message) 499 public ListenerInfo(uint localID, int handle, LLUUID ItemID, LLUUID hostID, int channel, string name, LLUUID id, string message)
496 { 500 {
diff --git a/OpenSim/Region/Environment/Modules/Scripting/XMLRPC/XMLRPCModule.cs b/OpenSim/Region/Environment/Modules/Scripting/XMLRPC/XMLRPCModule.cs
index 4f6808e..a039d42 100644
--- a/OpenSim/Region/Environment/Modules/Scripting/XMLRPC/XMLRPCModule.cs
+++ b/OpenSim/Region/Environment/Modules/Scripting/XMLRPC/XMLRPCModule.cs
@@ -78,20 +78,20 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
78 public class XMLRPCModule : IRegionModule, IXMLRPC 78 public class XMLRPCModule : IRegionModule, IXMLRPC
79 { 79 {
80 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 80 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
81 private readonly List<Scene> m_scenes = new List<Scene>();
82 private readonly object XMLRPCListLock = new object();
83 81
84 private string m_name = "XMLRPCModule"; 82 private string m_name = "XMLRPCModule";
85 83
86 // <channel id, RPCChannelInfo> 84 // <channel id, RPCChannelInfo>
87 private Dictionary<LLUUID, RPCChannelInfo> m_openChannels; 85 private Dictionary<LLUUID, RPCChannelInfo> m_openChannels;
88 private Dictionary<LLUUID, SendRemoteDataRequest> m_pendingSRDResponses; 86 private Dictionary<LLUUID, SendRemoteDataRequest> m_pendingSRDResponses;
89 private int m_remoteDataPort; 87 private int m_remoteDataPort = 0;
90 88
91 private Dictionary<LLUUID, RPCRequestInfo> m_rpcPending; 89 private Dictionary<LLUUID, RPCRequestInfo> m_rpcPending;
92 private Dictionary<LLUUID, RPCRequestInfo> m_rpcPendingResponses; 90 private Dictionary<LLUUID, RPCRequestInfo> m_rpcPendingResponses;
91 private List<Scene> m_scenes = new List<Scene>();
93 private int RemoteReplyScriptTimeout = 9000; 92 private int RemoteReplyScriptTimeout = 9000;
94 private int RemoteReplyScriptWait = 300; 93 private int RemoteReplyScriptWait = 300;
94 private object XMLRPCListLock = new object();
95 95
96 #region IRegionModule Members 96 #region IRegionModule Members
97 97
@@ -428,15 +428,15 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
428 428
429 public class RPCRequestInfo 429 public class RPCRequestInfo
430 { 430 {
431 private readonly LLUUID m_ChannelKey; 431 private LLUUID m_ChannelKey;
432 private readonly string m_IntVal; 432 private string m_IntVal;
433 private readonly LLUUID m_ItemID; 433 private LLUUID m_ItemID;
434 private readonly uint m_localID; 434 private uint m_localID;
435 private readonly LLUUID m_MessageID; 435 private LLUUID m_MessageID;
436 private readonly string m_StrVal;
437 private bool m_processed; 436 private bool m_processed;
438 private int m_respInt; 437 private int m_respInt;
439 private string m_respStr; 438 private string m_respStr;
439 private string m_StrVal;
440 440
441 public RPCRequestInfo(uint localID, LLUUID itemID, LLUUID channelKey, string strVal, string intVal) 441 public RPCRequestInfo(uint localID, LLUUID itemID, LLUUID channelKey, string strVal, string intVal)
442 { 442 {
@@ -514,9 +514,9 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
514 514
515 public class RPCChannelInfo 515 public class RPCChannelInfo
516 { 516 {
517 private readonly LLUUID m_ChannelKey; 517 private LLUUID m_ChannelKey;
518 private readonly LLUUID m_itemID; 518 private LLUUID m_itemID;
519 private readonly uint m_localID; 519 private uint m_localID;
520 520
521 public RPCChannelInfo(uint localID, LLUUID itemID, LLUUID channelID) 521 public RPCChannelInfo(uint localID, LLUUID itemID, LLUUID channelID)
522 { 522 {
diff --git a/OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs b/OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs
index 20d02c4..9ac3cc3 100644
--- a/OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs
+++ b/OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs
@@ -44,8 +44,8 @@ namespace OpenSim.Region.Environment.Modules.World.Land
44 //Land types set with flags in ParcelOverlay. 44 //Land types set with flags in ParcelOverlay.
45 //Only one of these can be used. 45 //Only one of these can be used.
46 public const float BAN_LINE_SAFETY_HIEGHT = 100; 46 public const float BAN_LINE_SAFETY_HIEGHT = 100;
47 public const byte LAND_FLAG_PROPERTY_BORDER_SOUTH = 128; //Equals 10000000 47 public const byte LAND_FLAG_PROPERTY_BORDER_SOUTH = (byte) 128; //Equals 10000000
48 public const byte LAND_FLAG_PROPERTY_BORDER_WEST = 64; //Equals 01000000 48 public const byte LAND_FLAG_PROPERTY_BORDER_WEST = (byte) 64; //Equals 01000000
49 49
50 //RequestResults (I think these are right, they seem to work): 50 //RequestResults (I think these are right, they seem to work):
51 public const int LAND_RESULT_MULTIPLE = 1; // The request they made contained more than a single peice of land 51 public const int LAND_RESULT_MULTIPLE = 1; // The request they made contained more than a single peice of land
@@ -55,26 +55,26 @@ namespace OpenSim.Region.Environment.Modules.World.Land
55 public const int LAND_SELECT_OBJECTS_GROUP = 4; 55 public const int LAND_SELECT_OBJECTS_GROUP = 4;
56 public const int LAND_SELECT_OBJECTS_OTHER = 8; 56 public const int LAND_SELECT_OBJECTS_OTHER = 8;
57 public const int LAND_SELECT_OBJECTS_OWNER = 2; 57 public const int LAND_SELECT_OBJECTS_OWNER = 2;
58 public const byte LAND_TYPE_IS_BEING_AUCTIONED = 5; //Equals 00000101 58 public const byte LAND_TYPE_IS_BEING_AUCTIONED = (byte) 5; //Equals 00000101
59 public const byte LAND_TYPE_IS_FOR_SALE = 4; //Equals 00000100 59 public const byte LAND_TYPE_IS_FOR_SALE = (byte) 4; //Equals 00000100
60 public const byte LAND_TYPE_OWNED_BY_GROUP = 2; //Equals 00000010 60 public const byte LAND_TYPE_OWNED_BY_GROUP = (byte) 2; //Equals 00000010
61 public const byte LAND_TYPE_OWNED_BY_OTHER = 1; //Equals 00000001 61 public const byte LAND_TYPE_OWNED_BY_OTHER = (byte) 1; //Equals 00000001
62 public const byte LAND_TYPE_OWNED_BY_REQUESTER = 3; //Equals 00000011 62 public const byte LAND_TYPE_OWNED_BY_REQUESTER = (byte) 3; //Equals 00000011
63 public const byte LAND_TYPE_PUBLIC = 0; //Equals 00000000 63 public const byte LAND_TYPE_PUBLIC = (byte) 0; //Equals 00000000
64 64
65 //These are other constants. Yay! 65 //These are other constants. Yay!
66 public const int START_LAND_LOCAL_ID = 1; 66 public const int START_LAND_LOCAL_ID = 1;
67 67
68 #endregion 68 #endregion
69 69
70 private readonly int[,] landIDList = new int[64,64]; 70 private int[,] landIDList = new int[64,64];
71 private readonly Dictionary<int, ILandObject> landList = new Dictionary<int, ILandObject>(); 71 private Dictionary<int, ILandObject> landList = new Dictionary<int, ILandObject>();
72 private readonly Scene m_scene;
73 72
74 private bool landPrimCountTainted; 73 private bool landPrimCountTainted = false;
75 private int lastLandLocalID = START_LAND_LOCAL_ID - 1; 74 private int lastLandLocalID = START_LAND_LOCAL_ID - 1;
76 75
77 private bool m_allowedForcefulBans = true; 76 private bool m_allowedForcefulBans = true;
77 private Scene m_scene;
78 78
79 public LandChannel(Scene scene) 79 public LandChannel(Scene scene)
80 { 80 {
@@ -192,7 +192,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
192 { 192 {
193 lastLandLocalID++; 193 lastLandLocalID++;
194 new_land.landData.localID = lastLandLocalID; 194 new_land.landData.localID = lastLandLocalID;
195 landList.Add(lastLandLocalID, new_land.Copy()); 195 landList.Add(lastLandLocalID, (LandObject) new_land.Copy());
196 196
197 197
198 bool[,] landBitmap = new_land.getLandBitmap(); 198 bool[,] landBitmap = new_land.getLandBitmap();
@@ -532,7 +532,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
532 { 532 {
533 for (x = 0; x < 64; x++) 533 for (x = 0; x < 64; x++)
534 { 534 {
535 byte tempByte = 0; //This represents the byte for the current 4x4 535 byte tempByte = (byte) 0; //This represents the byte for the current 4x4
536 ILandObject currentParcelBlock = null; 536 ILandObject currentParcelBlock = null;
537 537
538 try 538 try
@@ -611,7 +611,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
611 packet = (ParcelOverlayPacket) PacketPool.Instance.GetPacket(PacketType.ParcelOverlay); 611 packet = (ParcelOverlayPacket) PacketPool.Instance.GetPacket(PacketType.ParcelOverlay);
612 packet.ParcelData.Data = byteArray; 612 packet.ParcelData.Data = byteArray;
613 packet.ParcelData.SequenceID = sequenceID; 613 packet.ParcelData.SequenceID = sequenceID;
614 remote_client.OutPacket(packet, ThrottleOutPacketType.Task); 614 remote_client.OutPacket((Packet) packet, ThrottleOutPacketType.Task);
615 sequenceID++; 615 sequenceID++;
616 byteArray = new byte[LAND_BLOCKS_PER_PACKET]; 616 byteArray = new byte[LAND_BLOCKS_PER_PACKET];
617 } 617 }
diff --git a/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs b/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs
index e6e1ae4..877bed5 100644
--- a/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs
@@ -45,14 +45,14 @@ namespace OpenSim.Region.Environment.Modules.World.Land
45 45
46 m_scene.EventManager.OnParcelPrimCountAdd += landChannel.addPrimToLandPrimCounts; 46 m_scene.EventManager.OnParcelPrimCountAdd += landChannel.addPrimToLandPrimCounts;
47 m_scene.EventManager.OnParcelPrimCountUpdate += landChannel.updateLandPrimCounts; 47 m_scene.EventManager.OnParcelPrimCountUpdate += landChannel.updateLandPrimCounts;
48 m_scene.EventManager.OnAvatarEnteringNewParcel += landChannel.handleAvatarChangingParcel; 48 m_scene.EventManager.OnAvatarEnteringNewParcel += new EventManager.AvatarEnteringNewParcel(landChannel.handleAvatarChangingParcel);
49 m_scene.EventManager.OnClientMovement += landChannel.handleAnyClientMovement; 49 m_scene.EventManager.OnClientMovement += new EventManager.ClientMovement(landChannel.handleAnyClientMovement);
50 m_scene.EventManager.OnValidateLandBuy += landChannel.handleLandValidationRequest; 50 m_scene.EventManager.OnValidateLandBuy += landChannel.handleLandValidationRequest;
51 m_scene.EventManager.OnLandBuy += landChannel.handleLandBuyRequest; 51 m_scene.EventManager.OnLandBuy += landChannel.handleLandBuyRequest;
52 52
53 lock (m_scene) 53 lock (m_scene)
54 { 54 {
55 m_scene.LandChannel = landChannel; 55 m_scene.LandChannel = (ILandChannel) landChannel;
56 } 56 }
57 } 57 }
58 58
diff --git a/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs b/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs
index 54fe9ae..e297b10 100644
--- a/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs
+++ b/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs
@@ -73,8 +73,6 @@ namespace OpenSim.Region.Environment.Modules.World.Land
73 get { return m_scene.RegionInfo.RegionID; } 73 get { return m_scene.RegionInfo.RegionID; }
74 } 74 }
75 75
76 #endregion
77
78 #region Constructors 76 #region Constructors
79 77
80 public LandObject(LLUUID owner_id, bool is_group_owned, Scene scene) 78 public LandObject(LLUUID owner_id, bool is_group_owned, Scene scene)
@@ -100,7 +98,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
100 { 98 {
101 if (x >= 0 && y >= 0 && x <= Constants.RegionSize && x <= Constants.RegionSize) 99 if (x >= 0 && y >= 0 && x <= Constants.RegionSize && x <= Constants.RegionSize)
102 { 100 {
103 return landBitmap[x / 4, y / 4]; 101 return (landBitmap[x / 4, y / 4] == true);
104 } 102 }
105 else 103 else
106 { 104 {
@@ -150,7 +148,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
150 updatePacket.ParcelData.GroupID = landData.groupID; 148 updatePacket.ParcelData.GroupID = landData.groupID;
151 updatePacket.ParcelData.GroupPrims = landData.groupPrims; 149 updatePacket.ParcelData.GroupPrims = landData.groupPrims;
152 updatePacket.ParcelData.IsGroupOwned = landData.isGroupOwned; 150 updatePacket.ParcelData.IsGroupOwned = landData.isGroupOwned;
153 updatePacket.ParcelData.LandingType = landData.landingType; 151 updatePacket.ParcelData.LandingType = (byte) landData.landingType;
154 updatePacket.ParcelData.LocalID = landData.localID; 152 updatePacket.ParcelData.LocalID = landData.localID;
155 if (landData.area > 0) 153 if (landData.area > 0)
156 { 154 {
@@ -214,7 +212,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
214 landData.selectedPrims; 212 landData.selectedPrims;
215 updatePacket.ParcelData.UserLocation = landData.userLocation; 213 updatePacket.ParcelData.UserLocation = landData.userLocation;
216 updatePacket.ParcelData.UserLookAt = landData.userLookAt; 214 updatePacket.ParcelData.UserLookAt = landData.userLookAt;
217 remote_client.OutPacket(updatePacket, ThrottleOutPacketType.Task); 215 remote_client.OutPacket((Packet) updatePacket, ThrottleOutPacketType.Task);
218 } 216 }
219 217
220 public void updateLandProperties(ParcelPropertiesUpdatePacket packet, IClientAPI remote_client) 218 public void updateLandProperties(ParcelPropertiesUpdatePacket packet, IClientAPI remote_client)
@@ -357,7 +355,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
357 { 355 {
358 ParcelAccessListReplyPacket.ListBlock listBlock = new ParcelAccessListReplyPacket.ListBlock(); 356 ParcelAccessListReplyPacket.ListBlock listBlock = new ParcelAccessListReplyPacket.ListBlock();
359 357
360 listBlock.Flags = 0; 358 listBlock.Flags = (uint) 0;
361 listBlock.ID = entry.AgentID; 359 listBlock.ID = entry.AgentID;
362 listBlock.Time = 0; 360 listBlock.Time = 0;
363 361
@@ -369,7 +367,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
369 { 367 {
370 ParcelAccessListReplyPacket.ListBlock listBlock = new ParcelAccessListReplyPacket.ListBlock(); 368 ParcelAccessListReplyPacket.ListBlock listBlock = new ParcelAccessListReplyPacket.ListBlock();
371 369
372 listBlock.Flags = 0; 370 listBlock.Flags = (uint) 0;
373 listBlock.ID = LLUUID.Zero; 371 listBlock.ID = LLUUID.Zero;
374 listBlock.Time = 0; 372 listBlock.Time = 0;
375 373
@@ -392,7 +390,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
392 replyPacket.Data.SequenceID = 0; 390 replyPacket.Data.SequenceID = 0;
393 391
394 replyPacket.List = createAccessListArrayByFlag(ParcelManager.AccessList.Access); 392 replyPacket.List = createAccessListArrayByFlag(ParcelManager.AccessList.Access);
395 remote_client.OutPacket(replyPacket, ThrottleOutPacketType.Task); 393 remote_client.OutPacket((Packet) replyPacket, ThrottleOutPacketType.Task);
396 } 394 }
397 395
398 if (flags == (uint) ParcelManager.AccessList.Ban || flags == (uint) ParcelManager.AccessList.Both) 396 if (flags == (uint) ParcelManager.AccessList.Ban || flags == (uint) ParcelManager.AccessList.Both)
@@ -404,7 +402,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
404 replyPacket.Data.SequenceID = 0; 402 replyPacket.Data.SequenceID = 0;
405 403
406 replyPacket.List = createAccessListArrayByFlag(ParcelManager.AccessList.Ban); 404 replyPacket.List = createAccessListArrayByFlag(ParcelManager.AccessList.Ban);
407 remote_client.OutPacket(replyPacket, ThrottleOutPacketType.Task); 405 remote_client.OutPacket((Packet) replyPacket, ThrottleOutPacketType.Task);
408 } 406 }
409 } 407 }
410 408
@@ -484,7 +482,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
484 { 482 {
485 for (y = 0; y < 64; y++) 483 for (y = 0; y < 64; y++)
486 { 484 {
487 if (landBitmap[x, y]) 485 if (landBitmap[x, y] == true)
488 { 486 {
489 if (min_x > x) min_x = x; 487 if (min_x > x) min_x = x;
490 if (min_y > y) min_y = y; 488 if (min_y > y) min_y = y;
@@ -501,7 +499,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
501 if (ty > 255) 499 if (ty > 255)
502 ty = 255; 500 ty = 255;
503 landData.AABBMin = 501 landData.AABBMin =
504 new LLVector3((min_x * 4), (min_y * 4), 502 new LLVector3((float) (min_x * 4), (float) (min_y * 4),
505 (float) m_scene.Heightmap[tx, ty]); 503 (float) m_scene.Heightmap[tx, ty]);
506 504
507 tx = max_x * 4; 505 tx = max_x * 4;
@@ -511,7 +509,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
511 if (ty > 255) 509 if (ty > 255)
512 ty = 255; 510 ty = 255;
513 landData.AABBMax = 511 landData.AABBMax =
514 new LLVector3((max_x * 4), (max_y * 4), 512 new LLVector3((float) (max_x * 4), (float) (max_y * 4),
515 (float) m_scene.Heightmap[tx, ty]); 513 (float) m_scene.Heightmap[tx, ty]);
516 landData.area = tempArea; 514 landData.area = tempArea;
517 } 515 }
@@ -659,7 +657,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
659 if (i % 8 == 0) 657 if (i % 8 == 0)
660 { 658 {
661 tempConvertArr[byteNum] = tempByte; 659 tempConvertArr[byteNum] = tempByte;
662 tempByte = 0; 660 tempByte = (byte) 0;
663 i = 0; 661 i = 0;
664 byteNum++; 662 byteNum++;
665 } 663 }
@@ -679,7 +677,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
679 tempByte = landData.landBitmapByteArray[i]; 677 tempByte = landData.landBitmapByteArray[i];
680 for (bitNum = 0; bitNum < 8; bitNum++) 678 for (bitNum = 0; bitNum < 8; bitNum++)
681 { 679 {
682 bool bit = Convert.ToBoolean(Convert.ToByte(tempByte >> bitNum) & 1); 680 bool bit = Convert.ToBoolean(Convert.ToByte(tempByte >> bitNum) & (byte) 1);
683 tempConvertMap[x, y] = bit; 681 tempConvertMap[x, y] = bit;
684 x++; 682 x++;
685 if (x > 63) 683 if (x > 63)
@@ -753,7 +751,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
753 resultLocalIDs.RemoveAt(0); 751 resultLocalIDs.RemoveAt(0);
754 } 752 }
755 pack.Data = data; 753 pack.Data = data;
756 remote_client.OutPacket(pack, ThrottleOutPacketType.Task); 754 remote_client.OutPacket((Packet) pack, ThrottleOutPacketType.Task);
757 } 755 }
758 } 756 }
759 757
@@ -924,5 +922,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
924 #endregion 922 #endregion
925 923
926 #endregion 924 #endregion
925
926 #endregion
927 } 927 }
928} \ No newline at end of file 928} \ No newline at end of file
diff --git a/OpenSim/Region/Environment/Modules/World/Serialiser/SerialiserModule.cs b/OpenSim/Region/Environment/Modules/World/Serialiser/SerialiserModule.cs
index 854d2ee..4406e17 100644
--- a/OpenSim/Region/Environment/Modules/World/Serialiser/SerialiserModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Serialiser/SerialiserModule.cs
@@ -37,10 +37,10 @@ namespace OpenSim.Region.Environment.Modules.World.Serialiser
37{ 37{
38 public class SerialiserModule : IRegionModule, IRegionSerialiser 38 public class SerialiserModule : IRegionModule, IRegionSerialiser
39 { 39 {
40 private readonly Commander m_commander = new Commander("Export"); 40 private Commander m_commander = new Commander("Export");
41 private readonly List<Scene> m_regions = new List<Scene>(); 41 private List<Scene> m_regions = new List<Scene>();
42 private readonly List<IFileSerialiser> m_serialisers = new List<IFileSerialiser>();
43 private string m_savedir = "exports" + "/"; 42 private string m_savedir = "exports" + "/";
43 private List<IFileSerialiser> m_serialisers = new List<IFileSerialiser>();
44 44
45 #region IRegionModule Members 45 #region IRegionModule Members
46 46
@@ -105,8 +105,8 @@ namespace OpenSim.Region.Environment.Modules.World.Serialiser
105 105
106 TextWriter regionInfoWriter = new StreamWriter(saveDir + "README.TXT"); 106 TextWriter regionInfoWriter = new StreamWriter(saveDir + "README.TXT");
107 regionInfoWriter.WriteLine("Region Name: " + scene.RegionInfo.RegionName); 107 regionInfoWriter.WriteLine("Region Name: " + scene.RegionInfo.RegionName);
108 regionInfoWriter.WriteLine("Region ID: " + scene.RegionInfo.RegionID); 108 regionInfoWriter.WriteLine("Region ID: " + scene.RegionInfo.RegionID.ToString());
109 regionInfoWriter.WriteLine("Backup Time: UTC " + DateTime.UtcNow); 109 regionInfoWriter.WriteLine("Backup Time: UTC " + DateTime.UtcNow.ToString());
110 regionInfoWriter.WriteLine("Serialise Version: 0.1"); 110 regionInfoWriter.WriteLine("Serialise Version: 0.1");
111 regionInfoWriter.Close(); 111 regionInfoWriter.Close();
112 112
@@ -141,7 +141,7 @@ namespace OpenSim.Region.Environment.Modules.World.Serialiser
141 { 141 {
142 if (region.RegionInfo.RegionName == (string) args[0]) 142 if (region.RegionInfo.RegionName == (string) args[0])
143 { 143 {
144 List<string> results = SerialiseRegion(region, m_savedir + region.RegionInfo.RegionID + "/"); 144 List<string> results = SerialiseRegion(region, m_savedir + region.RegionInfo.RegionID.ToString() + "/");
145 } 145 }
146 } 146 }
147 } 147 }
@@ -150,7 +150,7 @@ namespace OpenSim.Region.Environment.Modules.World.Serialiser
150 { 150 {
151 foreach (Scene region in m_regions) 151 foreach (Scene region in m_regions)
152 { 152 {
153 List<string> results = SerialiseRegion(region, m_savedir + region.RegionInfo.RegionID + "/"); 153 List<string> results = SerialiseRegion(region, m_savedir + region.RegionInfo.RegionID.ToString() + "/");
154 } 154 }
155 } 155 }
156 156
diff --git a/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs b/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs
index 05fae22..47ce258 100644
--- a/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs
@@ -127,7 +127,7 @@ namespace OpenSim.Region.Environment.Modules.World.Sun
127 { 127 {
128 long m_addticks = (DateTime.Now.Ticks - m_start) * m_dilation; 128 long m_addticks = (DateTime.Now.Ticks - m_start) * m_dilation;
129 DateTime dt = new DateTime(m_start + m_addticks); 129 DateTime dt = new DateTime(m_start + m_addticks);
130 return dt.Hour + (dt.Minute / 60.0); 130 return (double) dt.Hour + ((double) dt.Minute / 60.0);
131 } 131 }
132 132
133 private LLVector3 SunPos(double hour) 133 private LLVector3 SunPos(double hour)
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/Effects/CookieCutter.cs b/OpenSim/Region/Environment/Modules/World/Terrain/Effects/CookieCutter.cs
index 331c49d..a2e0c40 100644
--- a/OpenSim/Region/Environment/Modules/World/Terrain/Effects/CookieCutter.cs
+++ b/OpenSim/Region/Environment/Modules/World/Terrain/Effects/CookieCutter.cs
@@ -78,7 +78,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.Effects
78 { 78 {
79 for (y = 0; y < map.Height; y++) 79 for (y = 0; y < map.Height; y++)
80 { 80 {
81 if (cliffMask[x, y]) 81 if (cliffMask[x, y] == true)
82 eroder.PaintEffect(map, x, y, 4, 0.1); 82 eroder.PaintEffect(map, x, y, 4, 0.1);
83 } 83 }
84 } 84 }
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/LLRAW.cs b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/LLRAW.cs
index 90728da..5d6723f 100644
--- a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/LLRAW.cs
+++ b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/LLRAW.cs
@@ -47,7 +47,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders
47 { 47 {
48 for (x = 0; x < retval.Width; x++) 48 for (x = 0; x < retval.Width; x++)
49 { 49 {
50 retval[x, y] = bs.ReadByte() * (bs.ReadByte() / 127.0); 50 retval[x, y] = (double) bs.ReadByte() * ((double) bs.ReadByte() / 127.0);
51 bs.ReadBytes(11); // Advance the stream to next bytes. 51 bs.ReadBytes(11); // Advance the stream to next bytes.
52 } 52 }
53 } 53 }
@@ -76,7 +76,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders
76 { 76 {
77 for (j = 0; j < 256; j++) 77 for (j = 0; j < 256; j++)
78 { 78 {
79 lookupHeightTable[i + (j * 256)] = (i * (j / 127.0)); 79 lookupHeightTable[i + (j * 256)] = ((double) i * ((double) j / 127.0));
80 } 80 }
81 } 81 }
82 82
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/Terragen.cs b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/Terragen.cs
index 04c3f1a..7cb4b00 100644
--- a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/Terragen.cs
+++ b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/Terragen.cs
@@ -50,14 +50,14 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders
50 BinaryReader bs = new BinaryReader(s); 50 BinaryReader bs = new BinaryReader(s);
51 51
52 bool eof = false; 52 bool eof = false;
53 if (Encoding.ASCII.GetString(bs.ReadBytes(16)) == "TERRAGENTERRAIN ") 53 if (ASCIIEncoding.ASCII.GetString(bs.ReadBytes(16)) == "TERRAGENTERRAIN ")
54 { 54 {
55 // Terragen file 55 // Terragen file
56 while (eof == false) 56 while (eof == false)
57 { 57 {
58 int w = 256; 58 int w = 256;
59 int h = 256; 59 int h = 256;
60 string tmp = Encoding.ASCII.GetString(bs.ReadBytes(4)); 60 string tmp = ASCIIEncoding.ASCII.GetString(bs.ReadBytes(4));
61 switch (tmp) 61 switch (tmp)
62 { 62 {
63 case "SIZE": 63 case "SIZE":
@@ -84,7 +84,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders
84 { 84 {
85 for (y = 0; y < h; y++) 85 for (y = 0; y < h; y++)
86 { 86 {
87 retval[x, y] = baseHeight + bs.ReadInt16() * (double) heightScale / 65536.0; 87 retval[x, y] = (double) baseHeight + (double) bs.ReadInt16() * (double) heightScale / 65536.0;
88 } 88 }
89 } 89 }
90 break; 90 break;
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/FlattenSphere.cs b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/FlattenSphere.cs
index fa52a00..dee455f 100644
--- a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/FlattenSphere.cs
+++ b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/FlattenSphere.cs
@@ -31,6 +31,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes
31{ 31{
32 public class FlattenSphere : ITerrainPaintableEffect 32 public class FlattenSphere : ITerrainPaintableEffect
33 { 33 {
34
34 #region ITerrainPaintableEffect Members 35 #region ITerrainPaintableEffect Members
35 36
36 public void PaintEffect(ITerrainChannel map, double rx, double ry, double strength, double duration) 37 public void PaintEffect(ITerrainChannel map, double rx, double ry, double strength, double duration)
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/NoiseSphere.cs b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/NoiseSphere.cs
index 5037533..8ae583e 100644
--- a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/NoiseSphere.cs
+++ b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/NoiseSphere.cs
@@ -57,7 +57,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes
57 z *= z; 57 z *= z;
58 z -= ((x - rx) * (x - rx)) + ((y - ry) * (y - ry)); 58 z -= ((x - rx) * (x - rx)) + ((y - ry) * (y - ry));
59 59
60 double noise = TerrainUtil.PerlinNoise2D(x / (double) Constants.RegionSize, y / (double) Constants.RegionSize, 8, 1.0); 60 double noise = TerrainUtil.PerlinNoise2D((double) x / (double) Constants.RegionSize, (double) y / (double) Constants.RegionSize, 8, 1.0);
61 61
62 if (z > 0.0) 62 if (z > 0.0)
63 map[x, y] += noise * z * duration; 63 map[x, y] += noise * z * duration;
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/RevertSphere.cs b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/RevertSphere.cs
index acce32e..b47e041 100644
--- a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/RevertSphere.cs
+++ b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/RevertSphere.cs
@@ -32,7 +32,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes
32{ 32{
33 public class RevertSphere : ITerrainPaintableEffect 33 public class RevertSphere : ITerrainPaintableEffect
34 { 34 {
35 private readonly ITerrainChannel m_revertmap; 35 private ITerrainChannel m_revertmap;
36 36
37 public RevertSphere(ITerrainChannel revertmap) 37 public RevertSphere(ITerrainChannel revertmap)
38 { 38 {
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/TerrainException.cs b/OpenSim/Region/Environment/Modules/World/Terrain/TerrainException.cs
index 2411de0..f5c0fe4 100644
--- a/OpenSim/Region/Environment/Modules/World/Terrain/TerrainException.cs
+++ b/OpenSim/Region/Environment/Modules/World/Terrain/TerrainException.cs
@@ -31,7 +31,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain
31{ 31{
32 public class TerrainException : Exception 32 public class TerrainException : Exception
33 { 33 {
34 public TerrainException() 34 public TerrainException() : base()
35 { 35 {
36 } 36 }
37 37
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/TerrainModule.cs b/OpenSim/Region/Environment/Modules/World/Terrain/TerrainModule.cs
index c105620..eff6159 100644
--- a/OpenSim/Region/Environment/Modules/World/Terrain/TerrainModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Terrain/TerrainModule.cs
@@ -83,7 +83,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain
83 private Dictionary<string, ITerrainEffect> m_plugineffects; 83 private Dictionary<string, ITerrainEffect> m_plugineffects;
84 private ITerrainChannel m_revert; 84 private ITerrainChannel m_revert;
85 private Scene m_scene; 85 private Scene m_scene;
86 private bool m_tainted; 86 private bool m_tainted = false;
87 87
88 #region ICommandableModule Members 88 #region ICommandableModule Members
89 89
@@ -223,8 +223,6 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain
223 } 223 }
224 } 224 }
225 225
226 #endregion
227
228 #region Plugin Loading Methods 226 #region Plugin Loading Methods
229 227
230 private void LoadPlugins() 228 private void LoadPlugins()
@@ -278,6 +276,8 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain
278 276
279 #endregion 277 #endregion
280 278
279 #endregion
280
281 /// <summary> 281 /// <summary>
282 /// Installs into terrain module the standard suite of brushes 282 /// Installs into terrain module the standard suite of brushes
283 /// </summary> 283 /// </summary>
diff --git a/OpenSim/Region/Environment/Modules/World/TreePopulator/TreePopulatorModule.cs b/OpenSim/Region/Environment/Modules/World/TreePopulator/TreePopulatorModule.cs
index d964fe4..4b22700 100644
--- a/OpenSim/Region/Environment/Modules/World/TreePopulator/TreePopulatorModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/TreePopulator/TreePopulatorModule.cs
@@ -66,10 +66,10 @@ namespace OpenSim.Region.Environment.Modules.World.TreePopulator
66 m_trees = new List<LLUUID>(); 66 m_trees = new List<LLUUID>();
67 m_scene = scene; 67 m_scene = scene;
68 68
69 m_scene.EventManager.OnPluginConsole += EventManager_OnPluginConsole; 69 m_scene.EventManager.OnPluginConsole += new EventManager.OnPluginConsoleDelegate(EventManager_OnPluginConsole);
70 70
71 Timer CalculateTrees = new Timer(m_tree_updates); 71 Timer CalculateTrees = new Timer(m_tree_updates);
72 CalculateTrees.Elapsed += CalculateTrees_Elapsed; 72 CalculateTrees.Elapsed += new ElapsedEventHandler(CalculateTrees_Elapsed);
73 CalculateTrees.Start(); 73 CalculateTrees.Start();
74 m_log.Debug("[TREES]: Initialised tree module"); 74 m_log.Debug("[TREES]: Initialised tree module");
75 } 75 }