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