Different output for !bug command on the other channels. (#winehackers, #samba-technical)
[reactos.git] / irc / TechBot / TechBot.Console / Main.cs
index 9705e67..8a29172 100644 (file)
@@ -6,7 +6,8 @@ namespace TechBot.Console
 {\r
        public class ConsoleServiceOutput : IServiceOutput\r
        {\r
-               public void WriteLine(string message)\r
+               public void WriteLine(MessageContext context,\r
+                                     string message)\r
                {\r
                        System.Console.WriteLine(message);\r
                }\r
@@ -49,11 +50,11 @@ namespace TechBot.Console
                        }\r
                }\r
 \r
-               private static string IRCChannelName\r
+               private static string IRCChannelNames\r
                {\r
                        get\r
                        {\r
-                               string optionName = "IRCChannelName";\r
+                               string optionName = "IRCChannelNames";\r
                                string s = ConfigurationSettings.AppSettings[optionName];\r
                                VerifyRequiredOption(optionName,\r
                                                     s);\r
@@ -73,6 +74,18 @@ namespace TechBot.Console
                        }\r
                }\r
 \r
+               private static string IRCBotPassword\r
+               {\r
+                       get\r
+                       {\r
+                               string optionName = "IRCBotPassword";\r
+                               string s = ConfigurationSettings.AppSettings[optionName];\r
+                               VerifyRequiredOption(optionName,\r
+                                                    s);\r
+                               return s;\r
+                       }\r
+               }\r
+\r
                private static string ChmPath\r
                {\r
                        get\r
@@ -133,6 +146,18 @@ namespace TechBot.Console
                        }\r
                }\r
 \r
+               private static string WmXml\r
+               {\r
+                       get\r
+                       {\r
+                               string optionName = "WmXml";\r
+                               string s = ConfigurationSettings.AppSettings[optionName];\r
+                               VerifyRequiredOption(optionName,\r
+                                                    s);\r
+                               return s;\r
+                       }\r
+               }\r
+\r
                private static string SvnCommand\r
                {\r
                        get\r
@@ -145,18 +170,61 @@ namespace TechBot.Console
                        }\r
                }\r
 \r
+               private static string BugUrl\r
+               {\r
+                       get\r
+                       {\r
+                               string optionName = "BugUrl";\r
+                               string s = ConfigurationSettings.AppSettings[optionName];\r
+                               VerifyRequiredOption(optionName,\r
+                                                    s);\r
+                               return s;\r
+                       }\r
+               }\r
+\r
+               private static string WineBugUrl\r
+               {\r
+                       get\r
+                       {\r
+                               string optionName = "WineBugUrl";\r
+                               string s = ConfigurationSettings.AppSettings[optionName];\r
+                               VerifyRequiredOption(optionName,\r
+                                                    s);\r
+                               return s;\r
+                       }\r
+               }\r
+\r
+\r
+               private static string SambaBugUrl\r
+               {\r
+                       get\r
+                       {\r
+                               string optionName = "SambaBugUrl";\r
+                               string s = ConfigurationSettings.AppSettings[optionName];\r
+                               VerifyRequiredOption(optionName,\r
+                                                    s);\r
+                               return s;\r
+                       }\r
+               }\r
+\r
+\r
                private static void RunIrcService()\r
                {\r
                        IrcService ircService = new IrcService(IRCServerHostName,\r
                                                               IRCServerHostPort,\r
-                                                              IRCChannelName,\r
+                                                              IRCChannelNames,\r
                                                               IRCBotName,\r
+                                                              IRCBotPassword,\r
                                                               ChmPath,\r
                                                               MainChm,\r
                                                               NtstatusXml,\r
                                                               WinerrorXml,\r
                                                               HresultXml,\r
-                                                              SvnCommand);\r
+                                                              WmXml,\r
+                                                              SvnCommand,\r
+                                                              BugUrl,\r
+                                                              WineBugUrl,\r
+                                                              SambaBugUrl);\r
                        ircService.Run();\r
                }\r
                \r
@@ -175,12 +243,17 @@ namespace TechBot.Console
                                                                    NtstatusXml,\r
                                                                    WinerrorXml,\r
                                                                    HresultXml,\r
-                                                                   SvnCommand);\r
+                                                                   WmXml,\r
+                                                                   SvnCommand,\r
+                                                                   BugUrl,\r
+                                                                   WineBugUrl,\r
+                                                                   SambaBugUrl);\r
                        service.Run();\r
                        while (true)\r
                        {\r
                                string s = System.Console.ReadLine();\r
-                               service.InjectMessage(s);\r
+                               service.InjectMessage(null,\r
+                                                     s);\r
                        }\r
                }\r
        }\r