mirror of
https://github.com/reactos/reactos.git
synced 2025-06-11 04:47:22 +00:00
- Moved commands outside TechBot.Library to TechBot.Commands.Common and TechBot.Commands.MSDN except for Command base classes
- Made TechBot more configurable through .config files - Code refactoring - Removed automatic parameter parsing support to make everyone happy svn path=/trunk/; revision=33586
This commit is contained in:
parent
6d51a10a1b
commit
ac77d9d3a6
47 changed files with 1783 additions and 489 deletions
42
irc/TechBot/TechBot.Commands.Common/Base/BugCommand.cs
Normal file
42
irc/TechBot/TechBot.Commands.Common/Base/BugCommand.cs
Normal file
|
@ -0,0 +1,42 @@
|
|||
using System;
|
||||
|
||||
using TechBot.Library;
|
||||
|
||||
namespace TechBot.Commands.Common
|
||||
{
|
||||
public abstract class BugCommand : Command
|
||||
{
|
||||
private string m_BugID = null;
|
||||
|
||||
public BugCommand()
|
||||
{
|
||||
}
|
||||
|
||||
public string BugID
|
||||
{
|
||||
get { return Parameters; }
|
||||
set { Parameters = value; }
|
||||
}
|
||||
|
||||
public override void ExecuteCommand()
|
||||
{
|
||||
if (Parameters == null)
|
||||
{
|
||||
Say("Please provide a valid bug number.");
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
Say(BugUrl, Int32.Parse(BugID));
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
Say("{0} is not a valid bug number.", BugID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected abstract string BugUrl { get; }
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue