aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMW2007-08-31 12:19:36 +0000
committerMW2007-08-31 12:19:36 +0000
commitf388a4725477b2e3238ccf19ea18dd05a98cdca0 (patch)
treeb810a65238213d357326f329df169161846547ce /OpenSim
parentchange debugging around failed prim loading. I have one prim that doesn't (diff)
downloadopensim-SC-f388a4725477b2e3238ccf19ea18dd05a98cdca0.zip
opensim-SC-f388a4725477b2e3238ccf19ea18dd05a98cdca0.tar.gz
opensim-SC-f388a4725477b2e3238ccf19ea18dd05a98cdca0.tar.bz2
opensim-SC-f388a4725477b2e3238ccf19ea18dd05a98cdca0.tar.xz
Added a Debug method to the Console/log class that has the Conditional attribute (set to "DEBUG"), so we can use that for writing extra debug info to the console. [for anyone who doesn't know about the Conditional attribute, it is a attribute that can be set on a method, and then any call to that method will on be compiled if the terms of that condition are met, ie is this case only if "DEBUG" is true. So its a cleaner implementation of the #if #endif directives].
A few other minor changes.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Framework/Console/LogBase.cs15
-rw-r--r--OpenSim/Grid/GridServer/GridManager.cs4
-rw-r--r--OpenSim/Region/Environment/ModuleLoader.cs24
-rw-r--r--OpenSim/Region/Environment/Modules/ChatModule.cs1
-rw-r--r--OpenSim/Region/Environment/Modules/FriendsModule.cs27
-rw-r--r--OpenSim/Region/Environment/Modules/GroupsModule.cs35
-rw-r--r--OpenSim/Region/Environment/Modules/InstantMessageModule.cs27
-rw-r--r--OpenSim/Region/Environment/Modules/InventoryModule.cs27
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs2
9 files changed, 153 insertions, 9 deletions
diff --git a/OpenSim/Framework/Console/LogBase.cs b/OpenSim/Framework/Console/LogBase.cs
index 5f16303..119c2cd 100644
--- a/OpenSim/Framework/Console/LogBase.cs
+++ b/OpenSim/Framework/Console/LogBase.cs
@@ -28,6 +28,7 @@
28using System; 28using System;
29using System.IO; 29using System.IO;
30using System.Net; 30using System.Net;
31using System.Diagnostics;
31using System.Collections.Generic; 32using System.Collections.Generic;
32 33
33namespace OpenSim.Framework.Console 34namespace OpenSim.Framework.Console
@@ -228,7 +229,21 @@ namespace OpenSim.Framework.Console
228 WriteNewLine(ConsoleColor.Blue, format, args); 229 WriteNewLine(ConsoleColor.Blue, format, args);
229 return; 230 return;
230 } 231 }
232
233 [Conditional("DEBUG")]
234 public void Debug(string format, params object[] args)
235 {
236 WriteNewLine(ConsoleColor.Gray, format, args);
237 return;
238 }
231 239
240 [Conditional("DEBUG")]
241 public void Debug(string sender, string format, params object[] args)
242 {
243 WritePrefixLine(DeriveColor(sender), sender);
244 WriteNewLine(ConsoleColor.Gray, format, args);
245 return;
246 }
232 247
233 private void WriteNewLine(ConsoleColor color, string format, params object[] args) 248 private void WriteNewLine(ConsoleColor color, string format, params object[] args)
234 { 249 {
diff --git a/OpenSim/Grid/GridServer/GridManager.cs b/OpenSim/Grid/GridServer/GridManager.cs
index d38f5d4..885cd02 100644
--- a/OpenSim/Grid/GridServer/GridManager.cs
+++ b/OpenSim/Grid/GridServer/GridManager.cs
@@ -278,9 +278,9 @@ namespace OpenSim.Grid.GridServer
278 TheSim.regionLocZ = 0; 278 TheSim.regionLocZ = 0;
279 TheSim.regionMapTextureID = new LLUUID((string)requestData["map-image-id"]); 279 TheSim.regionMapTextureID = new LLUUID((string)requestData["map-image-id"]);
280 280
281 TheSim.regionHandle = Helpers.UIntsToLong((TheSim.regionLocX * 256), (TheSim.regionLocY * 256)); 281 TheSim.regionHandle = Helpers.UIntsToLong((TheSim.regionLocX * 256), (TheSim.regionLocY * 256));
282 System.Console.WriteLine("adding region " + TheSim.regionLocX + " , " + TheSim.regionLocY + " , " + TheSim.serverURI);
283 TheSim.serverURI = "http://" + TheSim.serverIP + ":" + TheSim.serverPort + "/"; 282 TheSim.serverURI = "http://" + TheSim.serverIP + ":" + TheSim.serverPort + "/";
283 System.Console.WriteLine("adding region " + TheSim.regionLocX + " , " + TheSim.regionLocY + " , " + TheSim.serverURI);
284 TheSim.httpServerURI = "http://" + TheSim.serverIP + ":" + TheSim.httpPort + "/"; 284 TheSim.httpServerURI = "http://" + TheSim.serverIP + ":" + TheSim.httpPort + "/";
285 285
286 286
diff --git a/OpenSim/Region/Environment/ModuleLoader.cs b/OpenSim/Region/Environment/ModuleLoader.cs
index dbe43d5..1787a57 100644
--- a/OpenSim/Region/Environment/ModuleLoader.cs
+++ b/OpenSim/Region/Environment/ModuleLoader.cs
@@ -23,7 +23,7 @@ namespace OpenSim.Region.Environment
23 /// Really just a test method for loading a set of currently internal modules 23 /// Really just a test method for loading a set of currently internal modules
24 /// </summary> 24 /// </summary>
25 /// <param name="scene"></param> 25 /// <param name="scene"></param>
26 public void LoadInternalModules(Scene scene) 26 public void CreateDefaultModules(Scene scene)
27 { 27 {
28 //Testing IRegionModule ideas 28 //Testing IRegionModule ideas
29 XferModule xferManager = new XferModule(); 29 XferModule xferManager = new XferModule();
@@ -40,12 +40,30 @@ namespace OpenSim.Region.Environment
40 40
41 this.LoadModule("OpenSim.Region.ExtensionsScriptModule.dll", "ExtensionsScriptingModule", scene); 41 this.LoadModule("OpenSim.Region.ExtensionsScriptModule.dll", "ExtensionsScriptingModule", scene);
42 42
43 // Post Initialise Modules 43 // Post Initialise Modules, which most likely shouldn't be here
44 // but should rather be in a separate method that is called after all modules are loaded/created/intialised
44 xferManager.PostInitialise(); 45 xferManager.PostInitialise();
45 // chatModule.PostInitialise(); //for now leave this disabled as it would start up a partially working irc bot 46 // chatModule.PostInitialise(); //for now leave this disabled as it would start up a partially working irc bot
46 avatarProfiles.PostInitialise(); 47 avatarProfiles.PostInitialise();
47 } 48 }
48 49
50 /// <summary>
51 /// Loads/initialises a Module instance that can be used by mutliple Regions
52 /// </summary>
53 /// <param name="dllName"></param>
54 /// <param name="moduleName"></param>
55 /// <param name="scene"></param>
56 public void LoadSharedModule(string dllName, string moduleName, Scene scene)
57 {
58
59 }
60
61 /// <summary>
62 /// Loads a external Module (if not already loaded) and creates a new instance of it for the passed Scene.
63 /// </summary>
64 /// <param name="dllName"></param>
65 /// <param name="moduleName"></param>
66 /// <param name="scene"></param>
49 public void LoadModule(string dllName, string moduleName, Scene scene) 67 public void LoadModule(string dllName, string moduleName, Scene scene)
50 { 68 {
51 Assembly pluginAssembly = null; 69 Assembly pluginAssembly = null;
diff --git a/OpenSim/Region/Environment/Modules/ChatModule.cs b/OpenSim/Region/Environment/Modules/ChatModule.cs
index c26a1a5..752cde4 100644
--- a/OpenSim/Region/Environment/Modules/ChatModule.cs
+++ b/OpenSim/Region/Environment/Modules/ChatModule.cs
@@ -10,6 +10,7 @@ using OpenSim.Region.Environment.Scenes;
10using OpenSim.Region.Environment.Interfaces; 10using OpenSim.Region.Environment.Interfaces;
11using OpenSim.Framework.Interfaces; 11using OpenSim.Framework.Interfaces;
12using OpenSim.Framework.Utilities; 12using OpenSim.Framework.Utilities;
13using OpenSim.Framework.Console;
13 14
14namespace OpenSim.Region.Environment.Modules 15namespace OpenSim.Region.Environment.Modules
15{ 16{
diff --git a/OpenSim/Region/Environment/Modules/FriendsModule.cs b/OpenSim/Region/Environment/Modules/FriendsModule.cs
index 960d68f..f952bb2 100644
--- a/OpenSim/Region/Environment/Modules/FriendsModule.cs
+++ b/OpenSim/Region/Environment/Modules/FriendsModule.cs
@@ -1,10 +1,35 @@
1using System; 1using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using System.Text; 3using System.Text;
4using libsecondlife;
5using OpenSim.Framework.Interfaces;
6using OpenSim.Region.Environment.Scenes;
7using OpenSim.Region.Environment.Interfaces;
8
4 9
5namespace OpenSim.Region.Environment.Modules 10namespace OpenSim.Region.Environment.Modules
6{ 11{
7 public class FriendsModule 12 public class FriendsModule : IRegionModule
8 { 13 {
14 private Scene m_scene;
15
16 public void Initialise(Scene scene)
17 {
18 m_scene = scene;
19 }
20
21 public void PostInitialise()
22 {
23
24 }
25
26 public void CloseDown()
27 {
28 }
29
30 public string GetName()
31 {
32 return "FriendsModule";
33 }
9 } 34 }
10} 35}
diff --git a/OpenSim/Region/Environment/Modules/GroupsModule.cs b/OpenSim/Region/Environment/Modules/GroupsModule.cs
new file mode 100644
index 0000000..607b395
--- /dev/null
+++ b/OpenSim/Region/Environment/Modules/GroupsModule.cs
@@ -0,0 +1,35 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4using libsecondlife;
5using OpenSim.Framework.Interfaces;
6using OpenSim.Region.Environment.Scenes;
7using OpenSim.Region.Environment.Interfaces;
8
9namespace OpenSim.Region.Environment.Modules
10{
11 public class GroupsModule : IRegionModule
12 {
13 private Scene m_scene;
14
15 public void Initialise(Scene scene)
16 {
17 m_scene = scene;
18 }
19
20 public void PostInitialise()
21 {
22
23 }
24
25 public void CloseDown()
26 {
27 }
28
29 public string GetName()
30 {
31 return "GroupsModule";
32 }
33 }
34}
35
diff --git a/OpenSim/Region/Environment/Modules/InstantMessageModule.cs b/OpenSim/Region/Environment/Modules/InstantMessageModule.cs
index ef2f224..9c09c48 100644
--- a/OpenSim/Region/Environment/Modules/InstantMessageModule.cs
+++ b/OpenSim/Region/Environment/Modules/InstantMessageModule.cs
@@ -1,10 +1,35 @@
1using System; 1using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using System.Text; 3using System.Text;
4using libsecondlife;
5using OpenSim.Framework.Interfaces;
6using OpenSim.Region.Environment.Scenes;
7using OpenSim.Region.Environment.Interfaces;
8
4 9
5namespace OpenSim.Region.Environment.Modules 10namespace OpenSim.Region.Environment.Modules
6{ 11{
7 public class InstantMessageModule 12 public class InstantMessageModule :IRegionModule
8 { 13 {
14 private Scene m_scene;
15
16 public void Initialise(Scene scene)
17 {
18 m_scene = scene;
19 }
20
21 public void PostInitialise()
22 {
23
24 }
25
26 public void CloseDown()
27 {
28 }
29
30 public string GetName()
31 {
32 return "InstantMessageModule";
33 }
9 } 34 }
10} 35}
diff --git a/OpenSim/Region/Environment/Modules/InventoryModule.cs b/OpenSim/Region/Environment/Modules/InventoryModule.cs
index 3659292..94e7ba7 100644
--- a/OpenSim/Region/Environment/Modules/InventoryModule.cs
+++ b/OpenSim/Region/Environment/Modules/InventoryModule.cs
@@ -1,10 +1,35 @@
1using System; 1using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using System.Text; 3using System.Text;
4using libsecondlife;
5using OpenSim.Framework.Interfaces;
6using OpenSim.Region.Environment.Scenes;
7using OpenSim.Region.Environment.Interfaces;
8
4 9
5namespace OpenSim.Region.Environment.Modules 10namespace OpenSim.Region.Environment.Modules
6{ 11{
7 public class InventoryModule 12 public class InventoryModule :IRegionModule
8 { 13 {
14 private Scene m_scene;
15
16 public void Initialise(Scene scene)
17 {
18 m_scene = scene;
19 }
20
21 public void PostInitialise()
22 {
23
24 }
25
26 public void CloseDown()
27 {
28 }
29
30 public string GetName()
31 {
32 return "InventoryModule";
33 }
9 } 34 }
10} 35}
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 92f26ef..46fc86b 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -170,7 +170,7 @@ namespace OpenSim.Region.Environment.Scenes
170 m_permissionManager = new PermissionManager(this); 170 m_permissionManager = new PermissionManager(this);
171 171
172 MainLog.Instance.Verbose("Loading Region Modules"); 172 MainLog.Instance.Verbose("Loading Region Modules");
173 m_moduleLoader.LoadInternalModules(this); 173 m_moduleLoader.CreateDefaultModules(this);
174 174
175 m_eventManager.OnParcelPrimCountAdd += 175 m_eventManager.OnParcelPrimCountAdd +=
176 m_LandManager.addPrimToLandPrimCounts; 176 m_LandManager.addPrimToLandPrimCounts;