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.afrisby
parent
a37275fe40
commit
f388a47254
|
@ -28,6 +28,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace OpenSim.Framework.Console
|
namespace OpenSim.Framework.Console
|
||||||
|
@ -229,6 +230,20 @@ namespace OpenSim.Framework.Console
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Conditional("DEBUG")]
|
||||||
|
public void Debug(string format, params object[] args)
|
||||||
|
{
|
||||||
|
WriteNewLine(ConsoleColor.Gray, format, args);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
[Conditional("DEBUG")]
|
||||||
|
public void Debug(string sender, string format, params object[] args)
|
||||||
|
{
|
||||||
|
WritePrefixLine(DeriveColor(sender), sender);
|
||||||
|
WriteNewLine(ConsoleColor.Gray, format, args);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
private void WriteNewLine(ConsoleColor color, string format, params object[] args)
|
private void WriteNewLine(ConsoleColor color, string format, params object[] args)
|
||||||
{
|
{
|
||||||
|
|
|
@ -279,8 +279,8 @@ namespace OpenSim.Grid.GridServer
|
||||||
TheSim.regionMapTextureID = new LLUUID((string)requestData["map-image-id"]);
|
TheSim.regionMapTextureID = new LLUUID((string)requestData["map-image-id"]);
|
||||||
|
|
||||||
TheSim.regionHandle = Helpers.UIntsToLong((TheSim.regionLocX * 256), (TheSim.regionLocY * 256));
|
TheSim.regionHandle = Helpers.UIntsToLong((TheSim.regionLocX * 256), (TheSim.regionLocY * 256));
|
||||||
System.Console.WriteLine("adding region " + TheSim.regionLocX + " , " + TheSim.regionLocY + " , " + TheSim.serverURI);
|
|
||||||
TheSim.serverURI = "http://" + TheSim.serverIP + ":" + TheSim.serverPort + "/";
|
TheSim.serverURI = "http://" + TheSim.serverIP + ":" + TheSim.serverPort + "/";
|
||||||
|
System.Console.WriteLine("adding region " + TheSim.regionLocX + " , " + TheSim.regionLocY + " , " + TheSim.serverURI);
|
||||||
TheSim.httpServerURI = "http://" + TheSim.serverIP + ":" + TheSim.httpPort + "/";
|
TheSim.httpServerURI = "http://" + TheSim.serverIP + ":" + TheSim.httpPort + "/";
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ namespace OpenSim.Region.Environment
|
||||||
/// Really just a test method for loading a set of currently internal modules
|
/// Really just a test method for loading a set of currently internal modules
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="scene"></param>
|
/// <param name="scene"></param>
|
||||||
public void LoadInternalModules(Scene scene)
|
public void CreateDefaultModules(Scene scene)
|
||||||
{
|
{
|
||||||
//Testing IRegionModule ideas
|
//Testing IRegionModule ideas
|
||||||
XferModule xferManager = new XferModule();
|
XferModule xferManager = new XferModule();
|
||||||
|
@ -40,12 +40,30 @@ namespace OpenSim.Region.Environment
|
||||||
|
|
||||||
this.LoadModule("OpenSim.Region.ExtensionsScriptModule.dll", "ExtensionsScriptingModule", scene);
|
this.LoadModule("OpenSim.Region.ExtensionsScriptModule.dll", "ExtensionsScriptingModule", scene);
|
||||||
|
|
||||||
// Post Initialise Modules
|
// Post Initialise Modules, which most likely shouldn't be here
|
||||||
|
// but should rather be in a separate method that is called after all modules are loaded/created/intialised
|
||||||
xferManager.PostInitialise();
|
xferManager.PostInitialise();
|
||||||
// chatModule.PostInitialise(); //for now leave this disabled as it would start up a partially working irc bot
|
// chatModule.PostInitialise(); //for now leave this disabled as it would start up a partially working irc bot
|
||||||
avatarProfiles.PostInitialise();
|
avatarProfiles.PostInitialise();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Loads/initialises a Module instance that can be used by mutliple Regions
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="dllName"></param>
|
||||||
|
/// <param name="moduleName"></param>
|
||||||
|
/// <param name="scene"></param>
|
||||||
|
public void LoadSharedModule(string dllName, string moduleName, Scene scene)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Loads a external Module (if not already loaded) and creates a new instance of it for the passed Scene.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="dllName"></param>
|
||||||
|
/// <param name="moduleName"></param>
|
||||||
|
/// <param name="scene"></param>
|
||||||
public void LoadModule(string dllName, string moduleName, Scene scene)
|
public void LoadModule(string dllName, string moduleName, Scene scene)
|
||||||
{
|
{
|
||||||
Assembly pluginAssembly = null;
|
Assembly pluginAssembly = null;
|
||||||
|
|
|
@ -10,6 +10,7 @@ using OpenSim.Region.Environment.Scenes;
|
||||||
using OpenSim.Region.Environment.Interfaces;
|
using OpenSim.Region.Environment.Interfaces;
|
||||||
using OpenSim.Framework.Interfaces;
|
using OpenSim.Framework.Interfaces;
|
||||||
using OpenSim.Framework.Utilities;
|
using OpenSim.Framework.Utilities;
|
||||||
|
using OpenSim.Framework.Console;
|
||||||
|
|
||||||
namespace OpenSim.Region.Environment.Modules
|
namespace OpenSim.Region.Environment.Modules
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,10 +1,35 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using libsecondlife;
|
||||||
|
using OpenSim.Framework.Interfaces;
|
||||||
|
using OpenSim.Region.Environment.Scenes;
|
||||||
|
using OpenSim.Region.Environment.Interfaces;
|
||||||
|
|
||||||
|
|
||||||
namespace OpenSim.Region.Environment.Modules
|
namespace OpenSim.Region.Environment.Modules
|
||||||
{
|
{
|
||||||
public class FriendsModule
|
public class FriendsModule : IRegionModule
|
||||||
|
{
|
||||||
|
private Scene m_scene;
|
||||||
|
|
||||||
|
public void Initialise(Scene scene)
|
||||||
|
{
|
||||||
|
m_scene = scene;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void PostInitialise()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void CloseDown()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public string GetName()
|
||||||
|
{
|
||||||
|
return "FriendsModule";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
using libsecondlife;
|
||||||
|
using OpenSim.Framework.Interfaces;
|
||||||
|
using OpenSim.Region.Environment.Scenes;
|
||||||
|
using OpenSim.Region.Environment.Interfaces;
|
||||||
|
|
||||||
|
namespace OpenSim.Region.Environment.Modules
|
||||||
|
{
|
||||||
|
public class GroupsModule : IRegionModule
|
||||||
|
{
|
||||||
|
private Scene m_scene;
|
||||||
|
|
||||||
|
public void Initialise(Scene scene)
|
||||||
|
{
|
||||||
|
m_scene = scene;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void PostInitialise()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void CloseDown()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public string GetName()
|
||||||
|
{
|
||||||
|
return "GroupsModule";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -1,10 +1,35 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using libsecondlife;
|
||||||
|
using OpenSim.Framework.Interfaces;
|
||||||
|
using OpenSim.Region.Environment.Scenes;
|
||||||
|
using OpenSim.Region.Environment.Interfaces;
|
||||||
|
|
||||||
|
|
||||||
namespace OpenSim.Region.Environment.Modules
|
namespace OpenSim.Region.Environment.Modules
|
||||||
{
|
{
|
||||||
public class InstantMessageModule
|
public class InstantMessageModule :IRegionModule
|
||||||
|
{
|
||||||
|
private Scene m_scene;
|
||||||
|
|
||||||
|
public void Initialise(Scene scene)
|
||||||
|
{
|
||||||
|
m_scene = scene;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void PostInitialise()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void CloseDown()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public string GetName()
|
||||||
|
{
|
||||||
|
return "InstantMessageModule";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,35 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using libsecondlife;
|
||||||
|
using OpenSim.Framework.Interfaces;
|
||||||
|
using OpenSim.Region.Environment.Scenes;
|
||||||
|
using OpenSim.Region.Environment.Interfaces;
|
||||||
|
|
||||||
|
|
||||||
namespace OpenSim.Region.Environment.Modules
|
namespace OpenSim.Region.Environment.Modules
|
||||||
{
|
{
|
||||||
public class InventoryModule
|
public class InventoryModule :IRegionModule
|
||||||
|
{
|
||||||
|
private Scene m_scene;
|
||||||
|
|
||||||
|
public void Initialise(Scene scene)
|
||||||
|
{
|
||||||
|
m_scene = scene;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void PostInitialise()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void CloseDown()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public string GetName()
|
||||||
|
{
|
||||||
|
return "InventoryModule";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -170,7 +170,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
m_permissionManager = new PermissionManager(this);
|
m_permissionManager = new PermissionManager(this);
|
||||||
|
|
||||||
MainLog.Instance.Verbose("Loading Region Modules");
|
MainLog.Instance.Verbose("Loading Region Modules");
|
||||||
m_moduleLoader.LoadInternalModules(this);
|
m_moduleLoader.CreateDefaultModules(this);
|
||||||
|
|
||||||
m_eventManager.OnParcelPrimCountAdd +=
|
m_eventManager.OnParcelPrimCountAdd +=
|
||||||
m_LandManager.addPrimToLandPrimCounts;
|
m_LandManager.addPrimToLandPrimCounts;
|
||||||
|
|
Loading…
Reference in New Issue