C# Class Squishy.Irc.Commands.IrcCommandHandler

Afficher le fichier Open project: jaddie/WCell-Utility-Bot Class Usage Examples

Méthodes publiques

Свойство Type Description
CommandsByAlias Command>.IDictionary
RemoteCommandPrefix string

Méthodes publiques

Méthode Description
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

Private Methods

Méthode Description
AddWaitingTrigger ( string reply, CmdTrigger trigger ) : void

Add a trigger that awaits a server-response;

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

Method Details

Add() public static méthode

Adds a Command to the CommandsByAlias.
public static Add ( Command cmd ) : void
cmd Command
Résultat void

Add() public static méthode

Adds a command of the specific type to the CommandsByAlias.
public static Add ( Type cmdType ) : void
cmdType System.Type
Résultat void

Ban() public méthode

public Ban ( IrcChannel Channel ) : void
Channel IrcChannel
Résultat void

Ban() public méthode

public Ban ( IrcChannel Channel, System.TimeSpan Time ) : void
Channel IrcChannel
Time System.TimeSpan
Résultat void

Ban() public méthode

public Ban ( string Channel ) : void
Channel string
Résultat void

Ban() public méthode

public Ban ( string Channel, System.TimeSpan Time ) : void
Channel string
Time System.TimeSpan
Résultat void

CtcpReply() public méthode

public CtcpReply ( string Target, string Request, string argFormat ) : void
Target string
Request string
argFormat string
Résultat void

CtcpRequest() public méthode

public CtcpRequest ( string Target, string Request, string argFormat ) : void
Target string
Request string
argFormat string
Résultat void

DccRequest() public méthode

public DccRequest ( string Target, string requestFormat ) : void
Target string
requestFormat string
Résultat void

Describe() public méthode

public Describe ( ChatTarget Target, string format ) : void
Target ChatTarget
format string
Résultat void

Describe() public méthode

public Describe ( string Target, string format ) : void
Target string
format string
Résultat void

Get() public static méthode

public static Get ( string alias ) : Command
alias string
Résultat Command

Initialize() public static méthode

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
Résultat void

Invite() public méthode

public Invite ( IrcUser User, IrcChannel Channel ) : void
User IrcUser
Channel IrcChannel
Résultat void

Invite() public méthode

public Invite ( IrcUser User, string Channel ) : void
User IrcUser
Channel string
Résultat void

Invite() public méthode

public Invite ( string Nick, IrcChannel Channel ) : void
Nick string
Channel IrcChannel
Résultat void

Invite() public méthode

public Invite ( string Nick, string Channel ) : void
Nick string
Channel string
Résultat void

IrcCommandHandler() public méthode

public IrcCommandHandler ( IrcClient connection ) : System
connection IrcClient
Résultat System

Join() public méthode

public Join ( string target ) : void
target string
Résultat void

Join() public méthode

public Join ( string target, string key ) : void
target string
key string
Résultat void

Kick() public méthode

public Kick ( IrcChannel channel, IrcUser user ) : void
channel IrcChannel
user IrcUser
Résultat void

Kick() public méthode

public Kick ( IrcChannel Channel, IrcUser User, string reasonFormat ) : void
Channel IrcChannel
User IrcUser
reasonFormat string
Résultat void

Kick() public méthode

public Kick ( string channel, string user ) : void
channel string
user string
Résultat void

Kick() public méthode

public Kick ( string Channel, string User, string reasonFormat ) : void
Channel string
User string
reasonFormat string
Résultat void

KickBan() public méthode

public KickBan ( IrcChannel channel ) : void
channel IrcChannel
Résultat void

KickBan() public méthode

public KickBan ( IrcChannel channel, System.TimeSpan time ) : void
channel IrcChannel
time System.TimeSpan
Résultat void

KickBan() public méthode

public KickBan ( IrcChannel channel, System.TimeSpan time, string reason ) : void
channel IrcChannel
time System.TimeSpan
reason string
Résultat void

KickBan() public méthode

public KickBan ( IrcChannel channel, string reason ) : void
channel IrcChannel
reason string
Résultat void

KickBan() public méthode

public KickBan ( string channel ) : void
channel string
Résultat void

KickBan() public méthode

public KickBan ( string channel, System.TimeSpan time ) : void
channel string
time System.TimeSpan
Résultat void

KickBan() public méthode

public KickBan ( string channel, System.TimeSpan time, string reason ) : void
channel string
time System.TimeSpan
reason string
Résultat void

KickBan() public méthode

public KickBan ( string channel, string reason ) : void
channel string
reason string
Résultat void

Mode() public méthode

public Mode ( IrcChannel Channel, string flags ) : void
Channel IrcChannel
flags string
Résultat void

Mode() public méthode

public Mode ( IrcChannel Channel, string flags, string Targets ) : void
Channel IrcChannel
flags string
Targets string
Résultat void

Mode() public méthode

public Mode ( string flags ) : void
flags string
Résultat void

Mode() public méthode

public Mode ( string flags, string Targets ) : void
flags string
Targets string
Résultat void

Mode() public méthode

public Mode ( string Channel, string flags, string Targets ) : void
Channel string
flags string
Targets string
Résultat void

Msg() public méthode

public Msg ( ChatTarget Target, object format ) : void
Target ChatTarget
format object
Résultat void

Msg() public méthode

public Msg ( string Target, object format ) : void
Target string
format object
Résultat void

Nick() public méthode

public Nick ( string newNick ) : void
newNick string
Résultat void

Notice() public méthode

public Notice ( ChatTarget Target, string format ) : void
Target ChatTarget
format string
Résultat void

Notice() public méthode

public Notice ( string Target, string format ) : void
Target string
format string
Résultat void

Part() public méthode

public Part ( IrcChannel chan, string reason ) : void
chan IrcChannel
reason string
Résultat void

Part() public méthode

public Part ( string chan, string reason ) : void
chan string
reason string
Résultat void

ReactTo() public méthode

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
Résultat bool

ReactTo() public méthode

Calls return ReactTo(new CmdTrigger(text));.
public ReactTo ( StringStream text ) : bool
text StringStream
Résultat bool

Remove() public static méthode

Removes a Command.
public static Remove ( Command cmd ) : void
cmd Command
Résultat void

RetrieveBanList() public méthode

public RetrieveBanList ( string Channel ) : void
Channel string
Résultat void

SetTopic() public méthode

public SetTopic ( string chan, string topic ) : void
chan string
topic string
Résultat void

Unban() public méthode

public Unban ( IrcChannel Channel ) : void
Channel IrcChannel
Résultat void

Unban() public méthode

public Unban ( IrcChannel Channel, string Masks ) : void
Channel IrcChannel
Masks string
Résultat void

Unban() public méthode

public Unban ( string Channel ) : void
Channel string
Résultat void

Unban() public méthode

public Unban ( string Channel, string Masks ) : void
Channel string
Masks string
Résultat void

Whois() public méthode

public Whois ( string nick ) : void
nick string
Résultat void

WhoisSimple() public méthode

public WhoisSimple ( string nick ) : void
nick string
Résultat void

this() public méthode

public this ( string alias ) : Command
alias string
Résultat Command

Property Details

CommandsByAlias public_oe static_oe property

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
Résultat Command>.IDictionary

RemoteCommandPrefix public_oe property

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
Résultat string