* May partially implement a C# IRCd & IRCClientStack.

0.6.6-post-fixes
Adam Frisby 2009-05-30 03:18:09 +00:00
parent c30b5ee014
commit ac80b6539f
3 changed files with 1487 additions and 0 deletions

View File

@ -0,0 +1,41 @@
using System;
using System.Collections.Generic;
using System.Text;
using Nini.Config;
using OpenSim.Region.Framework.Interfaces;
using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView
{
class IRCStackModule : IRegionModule
{
#region Implementation of IRegionModule
public void Initialise(Scene scene, IConfigSource source)
{
throw new System.NotImplementedException();
}
public void PostInitialise()
{
throw new System.NotImplementedException();
}
public void Close()
{
throw new System.NotImplementedException();
}
public string Name
{
get { throw new System.NotImplementedException(); }
}
public bool IsSharedModule
{
get { throw new System.NotImplementedException(); }
}
#endregion
}
}

View File

@ -0,0 +1,47 @@
using System;
using System.Collections.Generic;
using System.Net;
using System.Net.Sockets;
using System.Text;
using System.Threading;
namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
{
/// <summary>
/// Adam's completely hacked up not-probably-compliant RFC1459 server class.
/// </summary>
class IRCServer
{
private TcpListener m_listener;
private bool m_running = true;
public IRCServer(IPAddress listener, int port)
{
m_listener = new TcpListener(listener, port);
m_listener.Start(50);
Thread thread = new Thread(ListenLoop);
thread.Start();
}
public void Stop()
{
m_running = false;
m_listener.Stop();
}
private void ListenLoop()
{
while(m_running)
{
AcceptClient(m_listener.AcceptTcpClient());
}
}
private void AcceptClient(TcpClient client)
{
}
}
}