mirror of
https://github.com/reactos/reactos.git
synced 2025-06-19 15:05:30 +00:00
Import TechBot
svn path=/trunk/; revision=13064
This commit is contained in:
parent
568b27baeb
commit
9dab4509fa
94 changed files with 24386 additions and 0 deletions
28
irc/TechBot/TechBot.Library/ICommand.cs
Normal file
28
irc/TechBot/TechBot.Library/ICommand.cs
Normal file
|
@ -0,0 +1,28 @@
|
|||
using System;
|
||||
|
||||
namespace TechBot.Library
|
||||
{
|
||||
public interface ICommand
|
||||
{
|
||||
bool CanHandle(string commandName);
|
||||
void Handle(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;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue