mirror of
https://github.com/reactos/reactos.git
synced 2025-04-22 13:10:39 +00:00

- Made TechBot more configurable through .config files - Code refactoring - Removed automatic parameter parsing support to make everyone happy svn path=/trunk/; revision=33586
43 lines
868 B
C#
43 lines
868 B
C#
using System;
|
|
using System.Configuration;
|
|
using System.Diagnostics;
|
|
using TechBot.Library;
|
|
|
|
namespace TechBot
|
|
{
|
|
public class ServiceThread
|
|
{
|
|
private EventLog m_EventLog;
|
|
|
|
public ServiceThread(EventLog eventLog)
|
|
{
|
|
m_EventLog = eventLog;
|
|
}
|
|
|
|
public void Run()
|
|
{
|
|
System.Console.WriteLine("TechBot irc service...");
|
|
|
|
IrcTechBotService ircService = new IrcTechBotService(
|
|
Settings.Default.IRCServerHostName,
|
|
Settings.Default.IRCServerHostPort,
|
|
Settings.Default.IRCChannelNames,
|
|
Settings.Default.IRCBotName,
|
|
Settings.Default.IRCBotPassword);
|
|
|
|
ircService.Run();
|
|
}
|
|
|
|
public void Start()
|
|
{
|
|
try
|
|
{
|
|
Run();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
m_EventLog.WriteEntry(String.Format("Ex. {0}", ex));
|
|
}
|
|
}
|
|
}
|
|
}
|