1
0
Fork 0
mirror of https://github.com/reactos/reactos.git synced 2025-06-20 07:36:05 +00:00
reactos/irc/TechBot/TechBot.Library/ICommand.cs

30 lines
584 B
C#
Raw Normal View History

using System;
namespace TechBot.Library
{
public interface ICommand
{
bool CanHandle(string commandName);
void Handle(MessageContext context,
string commandName,
string parameters);
string Help();
}
public class BaseCommand
{
protected bool CanHandle(string commandName,
string[] availableCommands)
{
foreach (string availableCommand in availableCommands)
{
if (String.Compare(availableCommand, commandName, true) == 0)
return true;
}
return false;
}
}
}