C# Класс Squishy.Irc.Commands.IrcCommandHandler

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
CommandsByAlias Command>.IDictionary
RemoteCommandPrefix string

Открытые методы

Метод Описание
Add ( Command cmd ) : void

Adds a Command to the CommandsByAlias.

Add ( Type cmdType ) : void

Adds a command of the specific type to the CommandsByAlias.

Ban ( IrcChannel Channel ) : void
Ban ( IrcChannel Channel, System.TimeSpan Time ) : void
Ban ( string Channel ) : void
Ban ( string Channel, System.TimeSpan Time ) : void
CtcpReply ( string Target, string Request, string argFormat ) : void
CtcpRequest ( string Target, string Request, string argFormat ) : void
DccRequest ( string Target, string requestFormat ) : void
Describe ( ChatTarget Target, string format ) : void
Describe ( string Target, string format ) : void
Get ( string alias ) : Command
Initialize ( ) : void

Removes all Commands of the specific Type from the CommandsByAlias.

Clears the CommandsByAlias, invokes an instance of every Class that is inherited from Command and adds it to the CommandsByAlias and the List. Is automatically called when an instance of IrcClient is created in order to find all Commands.

Invite ( IrcUser User, IrcChannel Channel ) : void
Invite ( IrcUser User, string Channel ) : void
Invite ( string Nick, IrcChannel Channel ) : void
Invite ( string Nick, string Channel ) : void
IrcCommandHandler ( IrcClient connection ) : System
Join ( string target ) : void
Join ( string target, string key ) : void
Kick ( IrcChannel channel, IrcUser user ) : void
Kick ( IrcChannel Channel, IrcUser User, string reasonFormat ) : void
Kick ( string channel, string user ) : void
Kick ( string Channel, string User, string reasonFormat ) : void
KickBan ( IrcChannel channel ) : void
KickBan ( IrcChannel channel, System.TimeSpan time ) : void
KickBan ( IrcChannel channel, System.TimeSpan time, string reason ) : void
KickBan ( IrcChannel channel, string reason ) : void
KickBan ( string channel ) : void
KickBan ( string channel, System.TimeSpan time ) : void
KickBan ( string channel, System.TimeSpan time, string reason ) : void
KickBan ( string channel, string reason ) : void
Mode ( IrcChannel Channel, string flags ) : void
Mode ( IrcChannel Channel, string flags, string Targets ) : void
Mode ( string flags ) : void
Mode ( string flags, string Targets ) : void
Mode ( string Channel, string flags, string Targets ) : void
Msg ( ChatTarget Target, object format ) : void
Msg ( string Target, object format ) : void
Nick ( string newNick ) : void
Notice ( ChatTarget Target, string format ) : void
Notice ( string Target, string format ) : void
Part ( IrcChannel chan, string reason ) : void
Part ( string chan, string reason ) : void
ReactTo ( CmdTrigger trigger ) : bool

Executes a specific Command with parameters. Interprets the first word as alias, takes all enabled Commands with the specific alias out of the CommandsByAlias-map and triggers the specific Process() method on all of them. If the processing of the command raises an Exception, the fail events are triggered.

ReactTo ( StringStream text ) : bool

Calls return ReactTo(new CmdTrigger(text));.

Remove ( Command cmd ) : void

Removes a Command.

RetrieveBanList ( string Channel ) : void
SetTopic ( string chan, string topic ) : void
Unban ( IrcChannel Channel ) : void
Unban ( IrcChannel Channel, string Masks ) : void
Unban ( string Channel ) : void
Unban ( string Channel, string Masks ) : void
Whois ( string nick ) : void
WhoisSimple ( string nick ) : void
this ( string alias ) : Command

Приватные методы

Метод Описание
AddWaitingTrigger ( string reply, CmdTrigger trigger ) : void

Add a trigger that awaits a server-response;

NotifyServResponse ( string sender, string action, string remainder ) : void

Описание методов

Add() публичный статический Метод

Adds a Command to the CommandsByAlias.
public static Add ( Command cmd ) : void
cmd Command
Результат void

Add() публичный статический Метод

Adds a command of the specific type to the CommandsByAlias.
public static Add ( Type cmdType ) : void
cmdType System.Type
Результат void

Ban() публичный Метод

public Ban ( IrcChannel Channel ) : void
Channel IrcChannel
Результат void

Ban() публичный Метод

public Ban ( IrcChannel Channel, System.TimeSpan Time ) : void
Channel IrcChannel
Time System.TimeSpan
Результат void

Ban() публичный Метод

public Ban ( string Channel ) : void
Channel string
Результат void

Ban() публичный Метод

public Ban ( string Channel, System.TimeSpan Time ) : void
Channel string
Time System.TimeSpan
Результат void

CtcpReply() публичный Метод

public CtcpReply ( string Target, string Request, string argFormat ) : void
Target string
Request string
argFormat string
Результат void

CtcpRequest() публичный Метод

public CtcpRequest ( string Target, string Request, string argFormat ) : void
Target string
Request string
argFormat string
Результат void

DccRequest() публичный Метод

public DccRequest ( string Target, string requestFormat ) : void
Target string
requestFormat string
Результат void

Describe() публичный Метод

public Describe ( ChatTarget Target, string format ) : void
Target ChatTarget
format string
Результат void

Describe() публичный Метод

public Describe ( string Target, string format ) : void
Target string
format string
Результат void

Get() публичный статический Метод

public static Get ( string alias ) : Command
alias string
Результат Command

Initialize() публичный статический Метод

Removes all Commands of the specific Type from the CommandsByAlias. Clears the CommandsByAlias, invokes an instance of every Class that is inherited from Command and adds it to the CommandsByAlias and the List. Is automatically called when an instance of IrcClient is created in order to find all Commands.
public static Initialize ( ) : void
Результат void

Invite() публичный Метод

public Invite ( IrcUser User, IrcChannel Channel ) : void
User IrcUser
Channel IrcChannel
Результат void

Invite() публичный Метод

public Invite ( IrcUser User, string Channel ) : void
User IrcUser
Channel string
Результат void

Invite() публичный Метод

public Invite ( string Nick, IrcChannel Channel ) : void
Nick string
Channel IrcChannel
Результат void

Invite() публичный Метод

public Invite ( string Nick, string Channel ) : void
Nick string
Channel string
Результат void

IrcCommandHandler() публичный Метод

public IrcCommandHandler ( IrcClient connection ) : System
connection IrcClient
Результат System

Join() публичный Метод

public Join ( string target ) : void
target string
Результат void

Join() публичный Метод

public Join ( string target, string key ) : void
target string
key string
Результат void

Kick() публичный Метод

public Kick ( IrcChannel channel, IrcUser user ) : void
channel IrcChannel
user IrcUser
Результат void

Kick() публичный Метод

public Kick ( IrcChannel Channel, IrcUser User, string reasonFormat ) : void
Channel IrcChannel
User IrcUser
reasonFormat string
Результат void

Kick() публичный Метод

public Kick ( string channel, string user ) : void
channel string
user string
Результат void

Kick() публичный Метод

public Kick ( string Channel, string User, string reasonFormat ) : void
Channel string
User string
reasonFormat string
Результат void

KickBan() публичный Метод

public KickBan ( IrcChannel channel ) : void
channel IrcChannel
Результат void

KickBan() публичный Метод

public KickBan ( IrcChannel channel, System.TimeSpan time ) : void
channel IrcChannel
time System.TimeSpan
Результат void

KickBan() публичный Метод

public KickBan ( IrcChannel channel, System.TimeSpan time, string reason ) : void
channel IrcChannel
time System.TimeSpan
reason string
Результат void

KickBan() публичный Метод

public KickBan ( IrcChannel channel, string reason ) : void
channel IrcChannel
reason string
Результат void

KickBan() публичный Метод

public KickBan ( string channel ) : void
channel string
Результат void

KickBan() публичный Метод

public KickBan ( string channel, System.TimeSpan time ) : void
channel string
time System.TimeSpan
Результат void

KickBan() публичный Метод

public KickBan ( string channel, System.TimeSpan time, string reason ) : void
channel string
time System.TimeSpan
reason string
Результат void

KickBan() публичный Метод

public KickBan ( string channel, string reason ) : void
channel string
reason string
Результат void

Mode() публичный Метод

public Mode ( IrcChannel Channel, string flags ) : void
Channel IrcChannel
flags string
Результат void

Mode() публичный Метод

public Mode ( IrcChannel Channel, string flags, string Targets ) : void
Channel IrcChannel
flags string
Targets string
Результат void

Mode() публичный Метод

public Mode ( string flags ) : void
flags string
Результат void

Mode() публичный Метод

public Mode ( string flags, string Targets ) : void
flags string
Targets string
Результат void

Mode() публичный Метод

public Mode ( string Channel, string flags, string Targets ) : void
Channel string
flags string
Targets string
Результат void

Msg() публичный Метод

public Msg ( ChatTarget Target, object format ) : void
Target ChatTarget
format object
Результат void

Msg() публичный Метод

public Msg ( string Target, object format ) : void
Target string
format object
Результат void

Nick() публичный Метод

public Nick ( string newNick ) : void
newNick string
Результат void

Notice() публичный Метод

public Notice ( ChatTarget Target, string format ) : void
Target ChatTarget
format string
Результат void

Notice() публичный Метод

public Notice ( string Target, string format ) : void
Target string
format string
Результат void

Part() публичный Метод

public Part ( IrcChannel chan, string reason ) : void
chan IrcChannel
reason string
Результат void

Part() публичный Метод

public Part ( string chan, string reason ) : void
chan string
reason string
Результат void

ReactTo() публичный Метод

Executes a specific Command with parameters. Interprets the first word as alias, takes all enabled Commands with the specific alias out of the CommandsByAlias-map and triggers the specific Process() method on all of them. If the processing of the command raises an Exception, the fail events are triggered.
public ReactTo ( CmdTrigger trigger ) : bool
trigger CmdTrigger
Результат bool

ReactTo() публичный Метод

Calls return ReactTo(new CmdTrigger(text));.
public ReactTo ( StringStream text ) : bool
text StringStream
Результат bool

Remove() публичный статический Метод

Removes a Command.
public static Remove ( Command cmd ) : void
cmd Command
Результат void

RetrieveBanList() публичный Метод

public RetrieveBanList ( string Channel ) : void
Channel string
Результат void

SetTopic() публичный Метод

public SetTopic ( string chan, string topic ) : void
chan string
topic string
Результат void

Unban() публичный Метод

public Unban ( IrcChannel Channel ) : void
Channel IrcChannel
Результат void

Unban() публичный Метод

public Unban ( IrcChannel Channel, string Masks ) : void
Channel IrcChannel
Masks string
Результат void

Unban() публичный Метод

public Unban ( string Channel ) : void
Channel string
Результат void

Unban() публичный Метод

public Unban ( string Channel, string Masks ) : void
Channel string
Masks string
Результат void

Whois() публичный Метод

public Whois ( string nick ) : void
nick string
Результат void

WhoisSimple() публичный Метод

public WhoisSimple ( string nick ) : void
nick string
Результат void

this() публичный Метод

public this ( string alias ) : Command
alias string
Результат Command

Описание свойств

CommandsByAlias публичное статическое свойство

The Table of all Commands which exists for the use of the ReactTo() method (Filled by the Initialize() method). The keys are all possible aliases of all commands and the values are ArrayLists of Commands which are associated with the specific alias. The aliases are stored case-insensitively. Use the Remove(Command) and Add(Command) methods to manipulate this CommandsByAlias.
public static IDictionary CommandsByAlias
Результат Command>.IDictionary

RemoteCommandPrefix публичное свойство

Sets the default command-prefix to trigger this client'str commands. Set this to 0 if this client is not supposed to act like a bot.
public string RemoteCommandPrefix
Результат string