aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/ApplicationPlugins/Rest/Regions/RegionDetails.cs2
-rw-r--r--OpenSim/ApplicationPlugins/Rest/RestPlugin.cs4
-rw-r--r--OpenSim/Framework/Communications/Cache/AssetCache.cs20
-rw-r--r--OpenSim/Framework/Communications/Cache/CachedUserInfo.cs10
-rw-r--r--OpenSim/Framework/Servers/BaseHttpServer.cs22
-rw-r--r--OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs8
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs26
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs24
-rw-r--r--OpenSim/Region/Environment/Modules/Scripting/WorldComm/WorldCommModule.cs6
-rw-r--r--OpenSim/Region/Environment/Modules/Scripting/XMLRPC/XMLRPCModule.cs4
-rw-r--r--OpenSim/Region/Environment/Modules/World/Archiver/ArchiveRequest.cs68
-rw-r--r--OpenSim/Region/Environment/Modules/World/Archiver/TarArchive.cs82
-rw-r--r--OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/LLRAW.cs2
-rw-r--r--OpenSim/Region/Environment/Scenes/InnerScene.cs38
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.Inventory.cs10
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs6
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs12
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.cs50
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.cs4
-rw-r--r--OpenSim/Region/Modules/AvatarFactory/AvatarFactoryModule.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs4
23 files changed, 206 insertions, 204 deletions
diff --git a/OpenSim/ApplicationPlugins/Rest/Regions/RegionDetails.cs b/OpenSim/ApplicationPlugins/Rest/Regions/RegionDetails.cs
index 5de623c..681b99f 100644
--- a/OpenSim/ApplicationPlugins/Rest/Regions/RegionDetails.cs
+++ b/OpenSim/ApplicationPlugins/Rest/Regions/RegionDetails.cs
@@ -72,7 +72,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
72 { 72 {
73 get 73 get
74 { 74 {
75 switch(idx.ToLower()) 75 switch (idx.ToLower())
76 { 76 {
77 case "name": 77 case "name":
78 return region_name; 78 return region_name;
diff --git a/OpenSim/ApplicationPlugins/Rest/RestPlugin.cs b/OpenSim/ApplicationPlugins/Rest/RestPlugin.cs
index 9855658..e395840 100644
--- a/OpenSim/ApplicationPlugins/Rest/RestPlugin.cs
+++ b/OpenSim/ApplicationPlugins/Rest/RestPlugin.cs
@@ -194,7 +194,7 @@ namespace OpenSim.ApplicationPlugins.Rest
194 194
195 try 195 try
196 { 196 {
197 if ((_config = openSim.ConfigSource.Configs["RestPlugins"]) == null) 197 if ((_config = openSim.ConfigSource.Configs["RestPlugins"]) == null)
198 { 198 {
199 m_log.WarnFormat("{0} Rest Plugins not configured", MsgID); 199 m_log.WarnFormat("{0} Rest Plugins not configured", MsgID);
200 return; 200 return;
@@ -296,7 +296,7 @@ namespace OpenSim.ApplicationPlugins.Rest
296 public bool RemoveAgentHandler(string agentName, IHttpAgentHandler handler) 296 public bool RemoveAgentHandler(string agentName, IHttpAgentHandler handler)
297 { 297 {
298 if (!IsEnabled) return false; 298 if (!IsEnabled) return false;
299 if(_agents[agentName] == handler) 299 if (_agents[agentName] == handler)
300 { 300 {
301 _agents.Remove(agentName); 301 _agents.Remove(agentName);
302 return _httpd.RemoveAgentHandler(agentName, handler); 302 return _httpd.RemoveAgentHandler(agentName, handler);
diff --git a/OpenSim/Framework/Communications/Cache/AssetCache.cs b/OpenSim/Framework/Communications/Cache/AssetCache.cs
index feac65a..dcb7d73 100644
--- a/OpenSim/Framework/Communications/Cache/AssetCache.cs
+++ b/OpenSim/Framework/Communications/Cache/AssetCache.cs
@@ -249,11 +249,11 @@ namespace OpenSim.Framework.Communications.Cache
249 //m_log.DebugFormat("[ASSET CACHE]: Requesting {0} {1}", isTexture ? "texture" : "asset", assetId); 249 //m_log.DebugFormat("[ASSET CACHE]: Requesting {0} {1}", isTexture ? "texture" : "asset", assetId);
250 250
251 251
252 // Xantor 20080526: 252 // Xantor 20080526:
253 // if a request is made for an asset which is not in the cache yet, but has already been requested by 253 // if a request is made for an asset which is not in the cache yet, but has already been requested by
254 // something else, queue up the callbacks on that requestor instead of swamping the assetserver 254 // something else, queue up the callbacks on that requestor instead of swamping the assetserver
255 // with multiple requests for the same asset. 255 // with multiple requests for the same asset.
256 256
257 AssetBase asset; 257 AssetBase asset;
258 258
259 if (TryGetCachedAsset(assetId, out asset)) 259 if (TryGetCachedAsset(assetId, out asset))
@@ -265,8 +265,8 @@ namespace OpenSim.Framework.Communications.Cache
265#if DEBUG 265#if DEBUG
266 // m_log.DebugFormat("[ASSET CACHE]: Adding request for {0} {1}", isTexture ? "texture" : "asset", assetId); 266 // m_log.DebugFormat("[ASSET CACHE]: Adding request for {0} {1}", isTexture ? "texture" : "asset", assetId);
267#endif 267#endif
268 268
269 269
270 NewAssetRequest req = new NewAssetRequest(assetId, callback); 270 NewAssetRequest req = new NewAssetRequest(assetId, callback);
271 AssetRequestsList requestList; 271 AssetRequestsList requestList;
272 272
@@ -499,7 +499,7 @@ namespace OpenSim.Framework.Communications.Cache
499 { 499 {
500 Assets[assetID] = null; 500 Assets[assetID] = null;
501 } 501 }
502 502
503 // Notify requesters for this asset 503 // Notify requesters for this asset
504 AssetRequestsList reqList = null; 504 AssetRequestsList reqList = null;
505 lock (RequestLists) 505 lock (RequestLists)
@@ -590,20 +590,20 @@ namespace OpenSim.Framework.Communications.Cache
590 RequestedAssets.Add(requestID, request); 590 RequestedAssets.Add(requestID, request);
591 m_assetServer.RequestAsset(requestID, false); 591 m_assetServer.RequestAsset(requestID, false);
592 } 592 }
593 593
594 return; 594 return;
595 } 595 }
596 596
597 // It has an entry in our cache 597 // It has an entry in our cache
598 AssetInfo asset = Assets[requestID]; 598 AssetInfo asset = Assets[requestID];
599 599
600 // FIXME: We never tell the client about assets which do not exist when requested by this transfer mechanism, which can't be right. 600 // FIXME: We never tell the client about assets which do not exist when requested by this transfer mechanism, which can't be right.
601 if (null == asset) 601 if (null == asset)
602 { 602 {
603 //m_log.DebugFormat("[ASSET CACHE]: Asset transfer request for asset which is {0} already known to be missing. Dropping", requestID); 603 //m_log.DebugFormat("[ASSET CACHE]: Asset transfer request for asset which is {0} already known to be missing. Dropping", requestID);
604 return; 604 return;
605 } 605 }
606 606
607 // The asset is knosn to exist and is in our cache, so add it to the AssetRequests list 607 // The asset is knosn to exist and is in our cache, so add it to the AssetRequests list
608 AssetRequest req = new AssetRequest(); 608 AssetRequest req = new AssetRequest();
609 req.RequestUser = userInfo; 609 req.RequestUser = userInfo;
diff --git a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
index 1cbffc7..b98cec7 100644
--- a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
+++ b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
@@ -485,10 +485,10 @@ namespace OpenSim.Framework.Communications.Cache
485 { 485 {
486 if (HasInventory) 486 if (HasInventory)
487 { 487 {
488 if(item.Folder == LLUUID.Zero) 488 if (item.Folder == LLUUID.Zero)
489 { 489 {
490 InventoryFolderImpl f=FindFolderForType(item.AssetType); 490 InventoryFolderImpl f=FindFolderForType(item.AssetType);
491 if(f != null) 491 if (f != null)
492 item.Folder=f.ID; 492 item.Folder=f.ID;
493 else 493 else
494 item.Folder=RootFolder.ID; 494 item.Folder=RootFolder.ID;
@@ -617,14 +617,14 @@ namespace OpenSim.Framework.Communications.Cache
617 617
618 private InventoryFolderImpl FindFolderForType(int type) 618 private InventoryFolderImpl FindFolderForType(int type)
619 { 619 {
620 if(RootFolder == null) 620 if (RootFolder == null)
621 return null; 621 return null;
622 622
623 lock(RootFolder.SubFolders) 623 lock (RootFolder.SubFolders)
624 { 624 {
625 foreach (InventoryFolderImpl f in RootFolder.SubFolders.Values) 625 foreach (InventoryFolderImpl f in RootFolder.SubFolders.Values)
626 { 626 {
627 if(f.Type == type) 627 if (f.Type == type)
628 return f; 628 return f;
629 } 629 }
630 } 630 }
diff --git a/OpenSim/Framework/Servers/BaseHttpServer.cs b/OpenSim/Framework/Servers/BaseHttpServer.cs
index fa64b41..50e2c0c 100644
--- a/OpenSim/Framework/Servers/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/BaseHttpServer.cs
@@ -310,19 +310,20 @@ namespace OpenSim.Framework.Servers
310 agentHandler = null; 310 agentHandler = null;
311 try 311 try
312 { 312 {
313 foreach(IHttpAgentHandler handler in m_agentHandlers.Values) 313 foreach (IHttpAgentHandler handler in m_agentHandlers.Values)
314 { 314 {
315 if(handler.Match(request, response)) 315 if (handler.Match(request, response))
316 { 316 {
317 agentHandler = handler; 317 agentHandler = handler;
318 return true; 318 return true;
319 } 319 }
320 } 320 }
321 } 321 }
322 catch(KeyNotFoundException) {} 322 catch(KeyNotFoundException)
323 {
324 }
323 325
324 return false; 326 return false;
325
326 } 327 }
327 328
328 /// <summary> 329 /// <summary>
@@ -478,7 +479,6 @@ namespace OpenSim.Framework.Servers
478 479
479 private bool HandleAgentRequest(IHttpAgentHandler handler, OSHttpRequest request, OSHttpResponse response) 480 private bool HandleAgentRequest(IHttpAgentHandler handler, OSHttpRequest request, OSHttpResponse response)
480 { 481 {
481
482 // In the case of REST, then handler is responsible for ALL aspects of 482 // In the case of REST, then handler is responsible for ALL aspects of
483 // the request/response handling. Nothing is done here, not even encoding. 483 // the request/response handling. Nothing is done here, not even encoding.
484 484
@@ -500,11 +500,12 @@ namespace OpenSim.Framework.Servers
500 response.StatusCode = (int)OSHttpStatusCode.ServerErrorInternalError; 500 response.StatusCode = (int)OSHttpStatusCode.ServerErrorInternalError;
501 response.OutputStream.Close(); 501 response.OutputStream.Close();
502 } 502 }
503 catch(Exception){} 503 catch(Exception)
504 {
505 }
504 } 506 }
505 507
506 return true; 508 return true;
507
508 } 509 }
509 510
510 public void HandleHTTPRequest(OSHttpRequest request, OSHttpResponse response) 511 public void HandleHTTPRequest(OSHttpRequest request, OSHttpResponse response)
@@ -759,13 +760,16 @@ namespace OpenSim.Framework.Servers
759 { 760 {
760 try 761 try
761 { 762 {
762 if(handler == m_agentHandlers[agent]) 763 if (handler == m_agentHandlers[agent])
763 { 764 {
764 m_agentHandlers.Remove(agent); 765 m_agentHandlers.Remove(agent);
765 return true; 766 return true;
766 } 767 }
767 } 768 }
768 catch(KeyNotFoundException) {} 769 catch(KeyNotFoundException)
770 {
771 }
772
769 return false; 773 return false;
770 } 774 }
771 775
diff --git a/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs b/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs
index 3a7f668..ad1b989 100644
--- a/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs
+++ b/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs
@@ -272,28 +272,28 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler
272 public void llWhisper(int channelID, string text) 272 public void llWhisper(int channelID, string text)
273 { 273 {
274 World.SimChat(Helpers.StringToField(text), 274 World.SimChat(Helpers.StringToField(text),
275 ChatTypeEnum.Whisper, channelID, m_host.AbsolutePosition, 275 ChatTypeEnum.Whisper, channelID, m_host.AbsolutePosition,
276 m_host.Name, m_host.UUID, false); 276 m_host.Name, m_host.UUID, false);
277 } 277 }
278 278
279 public void llSay(int channelID, string text) 279 public void llSay(int channelID, string text)
280 { 280 {
281 World.SimChat(Helpers.StringToField(text), 281 World.SimChat(Helpers.StringToField(text),
282 ChatTypeEnum.Say, channelID, m_host.AbsolutePosition, 282 ChatTypeEnum.Say, channelID, m_host.AbsolutePosition,
283 m_host.Name, m_host.UUID, false); 283 m_host.Name, m_host.UUID, false);
284 } 284 }
285 285
286 public void llShout(int channelID, string text) 286 public void llShout(int channelID, string text)
287 { 287 {
288 World.SimChat(Helpers.StringToField(text), 288 World.SimChat(Helpers.StringToField(text),
289 ChatTypeEnum.Shout, channelID, m_host.AbsolutePosition, 289 ChatTypeEnum.Shout, channelID, m_host.AbsolutePosition,
290 m_host.Name, m_host.UUID, false); 290 m_host.Name, m_host.UUID, false);
291 } 291 }
292 292
293 public void llOwnerSay(string msg) 293 public void llOwnerSay(string msg)
294 { 294 {
295 World.SimChatBroadcast(Helpers.StringToField(text), 295 World.SimChatBroadcast(Helpers.StringToField(text),
296 ChatTypeEnum.Owner, 0, m_host.AbsolutePosition, 296 ChatTypeEnum.Owner, 0, m_host.AbsolutePosition,
297 m_host.Name, m_host.UUID, false); 297 m_host.Name, m_host.UUID, false);
298 } 298 }
299 299
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs
index 89437c5..5414322 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs
@@ -122,24 +122,24 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
122 122
123 IClientAPI client = presence.ControllingClient; 123 IClientAPI client = presence.ControllingClient;
124 124
125 if ((c.Type == ChatTypeEnum.Owner) && 125 if ((c.Type == ChatTypeEnum.Owner) &&
126 (null != c.SenderObject) && 126 (null != c.SenderObject) &&
127 (((SceneObjectPart)c.SenderObject).OwnerID != client.AgentId)) 127 (((SceneObjectPart)c.SenderObject).OwnerID != client.AgentId))
128 return; 128 return;
129 129
130 if (null == c.SenderObject) 130 if (null == c.SenderObject)
131 client.SendChatMessage(c.Message, (byte)c.Type, 131 client.SendChatMessage(c.Message, (byte)c.Type,
132 pos, c.From, LLUUID.Zero, 132 pos, c.From, LLUUID.Zero,
133 (byte)ChatSourceType.Agent, 133 (byte)ChatSourceType.Agent,
134 (byte)ChatAudibleLevel.Fully); 134 (byte)ChatAudibleLevel.Fully);
135 else 135 else
136 client.SendChatMessage(c.Message, (byte)c.Type, 136 client.SendChatMessage(c.Message, (byte)c.Type,
137 pos, c.From, LLUUID.Zero, 137 pos, c.From, LLUUID.Zero,
138 (byte)ChatSourceType.Object, 138 (byte)ChatSourceType.Object,
139 (byte)ChatAudibleLevel.Fully); 139 (byte)ChatAudibleLevel.Fully);
140 }); 140 });
141 } 141 }
142 142
143 public void SimChat(Object sender, ChatFromViewerArgs e) 143 public void SimChat(Object sender, ChatFromViewerArgs e)
144 { 144 {
145 // early return if not on public or debug channel 145 // early return if not on public or debug channel
@@ -187,13 +187,13 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
187 if (e.Channel == DEBUG_CHANNEL) 187 if (e.Channel == DEBUG_CHANNEL)
188 { 188 {
189 TrySendChatMessage(presence, fromPos, regionPos, 189 TrySendChatMessage(presence, fromPos, regionPos,
190 fromID, fromName, e.Type, 190 fromID, fromName, e.Type,
191 message, ChatSourceType.Object); 191 message, ChatSourceType.Object);
192 } 192 }
193 else 193 else
194 { 194 {
195 TrySendChatMessage(presence, fromPos, regionPos, 195 TrySendChatMessage(presence, fromPos, regionPos,
196 fromID, fromName, e.Type, 196 fromID, fromName, e.Type,
197 message, ChatSourceType.Agent); 197 message, ChatSourceType.Agent);
198 } 198 }
199 }); 199 });
@@ -224,16 +224,16 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
224 LLVector3 fromRegionPos = fromPos + regionPos; 224 LLVector3 fromRegionPos = fromPos + regionPos;
225 LLVector3 toRegionPos = presence.AbsolutePosition + regionPos; 225 LLVector3 toRegionPos = presence.AbsolutePosition + regionPos;
226 int dis = Math.Abs((int) Util.GetDistanceTo(toRegionPos, fromRegionPos)); 226 int dis = Math.Abs((int) Util.GetDistanceTo(toRegionPos, fromRegionPos));
227 227
228 if (type == ChatTypeEnum.Whisper && dis > m_whisperdistance || 228 if (type == ChatTypeEnum.Whisper && dis > m_whisperdistance ||
229 type == ChatTypeEnum.Say && dis > m_saydistance || 229 type == ChatTypeEnum.Say && dis > m_saydistance ||
230 type == ChatTypeEnum.Shout && dis > m_shoutdistance) 230 type == ChatTypeEnum.Shout && dis > m_shoutdistance)
231 { 231 {
232 return; 232 return;
233 } 233 }
234 234
235 // TODO: should change so the message is sent through the avatar rather than direct to the ClientView 235 // TODO: should change so the message is sent through the avatar rather than direct to the ClientView
236 presence.ControllingClient.SendChatMessage(message, (byte) type, fromPos, fromName, 236 presence.ControllingClient.SendChatMessage(message, (byte) type, fromPos, fromName,
237 fromAgentID,(byte)src,(byte)ChatAudibleLevel.Fully); 237 fromAgentID,(byte)src,(byte)ChatAudibleLevel.Fully);
238 } 238 }
239 } 239 }
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs
index c8d5f80..85262f5 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs
@@ -43,7 +43,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
43{ 43{
44 public class IRCBridgeModule : IRegionModule 44 public class IRCBridgeModule : IRegionModule
45 { 45 {
46 private static readonly ILog m_log = 46 private static readonly ILog m_log =
47 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 47 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
48 48
49 private const int DEBUG_CHANNEL = 2147483647; 49 private const int DEBUG_CHANNEL = 2147483647;
@@ -68,7 +68,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
68 { 68 {
69 try 69 try
70 { 70 {
71 if ((m_config = config.Configs["IRC"]) == null) 71 if ((m_config = config.Configs["IRC"]) == null)
72 { 72 {
73 m_log.InfoFormat("[IRC] module not configured"); 73 m_log.InfoFormat("[IRC] module not configured");
74 return; 74 return;
@@ -85,7 +85,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
85 m_log.Info("[IRC] module not configured"); 85 m_log.Info("[IRC] module not configured");
86 return; 86 return;
87 } 87 }
88 88
89 lock (m_syncInit) 89 lock (m_syncInit)
90 { 90 {
91 91
@@ -118,7 +118,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
118 m_irc_connector.Name = "IRCConnectorThread"; 118 m_irc_connector.Name = "IRCConnectorThread";
119 m_irc_connector.IsBackground = true; 119 m_irc_connector.IsBackground = true;
120 } 120 }
121 m_log.InfoFormat("[IRC] initialized for {0}, nick: {1} ", scene.RegionInfo.RegionName, 121 m_log.InfoFormat("[IRC] initialized for {0}, nick: {1} ", scene.RegionInfo.RegionName,
122 m_defaultzone); 122 m_defaultzone);
123 } 123 }
124 } 124 }
@@ -221,9 +221,9 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
221 221
222 if (e.Message.StartsWith("/me ") && (null != avatar)) 222 if (e.Message.StartsWith("/me ") && (null != avatar))
223 e.Message = String.Format("{0} {1}", fromName, e.Message.Substring(4)); 223 e.Message = String.Format("{0} {1}", fromName, e.Message.Substring(4));
224 224
225 // this is to keep objects from talking to IRC 225 // this is to keep objects from talking to IRC
226 if (m_irc.Connected && (avatar != null)) 226 if (m_irc.Connected && (avatar != null))
227 m_irc.PrivMsg(fromName, scene.RegionInfo.RegionName, e.Message); 227 m_irc.PrivMsg(fromName, scene.RegionInfo.RegionName, e.Message);
228 } 228 }
229 229
@@ -244,7 +244,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
244 if ((m_irc.Enabled) && (m_irc.Connected)) 244 if ((m_irc.Enabled) && (m_irc.Connected))
245 { 245 {
246 m_log.DebugFormat("[IRC] {0} logging on", clientName); 246 m_log.DebugFormat("[IRC] {0} logging on", clientName);
247 m_irc.PrivMsg(m_irc.Nick, "Sim", 247 m_irc.PrivMsg(m_irc.Nick, "Sim",
248 String.Format("notices {0} logging on", clientName)); 248 String.Format("notices {0} logging on", clientName));
249 } 249 }
250 m_last_new_user = clientName; 250 m_last_new_user = clientName;
@@ -310,7 +310,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
310 m_log.InfoFormat("[IRC]: {0} logging out", clientName); 310 m_log.InfoFormat("[IRC]: {0} logging out", clientName);
311 } 311 }
312 312
313 if (m_last_new_user == clientName) 313 if (m_last_new_user == clientName)
314 m_last_new_user = null; 314 m_last_new_user = null;
315 } 315 }
316 } 316 }
@@ -489,7 +489,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
489 } 489 }
490 catch (Exception e) 490 catch (Exception e)
491 { 491 {
492 m_log.ErrorFormat("[IRC] cannot connect to {0}:{1}: {2}", 492 m_log.ErrorFormat("[IRC] cannot connect to {0}:{1}: {2}",
493 m_server, m_port, e.Message); 493 m_server, m_port, e.Message);
494 } 494 }
495 return m_connected; 495 return m_connected;
@@ -617,16 +617,16 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
617 617
618 // is message "\001ACTION foo 618 // is message "\001ACTION foo
619 // bar\001"? -> "/me foo bar" 619 // bar\001"? -> "/me foo bar"
620 if ((1 == c.Message[0]) && c.Message.Substring(1).StartsWith("ACTION")) 620 if ((1 == c.Message[0]) && c.Message.Substring(1).StartsWith("ACTION"))
621 c.Message = String.Format("/me {0}", c.Message.Substring(8, c.Message.Length - 9)); 621 c.Message = String.Format("/me {0}", c.Message.Substring(8, c.Message.Length - 9));
622 622
623 foreach (Scene scene in m_scenes) 623 foreach (Scene scene in m_scenes)
624 { 624 {
625 c.Scene = scene; 625 c.Scene = scene;
626 scene.EventManager.TriggerOnChatBroadcast(this, c); 626 scene.EventManager.TriggerOnChatBroadcast(this, c);
627 } 627 }
628 } 628 }
629 629
630 Thread.Sleep(150); 630 Thread.Sleep(150);
631 continue; 631 continue;
632 } 632 }
diff --git a/OpenSim/Region/Environment/Modules/Scripting/WorldComm/WorldCommModule.cs b/OpenSim/Region/Environment/Modules/Scripting/WorldComm/WorldCommModule.cs
index 3294049..4afbdc4 100644
--- a/OpenSim/Region/Environment/Modules/Scripting/WorldComm/WorldCommModule.cs
+++ b/OpenSim/Region/Environment/Modules/Scripting/WorldComm/WorldCommModule.cs
@@ -569,7 +569,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm
569 { 569 {
570 foreach (ListenerInfo l in list) 570 foreach (ListenerInfo l in list)
571 { 571 {
572 if(l.GetItemID() == itemID) 572 if (l.GetItemID() == itemID)
573 data.AddRange(l.GetSerializationData()); 573 data.AddRange(l.GetSerializationData());
574 } 574 }
575 } 575 }
@@ -582,14 +582,14 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm
582 int idx = 0; 582 int idx = 0;
583 Object[] item = new Object[6]; 583 Object[] item = new Object[6];
584 584
585 while(idx < data.Length) 585 while (idx < data.Length)
586 { 586 {
587 Array.Copy(data, idx, item, 0, 6); 587 Array.Copy(data, idx, item, 0, 6);
588 588
589 ListenerInfo info = 589 ListenerInfo info =
590 ListenerInfo.FromData(localID, itemID, hostID, item); 590 ListenerInfo.FromData(localID, itemID, hostID, item);
591 591
592 if(!m_listeners.ContainsKey((int)item[2])) 592 if (!m_listeners.ContainsKey((int)item[2]))
593 m_listeners.Add((int)item[2], new List<ListenerInfo>()); 593 m_listeners.Add((int)item[2], new List<ListenerInfo>());
594 m_listeners[(int)item[2]].Add(info); 594 m_listeners[(int)item[2]].Add(info);
595 595
diff --git a/OpenSim/Region/Environment/Modules/Scripting/XMLRPC/XMLRPCModule.cs b/OpenSim/Region/Environment/Modules/Scripting/XMLRPC/XMLRPCModule.cs
index aa7a20f..79cd151 100644
--- a/OpenSim/Region/Environment/Modules/Scripting/XMLRPC/XMLRPCModule.cs
+++ b/OpenSim/Region/Environment/Modules/Scripting/XMLRPC/XMLRPCModule.cs
@@ -160,9 +160,9 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
160 * 160 *
161 * Generate a LLUUID channel key and add it and 161 * Generate a LLUUID channel key and add it and
162 * the prim id to dictionary <channelUUID, primUUID> 162 * the prim id to dictionary <channelUUID, primUUID>
163 * 163 *
164 * A custom channel key can be proposed. 164 * A custom channel key can be proposed.
165 * Otherwise, passing LLUUID.Zero will generate 165 * Otherwise, passing LLUUID.Zero will generate
166 * and return a random channel 166 * and return a random channel
167 * 167 *
168 * First check if there is a channel assigned for 168 * First check if there is a channel assigned for
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveRequest.cs b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveRequest.cs
index 1579485..ea74941 100644
--- a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveRequest.cs
+++ b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveRequest.cs
@@ -37,37 +37,37 @@ using log4net;
37using Nini.Config; 37using Nini.Config;
38 38
39namespace OpenSim.Region.Environment 39namespace OpenSim.Region.Environment
40{ 40{
41 /// <summary> 41 /// <summary>
42 /// Method called when all the necessary assets for an archive request have been received. 42 /// Method called when all the necessary assets for an archive request have been received.
43 /// </summary> 43 /// </summary>
44 public delegate void AssetsRequestCallback(IDictionary<LLUUID, AssetBase> assets); 44 public delegate void AssetsRequestCallback(IDictionary<LLUUID, AssetBase> assets);
45 45
46 /// <summary> 46 /// <summary>
47 /// Handles an individual archive request 47 /// Handles an individual archive request
48 /// </summary> 48 /// </summary>
49 public class ArchiveRequest 49 public class ArchiveRequest
50 { 50 {
51 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 51 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
52 52
53 private Scene m_scene; 53 private Scene m_scene;
54 private string m_savePath; 54 private string m_savePath;
55 55
56 private string m_serializedEntities; 56 private string m_serializedEntities;
57 57
58 public ArchiveRequest(Scene scene, string savePath) 58 public ArchiveRequest(Scene scene, string savePath)
59 { 59 {
60 m_scene = scene; 60 m_scene = scene;
61 m_savePath = savePath; 61 m_savePath = savePath;
62 62
63 ArchiveRegion(); 63 ArchiveRegion();
64 } 64 }
65 65
66 protected void ArchiveRegion() 66 protected void ArchiveRegion()
67 { 67 {
68 m_log.Warn("[ARCHIVER]: Archive region not yet implemented"); 68 m_log.Warn("[ARCHIVER]: Archive region not yet implemented");
69 69
70 Dictionary<LLUUID, int> textureUuids = new Dictionary<LLUUID, int>(); 70 Dictionary<LLUUID, int> textureUuids = new Dictionary<LLUUID, int>();
71 71
72 List<EntityBase> entities = m_scene.GetEntities(); 72 List<EntityBase> entities = m_scene.GetEntities();
73 73
@@ -76,14 +76,14 @@ namespace OpenSim.Region.Environment
76 if (entity is SceneObjectGroup) 76 if (entity is SceneObjectGroup)
77 { 77 {
78 SceneObjectGroup sceneObject = (SceneObjectGroup)entity; 78 SceneObjectGroup sceneObject = (SceneObjectGroup)entity;
79 79
80 foreach (SceneObjectPart part in sceneObject.GetParts()) 80 foreach (SceneObjectPart part in sceneObject.GetParts())
81 { 81 {
82 LLUUID texture = new LLUUID(part.Shape.TextureEntry, 0); 82 LLUUID texture = new LLUUID(part.Shape.TextureEntry, 0);
83 textureUuids[texture] = 1; 83 textureUuids[texture] = 1;
84 } 84 }
85 } 85 }
86 } 86 }
87 87
88 m_serializedEntities = SerializeObjects(entities); 88 m_serializedEntities = SerializeObjects(entities);
89 89
@@ -91,30 +91,30 @@ namespace OpenSim.Region.Environment
91 { 91 {
92 m_log.DebugFormat("[ARCHIVER]: Successfully got serialization for {0} entities", entities.Count); 92 m_log.DebugFormat("[ARCHIVER]: Successfully got serialization for {0} entities", entities.Count);
93 m_log.DebugFormat("[ARCHIVER]: Requiring save of {0} textures", textureUuids.Count); 93 m_log.DebugFormat("[ARCHIVER]: Requiring save of {0} textures", textureUuids.Count);
94 94
95 // Asynchronously request all the assets required to perform this archive operation 95 // Asynchronously request all the assets required to perform this archive operation
96 new AssetsRequest(ReceivedAllAssets, m_scene.AssetCache, textureUuids.Keys); 96 new AssetsRequest(ReceivedAllAssets, m_scene.AssetCache, textureUuids.Keys);
97 } 97 }
98 } 98 }
99 99
100 protected internal void ReceivedAllAssets(IDictionary<LLUUID, AssetBase> assets) 100 protected internal void ReceivedAllAssets(IDictionary<LLUUID, AssetBase> assets)
101 { 101 {
102 m_log.DebugFormat("[ARCHIVER]: Received all {0} textures required", assets.Count); 102 m_log.DebugFormat("[ARCHIVER]: Received all {0} textures required", assets.Count);
103 103
104 // XXX: Shouldn't hijack the asset async callback thread like this - this is only temporary 104 // XXX: Shouldn't hijack the asset async callback thread like this - this is only temporary
105 105
106 TarArchive archive = new TarArchive(); 106 TarArchive archive = new TarArchive();
107 107
108 archive.AddFile("prims.xml", m_serializedEntities); 108 archive.AddFile("prims.xml", m_serializedEntities);
109 109
110 foreach (LLUUID uuid in assets.Keys) 110 foreach (LLUUID uuid in assets.Keys)
111 { 111 {
112 archive.AddFile(uuid.ToString() + ".jp2", assets[uuid].Data); 112 archive.AddFile(uuid.ToString() + ".jp2", assets[uuid].Data);
113 } 113 }
114 114
115 archive.WriteTar(m_savePath); 115 archive.WriteTar(m_savePath);
116 } 116 }
117 117
118 /// <summary> 118 /// <summary>
119 /// Get an xml representation of the given scene objects. 119 /// Get an xml representation of the given scene objects.
120 /// </summary> 120 /// </summary>
@@ -152,38 +152,38 @@ namespace OpenSim.Region.Environment
152 /// Callback used when all the assets requested have been received. 152 /// Callback used when all the assets requested have been received.
153 /// </summary> 153 /// </summary>
154 protected AssetsRequestCallback m_assetsRequestCallback; 154 protected AssetsRequestCallback m_assetsRequestCallback;
155 155
156 /// <summary> 156 /// <summary>
157 /// Assets retrieved in this request 157 /// Assets retrieved in this request
158 /// </summary> 158 /// </summary>
159 protected Dictionary<LLUUID, AssetBase> m_assets = new Dictionary<LLUUID, AssetBase>(); 159 protected Dictionary<LLUUID, AssetBase> m_assets = new Dictionary<LLUUID, AssetBase>();
160 160
161 /// <summary> 161 /// <summary>
162 /// Record the number of asset replies required so we know when we've finished 162 /// Record the number of asset replies required so we know when we've finished
163 /// </summary> 163 /// </summary>
164 private int m_repliesRequired; 164 private int m_repliesRequired;
165 165
166 /// <summary> 166 /// <summary>
167 /// Asset cache used to request the assets 167 /// Asset cache used to request the assets
168 /// </summary> 168 /// </summary>
169 protected AssetCache m_assetCache; 169 protected AssetCache m_assetCache;
170 170
171 protected internal AssetsRequest(AssetsRequestCallback assetsRequestCallback, AssetCache assetCache, ICollection<LLUUID> uuids) 171 protected internal AssetsRequest(AssetsRequestCallback assetsRequestCallback, AssetCache assetCache, ICollection<LLUUID> uuids)
172 { 172 {
173 m_assetsRequestCallback = assetsRequestCallback; 173 m_assetsRequestCallback = assetsRequestCallback;
174 m_assetCache = assetCache; 174 m_assetCache = assetCache;
175 m_repliesRequired = uuids.Count; 175 m_repliesRequired = uuids.Count;
176 176
177 // We can stop here if there are no assets to fetch 177 // We can stop here if there are no assets to fetch
178 if (m_repliesRequired == 0) 178 if (m_repliesRequired == 0)
179 m_assetsRequestCallback(m_assets); 179 m_assetsRequestCallback(m_assets);
180 180
181 foreach (LLUUID uuid in uuids) 181 foreach (LLUUID uuid in uuids)
182 { 182 {
183 m_assetCache.GetAsset(uuid, AssetRequestCallback, true); 183 m_assetCache.GetAsset(uuid, AssetRequestCallback, true);
184 } 184 }
185 } 185 }
186 186
187 /// <summary> 187 /// <summary>
188 /// Called back by the asset cache when it has the asset 188 /// Called back by the asset cache when it has the asset
189 /// </summary> 189 /// </summary>
@@ -192,7 +192,7 @@ namespace OpenSim.Region.Environment
192 public void AssetRequestCallback(LLUUID assetID, AssetBase asset) 192 public void AssetRequestCallback(LLUUID assetID, AssetBase asset)
193 { 193 {
194 m_assets[assetID] = asset; 194 m_assets[assetID] = asset;
195 195
196 if (m_assets.Count == m_repliesRequired) 196 if (m_assets.Count == m_repliesRequired)
197 { 197 {
198 m_assetsRequestCallback(m_assets); 198 m_assetsRequestCallback(m_assets);
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/TarArchive.cs b/OpenSim/Region/Environment/Modules/World/Archiver/TarArchive.cs
index 5e5be34..3a7518c 100644
--- a/OpenSim/Region/Environment/Modules/World/Archiver/TarArchive.cs
+++ b/OpenSim/Region/Environment/Modules/World/Archiver/TarArchive.cs
@@ -34,16 +34,16 @@ using System.Reflection;
34using log4net; 34using log4net;
35 35
36namespace OpenSim.Region.Environment 36namespace OpenSim.Region.Environment
37{ 37{
38 /// <summary> 38 /// <summary>
39 /// Temporary code to produce a tar archive in tar v7 format 39 /// Temporary code to produce a tar archive in tar v7 format
40 /// </summary> 40 /// </summary>
41 public class TarArchive 41 public class TarArchive
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 protected Dictionary<string, byte[]> m_files = new Dictionary<string, byte[]>(); 45 protected Dictionary<string, byte[]> m_files = new Dictionary<string, byte[]>();
46 46
47 protected static System.Text.ASCIIEncoding m_asciiEncoding = new System.Text.ASCIIEncoding(); 47 protected static System.Text.ASCIIEncoding m_asciiEncoding = new System.Text.ASCIIEncoding();
48 48
49 /// <summary> 49 /// <summary>
@@ -55,7 +55,7 @@ namespace OpenSim.Region.Environment
55 { 55 {
56 AddFile(filePath, m_asciiEncoding.GetBytes(data)); 56 AddFile(filePath, m_asciiEncoding.GetBytes(data));
57 } 57 }
58 58
59 /// <summary> 59 /// <summary>
60 /// Add a file to the tar archive 60 /// Add a file to the tar archive
61 /// </summary> 61 /// </summary>
@@ -65,117 +65,117 @@ namespace OpenSim.Region.Environment
65 { 65 {
66 m_files[filePath] = data; 66 m_files[filePath] = data;
67 } 67 }
68 68
69 /// <summary> 69 /// <summary>
70 /// Write the raw tar archive data to a file 70 /// Write the raw tar archive data to a file
71 /// </summary> 71 /// </summary>
72 /// <returns></returns> 72 /// <returns></returns>
73 public void WriteTar(string archivePath) 73 public void WriteTar(string archivePath)
74 { 74 {
75 BinaryWriter bw = new BinaryWriter(new FileStream(archivePath, FileMode.Create)); 75 BinaryWriter bw = new BinaryWriter(new FileStream(archivePath, FileMode.Create));
76 76
77 foreach (string filePath in m_files.Keys) 77 foreach (string filePath in m_files.Keys)
78 { 78 {
79 byte[] header = new byte[512]; 79 byte[] header = new byte[512];
80 byte[] data = m_files[filePath]; 80 byte[] data = m_files[filePath];
81 81
82 //string filePath = "test.txt"; 82 //string filePath = "test.txt";
83 //byte[] data = m_asciiEncoding.GetBytes("hello\n"); 83 //byte[] data = m_asciiEncoding.GetBytes("hello\n");
84 84
85 // file path field (100) 85 // file path field (100)
86 byte[] nameBytes = m_asciiEncoding.GetBytes(filePath); 86 byte[] nameBytes = m_asciiEncoding.GetBytes(filePath);
87 int nameSize = (nameBytes.Length >= 100) ? 100 : nameBytes.Length; 87 int nameSize = (nameBytes.Length >= 100) ? 100 : nameBytes.Length;
88 Array.Copy(nameBytes, header, nameSize); 88 Array.Copy(nameBytes, header, nameSize);
89 89
90 // file mode (8) 90 // file mode (8)
91 byte[] modeBytes = m_asciiEncoding.GetBytes("0000644"); 91 byte[] modeBytes = m_asciiEncoding.GetBytes("0000644");
92 Array.Copy(modeBytes, 0, header, 100, 7); 92 Array.Copy(modeBytes, 0, header, 100, 7);
93 93
94 // owner user id (8) 94 // owner user id (8)
95 byte[] ownerIdBytes = m_asciiEncoding.GetBytes("0000764"); 95 byte[] ownerIdBytes = m_asciiEncoding.GetBytes("0000764");
96 Array.Copy(ownerIdBytes, 0, header, 108, 7); 96 Array.Copy(ownerIdBytes, 0, header, 108, 7);
97 97
98 // group user id (8) 98 // group user id (8)
99 byte[] groupIdBytes = m_asciiEncoding.GetBytes("0000764"); 99 byte[] groupIdBytes = m_asciiEncoding.GetBytes("0000764");
100 Array.Copy(groupIdBytes, 0, header, 116, 7); 100 Array.Copy(groupIdBytes, 0, header, 116, 7);
101 101
102 // file size in bytes (12) 102 // file size in bytes (12)
103 int fileSize = data.Length; 103 int fileSize = data.Length;
104 m_log.DebugFormat("[TAR ARCHIVE]: File size of {0} is {1}", filePath, fileSize); 104 m_log.DebugFormat("[TAR ARCHIVE]: File size of {0} is {1}", filePath, fileSize);
105 105
106 byte[] fileSizeBytes = ConvertDecimalToPaddedOctalBytes(fileSize, 11); 106 byte[] fileSizeBytes = ConvertDecimalToPaddedOctalBytes(fileSize, 11);
107 107
108 Array.Copy(fileSizeBytes, 0, header, 124, 11); 108 Array.Copy(fileSizeBytes, 0, header, 124, 11);
109 109
110 // last modification time (12) 110 // last modification time (12)
111 byte[] lastModTimeBytes = m_asciiEncoding.GetBytes("11017037332"); 111 byte[] lastModTimeBytes = m_asciiEncoding.GetBytes("11017037332");
112 Array.Copy(lastModTimeBytes, 0, header, 136, 11); 112 Array.Copy(lastModTimeBytes, 0, header, 136, 11);
113 113
114 // link indicator (1) 114 // link indicator (1)
115 //header[156] = m_asciiEncoding.GetBytes("0")[0]; 115 //header[156] = m_asciiEncoding.GetBytes("0")[0];
116 header[156] = 0; 116 header[156] = 0;
117 117
118 Array.Copy(m_asciiEncoding.GetBytes("0000000"), 0, header, 329, 7); 118 Array.Copy(m_asciiEncoding.GetBytes("0000000"), 0, header, 329, 7);
119 Array.Copy(m_asciiEncoding.GetBytes("0000000"), 0, header, 337, 7); 119 Array.Copy(m_asciiEncoding.GetBytes("0000000"), 0, header, 337, 7);
120 120
121 // check sum for header block (8) [calculated last] 121 // check sum for header block (8) [calculated last]
122 Array.Copy(m_asciiEncoding.GetBytes(" "), 0, header, 148, 8); 122 Array.Copy(m_asciiEncoding.GetBytes(" "), 0, header, 148, 8);
123 123
124 int checksum = 0; 124 int checksum = 0;
125 foreach (byte b in header) 125 foreach (byte b in header)
126 { 126 {
127 checksum += b; 127 checksum += b;
128 } 128 }
129 129
130 m_log.DebugFormat("[TAR ARCHIVE]: Decimal header checksum is {0}", checksum); 130 m_log.DebugFormat("[TAR ARCHIVE]: Decimal header checksum is {0}", checksum);
131 131
132 byte[] checkSumBytes = ConvertDecimalToPaddedOctalBytes(checksum, 6); 132 byte[] checkSumBytes = ConvertDecimalToPaddedOctalBytes(checksum, 6);
133 //byte[] checkSumBytes = m_asciiEncoding.GetBytes("007520"); 133 //byte[] checkSumBytes = m_asciiEncoding.GetBytes("007520");
134 134
135 Array.Copy(checkSumBytes, 0, header, 148, 6); 135 Array.Copy(checkSumBytes, 0, header, 148, 6);
136 136
137 header[154] = 0; 137 header[154] = 0;
138 138
139 // Write out header 139 // Write out header
140 bw.Write(header); 140 bw.Write(header);
141 141
142 // Write out data 142 // Write out data
143 bw.Write(data); 143 bw.Write(data);
144 144
145 int paddingRequired = 512 - (data.Length % 512); 145 int paddingRequired = 512 - (data.Length % 512);
146 if (paddingRequired > 0) 146 if (paddingRequired > 0)
147 { 147 {
148 m_log.DebugFormat("Padding data with {0} bytes", paddingRequired); 148 m_log.DebugFormat("Padding data with {0} bytes", paddingRequired);
149 149
150 byte[] padding = new byte[paddingRequired]; 150 byte[] padding = new byte[paddingRequired];
151 bw.Write(padding); 151 bw.Write(padding);
152 } 152 }
153 } 153 }
154 154
155 // Write two consecutive 0 blocks to end the archive 155 // Write two consecutive 0 blocks to end the archive
156 byte[] finalZeroPadding = new byte[1024]; 156 byte[] finalZeroPadding = new byte[1024];
157 bw.Write(finalZeroPadding); 157 bw.Write(finalZeroPadding);
158 158
159 bw.Close(); 159 bw.Close();
160 } 160 }
161 161
162 public static byte[] ConvertDecimalToPaddedOctalBytes(int d, int padding) 162 public static byte[] ConvertDecimalToPaddedOctalBytes(int d, int padding)
163 { 163 {
164 string oString = ""; 164 string oString = "";
165 165
166 while (d > 0) 166 while (d > 0)
167 { 167 {
168 oString = Convert.ToString((byte)'0' + d & 7) + oString; 168 oString = Convert.ToString((byte)'0' + d & 7) + oString;
169 d >>= 3; 169 d >>= 3;
170 } 170 }
171 171
172 while (oString.Length < padding) 172 while (oString.Length < padding)
173 { 173 {
174 oString = "0" + oString; 174 oString = "0" + oString;
175 } 175 }
176 176
177 byte[] oBytes = m_asciiEncoding.GetBytes(oString); 177 byte[] oBytes = m_asciiEncoding.GetBytes(oString);
178 178
179 return oBytes; 179 return oBytes;
180 } 180 }
181 } 181 }
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/LLRAW.cs b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/LLRAW.cs
index 505fae3..2e8fa9e 100644
--- a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/LLRAW.cs
+++ b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/LLRAW.cs
@@ -112,7 +112,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders
112 double t = map[x, y]; 112 double t = map[x, y];
113 int index = 0; 113 int index = 0;
114 114
115 // The lookup table is pre-sorted, so we either find an exact match or 115 // The lookup table is pre-sorted, so we either find an exact match or
116 // the next closest (smaller) match with a binary search 116 // the next closest (smaller) match with a binary search
117 index = Array.BinarySearch<HeightmapLookupValue>(LookupHeightTable, new HeightmapLookupValue(0, t)); 117 index = Array.BinarySearch<HeightmapLookupValue>(LookupHeightTable, new HeightmapLookupValue(0, t));
118 if (index < 0) 118 if (index < 0)
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs
index 8541024..3e250da 100644
--- a/OpenSim/Region/Environment/Scenes/InnerScene.cs
+++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs
@@ -196,7 +196,7 @@ namespace OpenSim.Region.Environment.Scenes
196 196
197 } 197 }
198 sceneObject.UpdateParentIDs(); 198 sceneObject.UpdateParentIDs();
199 199
200 AddSceneObject(sceneObject); 200 AddSceneObject(sceneObject);
201 } 201 }
202 202
@@ -215,14 +215,14 @@ namespace OpenSim.Region.Environment.Scenes
215 // QuadTree.AddSceneObject(sceneObject); 215 // QuadTree.AddSceneObject(sceneObject);
216 Entities.Add(sceneObject.UUID, sceneObject); 216 Entities.Add(sceneObject.UUID, sceneObject);
217 m_numPrim++; 217 m_numPrim++;
218 218
219 return true; 219 return true;
220 } 220 }
221 221
222 return false; 222 return false;
223 } 223 }
224 } 224 }
225 225
226 /// <summary> 226 /// <summary>
227 /// Delete an object from the scene 227 /// Delete an object from the scene
228 /// </summary> 228 /// </summary>
@@ -236,11 +236,11 @@ namespace OpenSim.Region.Environment.Scenes
236 { 236 {
237 Entities.Remove(uuid); 237 Entities.Remove(uuid);
238 m_numPrim--; 238 m_numPrim--;
239 239
240 return true; 240 return true;
241 } 241 }
242 } 242 }
243 243
244 return false; 244 return false;
245 } 245 }
246 246
@@ -313,7 +313,7 @@ namespace OpenSim.Region.Environment.Scenes
313 { 313 {
314 m_activeScripts += number; 314 m_activeScripts += number;
315 } 315 }
316 316
317 protected internal void DetachObject(uint objectLocalID, IClientAPI remoteClient) 317 protected internal void DetachObject(uint objectLocalID, IClientAPI remoteClient)
318 { 318 {
319 List<EntityBase> EntityList = GetEntities(); 319 List<EntityBase> EntityList = GetEntities();
@@ -340,9 +340,9 @@ namespace OpenSim.Region.Environment.Scenes
340 SceneObjectPart part = m_parentScene.GetSceneObjectPart(primId); 340 SceneObjectPart part = m_parentScene.GetSceneObjectPart(primId);
341 if (part != null) 341 if (part != null)
342 part.Undo(); 342 part.Undo();
343 } 343 }
344 } 344 }
345 345
346 protected internal void HandleObjectGroupUpdate( 346 protected internal void HandleObjectGroupUpdate(
347 IClientAPI remoteClient, LLUUID GroupID, uint objectLocalID, LLUUID Garbage) 347 IClientAPI remoteClient, LLUUID GroupID, uint objectLocalID, LLUUID Garbage)
348 { 348 {
@@ -360,12 +360,11 @@ namespace OpenSim.Region.Environment.Scenes
360 group.SetGroup(GroupID, remoteClient); 360 group.SetGroup(GroupID, remoteClient);
361 else 361 else
362 remoteClient.SendAgentAlertMessage("You don't have permission to set the group", false); 362 remoteClient.SendAgentAlertMessage("You don't have permission to set the group", false);
363
364 } 363 }
365 } 364 }
366 } 365 }
367 } 366 }
368 367
369 /// <summary> 368 /// <summary>
370 /// Event Handling routine for Attach Object 369 /// Event Handling routine for Attach Object
371 /// </summary> 370 /// </summary>
@@ -379,7 +378,7 @@ namespace OpenSim.Region.Environment.Scenes
379 378
380 AttachObject(remoteClient, objectLocalID, AttachmentPt, rot, LLVector3.Zero); 379 AttachObject(remoteClient, objectLocalID, AttachmentPt, rot, LLVector3.Zero);
381 } 380 }
382 381
383 protected internal void RezSingleAttachment( 382 protected internal void RezSingleAttachment(
384 IClientAPI remoteClient, LLUUID itemID, uint AttachmentPt,uint ItemFlags, uint NextOwnerMask) 383 IClientAPI remoteClient, LLUUID itemID, uint AttachmentPt,uint ItemFlags, uint NextOwnerMask)
385 { 384 {
@@ -492,7 +491,7 @@ namespace OpenSim.Region.Environment.Scenes
492 newAvatar.IsChildAgent = child; 491 newAvatar.IsChildAgent = child;
493 492
494 AddScenePresence(newAvatar); 493 AddScenePresence(newAvatar);
495 494
496 return newAvatar; 495 return newAvatar;
497 } 496 }
498 497
@@ -528,7 +527,7 @@ namespace OpenSim.Region.Environment.Scenes
528 ScenePresences[presence.UUID] = presence; 527 ScenePresences[presence.UUID] = presence;
529 } 528 }
530 } 529 }
531 530
532 /// <summary> 531 /// <summary>
533 /// Remove a presence from the scene 532 /// Remove a presence from the scene
534 /// </summary> 533 /// </summary>
@@ -545,9 +544,9 @@ namespace OpenSim.Region.Environment.Scenes
545 m_log.WarnFormat("[SCENE] Tried to remove non-existent scene presence with agent ID {0} from scene Entities list", agentID); 544 m_log.WarnFormat("[SCENE] Tried to remove non-existent scene presence with agent ID {0} from scene Entities list", agentID);
546 } 545 }
547 } 546 }
548 547
549 lock (ScenePresences) 548 lock (ScenePresences)
550 { 549 {
551 if (ScenePresences.Remove(agentID)) 550 if (ScenePresences.Remove(agentID))
552 { 551 {
553 //m_log.InfoFormat("[SCENE] Removed scene presence {0}", agentID); 552 //m_log.InfoFormat("[SCENE] Removed scene presence {0}", agentID);
@@ -556,7 +555,7 @@ namespace OpenSim.Region.Environment.Scenes
556 { 555 {
557 m_log.WarnFormat("[SCENE] Tried to remove non-existent scene presence with agent ID {0} from scene ScenePresences list", agentID); 556 m_log.WarnFormat("[SCENE] Tried to remove non-existent scene presence with agent ID {0} from scene ScenePresences list", agentID);
558 } 557 }
559 } 558 }
560 } 559 }
561 560
562 protected internal void SwapRootChildAgent(bool direction_RC_CR_T_F) 561 protected internal void SwapRootChildAgent(bool direction_RC_CR_T_F)
@@ -622,7 +621,7 @@ namespace OpenSim.Region.Environment.Scenes
622 m_scriptLPS = 0; 621 m_scriptLPS = 0;
623 return returnval; 622 return returnval;
624 } 623 }
625 624
626 #endregion 625 #endregion
627 626
628 #region Get Methods 627 #region Get Methods
@@ -863,7 +862,6 @@ namespace OpenSim.Region.Environment.Scenes
863 { 862 {
864 break; 863 break;
865 } 864 }
866
867 } 865 }
868 grp.scriptScore = 0; 866 grp.scriptScore = 0;
869 } 867 }
@@ -964,7 +962,7 @@ namespace OpenSim.Region.Environment.Scenes
964 } 962 }
965 } 963 }
966 } 964 }
967 965
968 protected internal void UpdatePrimGroupScale(uint localID, LLVector3 scale, IClientAPI remoteClient) 966 protected internal void UpdatePrimGroupScale(uint localID, LLVector3 scale, IClientAPI remoteClient)
969 { 967 {
970 SceneObjectGroup group = GetGroupByPrim(localID); 968 SceneObjectGroup group = GetGroupByPrim(localID);
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
index 5e7fd98..f5cb0b9 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
@@ -62,7 +62,7 @@ namespace OpenSim.Region.Environment.Scenes
62 public void AddUploadedInventoryItem(LLUUID agentID, InventoryItemBase item) 62 public void AddUploadedInventoryItem(LLUUID agentID, InventoryItemBase item)
63 { 63 {
64 IMoneyModule money=RequestModuleInterface<IMoneyModule>(); 64 IMoneyModule money=RequestModuleInterface<IMoneyModule>();
65 if(money != null) 65 if (money != null)
66 { 66 {
67 money.ApplyUploadCharge(agentID); 67 money.ApplyUploadCharge(agentID);
68 } 68 }
@@ -930,7 +930,7 @@ namespace OpenSim.Region.Environment.Scenes
930 if (part != null) 930 if (part != null)
931 { 931 {
932 TaskInventoryItem currentItem=part.GetInventoryItem(itemID); 932 TaskInventoryItem currentItem=part.GetInventoryItem(itemID);
933 if(currentItem == null) 933 if (currentItem == null)
934 { 934 {
935 LLUUID copyID = LLUUID.Random(); 935 LLUUID copyID = LLUUID.Random();
936 if (itemID != LLUUID.Zero) 936 if (itemID != LLUUID.Zero)
@@ -972,9 +972,9 @@ namespace OpenSim.Region.Environment.Scenes
972 } 972 }
973 else // Updating existing item with new perms etc 973 else // Updating existing item with new perms etc
974 { 974 {
975 TaskInventoryItem prevItem=part.GetInventoryItem(itemID); 975 TaskInventoryItem prevItem=part.GetInventoryItem(itemID);
976 itemInfo.AssetID = prevItem.AssetID; 976 itemInfo.AssetID = prevItem.AssetID;
977 if(part.UpdateInventoryItem(itemInfo)) 977 if (part.UpdateInventoryItem(itemInfo))
978 part.GetProperties(remoteClient); 978 part.GetProperties(remoteClient);
979 } 979 }
980 } 980 }
diff --git a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
index 41bd2d3..f5fe561 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
@@ -63,9 +63,9 @@ namespace OpenSim.Region.Environment.Scenes
63 63
64 if (broadcast) 64 if (broadcast)
65 EventManager.TriggerOnChatBroadcast(this, args); 65 EventManager.TriggerOnChatBroadcast(this, args);
66 else 66 else
67 EventManager.TriggerOnChatFromWorld(this, args); 67 EventManager.TriggerOnChatFromWorld(this, args);
68 68
69 } 69 }
70 /// <summary> 70 /// <summary>
71 /// 71 ///
@@ -293,7 +293,7 @@ namespace OpenSim.Region.Environment.Scenes
293 LLUUID itemID) 293 LLUUID itemID)
294 { 294 {
295 SceneObjectPart part=GetSceneObjectPart(objectID); 295 SceneObjectPart part=GetSceneObjectPart(objectID);
296 if(part == null) 296 if (part == null)
297 return; 297 return;
298 EventManager.TriggerScriptReset(part.LocalId, itemID); 298 EventManager.TriggerScriptReset(part.LocalId, itemID);
299 } 299 }
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index c9f23af..1be0617 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -199,9 +199,9 @@ namespace OpenSim.Region.Environment.Scenes
199 /// <summary> 199 /// <summary>
200 /// The dictionary of all entities in this scene. The contents of this dictionary may be changed at any time. 200 /// The dictionary of all entities in this scene. The contents of this dictionary may be changed at any time.
201 /// If you wish to add or remove entities, please use the appropriate method for that entity rather than 201 /// If you wish to add or remove entities, please use the appropriate method for that entity rather than
202 /// editing this dictionary directly. 202 /// editing this dictionary directly.
203 /// 203 ///
204 /// If you want a list of entities where the list itself is guaranteed not to change, please use 204 /// If you want a list of entities where the list itself is guaranteed not to change, please use
205 /// GetEntities() 205 /// GetEntities()
206 /// </summary> 206 /// </summary>
207 public Dictionary<LLUUID, EntityBase> Entities 207 public Dictionary<LLUUID, EntityBase> Entities
@@ -565,19 +565,19 @@ namespace OpenSim.Region.Environment.Scenes
565 m_scripts_enabled = !ScriptEngine; 565 m_scripts_enabled = !ScriptEngine;
566 m_log.Info("[TOTEDD]: Here is the method to trigger disabling of the scripting engine"); 566 m_log.Info("[TOTEDD]: Here is the method to trigger disabling of the scripting engine");
567 } 567 }
568 568
569 if (m_physics_enabled != !PhysicsEngine) 569 if (m_physics_enabled != !PhysicsEngine)
570 { 570 {
571 m_physics_enabled = !PhysicsEngine; 571 m_physics_enabled = !PhysicsEngine;
572 } 572 }
573 } 573 }
574 574
575 public int GetInaccurateNeighborCount() 575 public int GetInaccurateNeighborCount()
576 { 576 {
577 lock (m_neighbours) 577 lock (m_neighbours)
578 return m_neighbours.Count; 578 return m_neighbours.Count;
579 } 579 }
580 580
581 // This is the method that shuts down the scene. 581 // This is the method that shuts down the scene.
582 public override void Close() 582 public override void Close()
583 { 583 {
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
index a4ca33d..4610c99 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
@@ -2100,26 +2100,26 @@ namespace OpenSim.Region.Environment.Scenes
2100 /// <param name="pos"></param> 2100 /// <param name="pos"></param>
2101 public void UpdateOffSet(LLVector3 pos) 2101 public void UpdateOffSet(LLVector3 pos)
2102 { 2102 {
2103 if ((pos.X != OffsetPosition.X) || 2103 if ((pos.X != OffsetPosition.X) ||
2104 (pos.Y != OffsetPosition.Y) || 2104 (pos.Y != OffsetPosition.Y) ||
2105 (pos.Z != OffsetPosition.Z)) 2105 (pos.Z != OffsetPosition.Z))
2106 { 2106 {
2107 LLVector3 newPos = new LLVector3(pos.X, pos.Y, pos.Z); 2107 LLVector3 newPos = new LLVector3(pos.X, pos.Y, pos.Z);
2108 OffsetPosition = newPos; 2108 OffsetPosition = newPos;
2109 ScheduleTerseUpdate(); 2109 ScheduleTerseUpdate();
2110 } 2110 }
2111 } 2111 }
2112 2112
2113 public void UpdateGroupPosition(LLVector3 pos) 2113 public void UpdateGroupPosition(LLVector3 pos)
2114 { 2114 {
2115 if ((pos.X != GroupPosition.X) || 2115 if ((pos.X != GroupPosition.X) ||
2116 (pos.Y != GroupPosition.Y) || 2116 (pos.Y != GroupPosition.Y) ||
2117 (pos.Z != GroupPosition.Z)) 2117 (pos.Z != GroupPosition.Z))
2118 { 2118 {
2119 LLVector3 newPos = new LLVector3(pos.X, pos.Y, pos.Z); 2119 LLVector3 newPos = new LLVector3(pos.X, pos.Y, pos.Z);
2120 GroupPosition = newPos; 2120 GroupPosition = newPos;
2121 ScheduleTerseUpdate(); 2121 ScheduleTerseUpdate();
2122 } 2122 }
2123 } 2123 }
2124 2124
2125 #endregion 2125 #endregion
@@ -2128,15 +2128,15 @@ namespace OpenSim.Region.Environment.Scenes
2128 2128
2129 public void UpdateRotation(LLQuaternion rot) 2129 public void UpdateRotation(LLQuaternion rot)
2130 { 2130 {
2131 if ((rot.X != RotationOffset.X) || 2131 if ((rot.X != RotationOffset.X) ||
2132 (rot.Y != RotationOffset.Y) || 2132 (rot.Y != RotationOffset.Y) ||
2133 (rot.Z != RotationOffset.Z) || 2133 (rot.Z != RotationOffset.Z) ||
2134 (rot.W != RotationOffset.W)) 2134 (rot.W != RotationOffset.W))
2135 { 2135 {
2136 //StoreUndoState(); 2136 //StoreUndoState();
2137 RotationOffset = new LLQuaternion(rot.X, rot.Y, rot.Z, rot.W); 2137 RotationOffset = new LLQuaternion(rot.X, rot.Y, rot.Z, rot.W);
2138 ScheduleTerseUpdate(); 2138 ScheduleTerseUpdate();
2139 } 2139 }
2140 } 2140 }
2141 2141
2142 #endregion 2142 #endregion
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
index 396d752..dfefe24 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
@@ -1407,9 +1407,9 @@ namespace OpenSim.Region.Environment.Scenes
1407 if (remoteAvatar == null) 1407 if (remoteAvatar == null)
1408 return; 1408 return;
1409 IClientAPI cl=remoteAvatar.ControllingClient; 1409 IClientAPI cl=remoteAvatar.ControllingClient;
1410 if(cl == null) 1410 if (cl == null)
1411 return; 1411 return;
1412 if(m_appearance.Texture == null) 1412 if (m_appearance.Texture == null)
1413 return; 1413 return;
1414 1414
1415 remoteAvatar.m_controllingClient.SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_uuid, 1415 remoteAvatar.m_controllingClient.SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_uuid,
diff --git a/OpenSim/Region/Modules/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/Modules/AvatarFactory/AvatarFactoryModule.cs
index 6d88061..1a65c8d 100644
--- a/OpenSim/Region/Modules/AvatarFactory/AvatarFactoryModule.cs
+++ b/OpenSim/Region/Modules/AvatarFactory/AvatarFactoryModule.cs
@@ -157,7 +157,7 @@ namespace OpenSim.Region.Modules.AvatarFactory
157 { 157 {
158 IClientAPI clientView = (IClientAPI)sender; 158 IClientAPI clientView = (IClientAPI)sender;
159 ScenePresence avatar = m_scene.GetScenePresence(clientView.AgentId); 159 ScenePresence avatar = m_scene.GetScenePresence(clientView.AgentId);
160 if(avatar == null) { 160 if (avatar == null) {
161 m_log.Info("Avatar is child agent, ignoring AvatarIsWearing event"); 161 m_log.Info("Avatar is child agent, ignoring AvatarIsWearing event");
162 return; 162 return;
163 } 163 }
@@ -165,7 +165,7 @@ namespace OpenSim.Region.Modules.AvatarFactory
165 CachedUserInfo profile = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(clientView.AgentId); 165 CachedUserInfo profile = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(clientView.AgentId);
166 166
167 AvatarAppearance avatAppearance = null; 167 AvatarAppearance avatAppearance = null;
168 if(!TryGetAvatarAppearance(clientView.AgentId, out avatAppearance)) { 168 if (!TryGetAvatarAppearance(clientView.AgentId, out avatAppearance)) {
169 m_log.Info("We didn't seem to find the appearance, falling back to ScenePresense"); 169 m_log.Info("We didn't seem to find the appearance, falling back to ScenePresense");
170 avatAppearance = avatar.Appearance; 170 avatAppearance = avatar.Appearance;
171 } 171 }
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
index 6bdfe9a..61f92ef 100644
--- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
@@ -5480,7 +5480,7 @@ namespace OpenSim.Region.ScriptEngine.Common
5480 { 5480 {
5481 m_host.AddScriptLPS(1); 5481 m_host.AddScriptLPS(1);
5482 World.SimChatBroadcast(Helpers.StringToField(msg), 5482 World.SimChatBroadcast(Helpers.StringToField(msg),
5483 ChatTypeEnum.Owner, 0, m_host.AbsolutePosition, 5483 ChatTypeEnum.Owner, 0, m_host.AbsolutePosition,
5484 m_host.Name, m_host.UUID, false); 5484 m_host.Name, m_host.UUID, false);
5485 5485
5486 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); 5486 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs
index 64d6a75..7bb7136 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs
@@ -304,7 +304,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
304 { 304 {
305 int colon=t.IndexOf(":"); 305 int colon=t.IndexOf(":");
306 306
307 if(-1 != colon) 307 if (-1 != colon)
308 { 308 {
309 line = " at line " + Convert.ToInt32(t.Substring(colon + 1)).ToString(); 309 line = " at line " + Convert.ToInt32(t.Substring(colon + 1)).ToString();
310 break; 310 break;
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs
index 087f688..008abd0 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs
@@ -78,7 +78,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
78 // Xantor 20080525: I need assetID here to see if we already compiled this one previously 78 // Xantor 20080525: I need assetID here to see if we already compiled this one previously
79 LLUUID assetID = LLUUID.Zero; 79 LLUUID assetID = LLUUID.Zero;
80 TaskInventoryItem taskInventoryItem = new TaskInventoryItem(); 80 TaskInventoryItem taskInventoryItem = new TaskInventoryItem();
81 if(m_host.TaskInventory.TryGetValue(itemID,out taskInventoryItem)) 81 if (m_host.TaskInventory.TryGetValue(itemID,out taskInventoryItem))
82 assetID = taskInventoryItem.AssetID; 82 assetID = taskInventoryItem.AssetID;
83 83
84 84
@@ -140,7 +140,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
140 string text = "Error compiling script:\r\n" + e.Message.ToString(); 140 string text = "Error compiling script:\r\n" + e.Message.ToString();
141 if (text.Length > 1500) 141 if (text.Length > 1500)
142 text = text.Substring(0, 1500); 142 text = text.Substring(0, 1500);
143 World.SimChat(Helpers.StringToField(text), ChatTypeEnum.DebugChannel, 2147483647, 143 World.SimChat(Helpers.StringToField(text), ChatTypeEnum.DebugChannel, 2147483647,
144 m_host.AbsolutePosition, m_host.Name, m_host.UUID, false); 144 m_host.AbsolutePosition, m_host.Name, m_host.UUID, false);
145 } 145 }
146 catch (Exception e2) // LEGIT: User Scripting 146 catch (Exception e2) // LEGIT: User Scripting