- miscellaneous small fixes
[reactos.git] / irc / TechBot / TechBot.Commands.Common / Base / BugCommand.cs
1 using System;
2
3 using TechBot.Library;
4
5 namespace TechBot.Commands.Common
6 {
7 public abstract class BugCommand : Command
8 {
9 // private string m_BugID = null;
10
11 public BugCommand()
12 {
13 }
14
15 public override bool AnswerInPublic
16 {
17 get { return true; }
18 }
19
20 public string BugID
21 {
22 get { return Parameters; }
23 set { Parameters = value; }
24 }
25
26 public override void ExecuteCommand()
27 {
28 if (string.IsNullOrEmpty(BugID))
29 {
30 Say("Please provide a valid bug number.");
31 }
32 else
33 {
34 try
35 {
36 Say(BugUrl, Int32.Parse(BugID));
37 }
38 catch (Exception)
39 {
40 Say("{0} is not a valid bug number.", BugID);
41 }
42 }
43 }
44
45 protected abstract string BugUrl { get; }
46 }
47 }