Revert "Updates all IRegionModules to the new style region modules."

This reverts commit ec3c31e61e.
This commit is contained in:
Melanie
2010-01-29 07:20:13 +00:00
parent 5b9ca6e35f
commit cfca9e1e81
76 changed files with 940 additions and 1872 deletions

View File

@@ -25,11 +25,9 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using System.Net;
using System.Reflection;
using log4net;
using Mono.Addins;
using Nini.Config;
using OpenSim.Region.Framework.Interfaces;
using OpenSim.Region.Framework.Scenes;
@@ -37,23 +35,24 @@ using OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server;
namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView
{
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
public class IRCStackModule : INonSharedRegionModule
public class IRCStackModule : IRegionModule
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private IRCServer m_server;
// private Scene m_scene;
private int portNo;
#region Implementation of ISharedRegionModule
#region Implementation of IRegionModule
public void Initialise(IConfigSource source)
public void Initialise(Scene scene, IConfigSource source)
{
if (null != source.Configs["IRCd"] &&
source.Configs["IRCd"].GetBoolean("Enabled",false))
{
portNo = source.Configs["IRCd"].GetInt("Port",6666);
int portNo = source.Configs["IRCd"].GetInt("Port",6666);
// m_scene = scene;
m_server = new IRCServer(IPAddress.Parse("0.0.0.0"), portNo, scene);
m_server.OnNewIRCClient += m_server_OnNewIRCClient;
}
}
@@ -69,20 +68,9 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView
m_log.Info("[IRCd] Added user to Scene");
}
public void AddRegion(Scene scene)
public void PostInitialise()
{
if (portNo != null)
{
m_server = new IRCServer(IPAddress.Parse("0.0.0.0"), portNo, scene);
m_server.OnNewIRCClient += m_server_OnNewIRCClient;
}
}
public void RegionLoaded(Scene scene)
{
}
public void RemoveRegion(Scene scene)
{
}
public void Close()
@@ -95,9 +83,9 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView
get { return "IRCClientStackModule"; }
}
public Type ReplaceableInterface
public bool IsSharedModule
{
get { return null; }
get { return false; }
}
#endregion