2005-01-15 19:27:25 +00:00
|
|
|
using System;
|
|
|
|
using System.Collections;
|
|
|
|
|
|
|
|
namespace TechBot.Library
|
|
|
|
{
|
2007-12-10 19:08:13 +00:00
|
|
|
public class HelpCommand : Command
|
2005-01-15 19:27:25 +00:00
|
|
|
{
|
2007-12-10 19:08:13 +00:00
|
|
|
public HelpCommand(TechBotService techBot)
|
|
|
|
: base(techBot)
|
2005-01-15 19:27:25 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2007-12-10 19:08:13 +00:00
|
|
|
public override string[] AvailableCommands
|
|
|
|
{
|
|
|
|
get { return new string[] { "help" }; }
|
|
|
|
}
|
|
|
|
|
|
|
|
public override void Handle(
|
|
|
|
MessageContext context,
|
|
|
|
string commandName,
|
|
|
|
string parameters)
|
|
|
|
{
|
|
|
|
TechBot.ServiceOutput.WriteLine(context, "I support the following commands:");
|
|
|
|
|
|
|
|
foreach (Command command in TechBot.Commands)
|
|
|
|
{
|
|
|
|
TechBot.ServiceOutput.WriteLine(context,
|
|
|
|
command.Help());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public override string Help()
|
2005-01-15 19:27:25 +00:00
|
|
|
{
|
|
|
|
return "!help";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|