- small fix
[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 string BugID
16 {
17 get { return Parameters; }
18 set { Parameters = value; }
19 }
20
21 public override void ExecuteCommand()
22 {
23 if (string.IsNullOrEmpty(BugID))
24 {
25 Say("Please provide a valid bug number.");
26 }
27 else
28 {
29 try
30 {
31 Say(BugUrl, Int32.Parse(BugID));
32 }
33 catch (Exception)
34 {
35 Say("{0} is not a valid bug number.", BugID);
36 }
37 }
38 }
39
40 protected abstract string BugUrl { get; }
41 }
42 }