- Don't enumerate the ACPI root device
[reactos.git] / irc / TechBot / TechBot / ServiceThread.cs
1 using System;
2 using System.Configuration;
3 using System.Diagnostics;
4 using TechBot.Library;
5
6 namespace TechBot
7 {
8 public class ServiceThread
9 {
10 private EventLog m_EventLog;
11
12 public ServiceThread(EventLog eventLog)
13 {
14 m_EventLog = eventLog;
15 }
16
17 public void Run()
18 {
19 System.Console.WriteLine("TechBot irc service...");
20
21 IrcTechBotService ircService = new IrcTechBotService(
22 Settings.Default.IRCServerHostName,
23 Settings.Default.IRCServerHostPort,
24 Settings.Default.IRCChannelNames,
25 Settings.Default.IRCBotName,
26 Settings.Default.IRCBotPassword);
27
28 ircService.Run();
29 }
30
31 public void Start()
32 {
33 try
34 {
35 Run();
36 }
37 catch (Exception ex)
38 {
39 m_EventLog.WriteEntry(String.Format("Ex. {0}", ex));
40 }
41 }
42 }
43 }