mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-27 11:53:32 +00:00
- add support for preventing all commands to be run on the channel by default. Now TechBot only answers some of the commands in PM - add back the error Command svn path=/trunk/; revision=34079
48 lines
965 B
C#
48 lines
965 B
C#
using System;
|
|
|
|
using TechBot.Library;
|
|
|
|
namespace TechBot.Commands.Common
|
|
{
|
|
public abstract class BugCommand : Command
|
|
{
|
|
// private string m_BugID = null;
|
|
|
|
public BugCommand()
|
|
{
|
|
}
|
|
|
|
public override bool AnswerInPublic
|
|
{
|
|
get { return true; }
|
|
}
|
|
|
|
public string BugID
|
|
{
|
|
get { return Parameters; }
|
|
set { Parameters = value; }
|
|
}
|
|
|
|
public override void ExecuteCommand()
|
|
{
|
|
if (string.IsNullOrEmpty(BugID))
|
|
{
|
|
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; }
|
|
}
|
|
}
|