reactos/irc/TechBot/TechBot.Console/ConsoleTechBotService.cs
Marc Piulachs ac77d9d3a6 - Moved commands outside TechBot.Library to TechBot.Commands.Common and TechBot.Commands.MSDN except for Command base classes
- Made TechBot more configurable through .config files
- Code refactoring
- Removed automatic parameter parsing support to make everyone happy

svn path=/trunk/; revision=33586
2008-05-18 15:54:43 +00:00

38 lines
833 B
C#

using System;
using System.Collections.Generic;
using System.Text;
using TechBot.Library;
namespace TechBot.Console
{
public class ConsoleServiceOutput : IServiceOutput
{
public void WriteLine(MessageContext context,
string message)
{
System.Console.WriteLine(message);
}
}
public class ConsoleTechBotService : TechBotService
{
public ConsoleTechBotService()
: base(new ConsoleServiceOutput())
{
System.Console.WriteLine("TechBot running console service...");
}
public override void Run()
{
//Call the base class
base.Run();
while (true)
{
InjectMessage(System.Console.ReadLine());
}
}
}
}