C# Class CwIRC.Interface

Class to manage connections to IRC servers, and the sending and receiving of data to them.
Afficher le fichier Open project: MatthewCox/MoronBot Class Usage Examples

Méthodes publiques

Méthode Description
Assign ( Interface face ) : void
Connect ( string p_server, int p_port ) : bool

Connects to the specified IRC server, on the specified port.

Disconnect ( ) : void

Disconnects from the IRC server that the current instance of this class is connected to.

GetData ( ) : string

Gets a message from the downstream IRC message buffer.

JOIN ( string p_channel ) : void

Sends the JOIN message to the IRC server, with the specified channel to join.

NICK ( string p_name ) : void

Sends the NICK message to the IRC server, with the specified desired nickname.

NOTICE ( string p_message, string p_target ) : void

Sends the NOTICE message to the IRC server, with the specified message and target channel.

PART ( string p_channel, string p_partMessage ) : void

Sends the PART message to the IRC server, to leave the specified channel with the specified leaving message.

PRIVMSG ( string p_message, string p_target ) : void

Sends the PRIVMSG message to the IRC server, with the specified message and target channel.

QUIT ( string p_quitMessage ) : void

Sends the QUIT message to the IRC server, with the specified quit message.

SendData ( string p_string ) : void

Puts a message on the upstream IRC message buffer.

USER ( string p_name, string p_hostname, string p_servername, string p_realname ) : void

Sends the USER message to the IRC server, with the specified name, host name, server name, and real name.

worker_DoWork ( object sender, DoWorkEventArgs e ) : void

Gets new messages from the IRC server.

worker_ProgressChanged ( object sender, ProgressChangedEventArgs e ) : void

Called when a new message is received.

Méthodes protégées

Méthode Description
OnMessageReceived ( string message ) : void

Private Methods

Méthode Description
Interface ( ) : System.ComponentModel

Method Details

Assign() public static méthode

public static Assign ( Interface face ) : void
face Interface
Résultat void

Connect() public méthode

Connects to the specified IRC server, on the specified port.
public Connect ( string p_server, int p_port ) : bool
p_server string The IRC server to connect to.
p_port int The port of the IRC server to connect to.
Résultat bool

Disconnect() public méthode

Disconnects from the IRC server that the current instance of this class is connected to.
public Disconnect ( ) : void
Résultat void

GetData() public méthode

Gets a message from the downstream IRC message buffer.
public GetData ( ) : string
Résultat string

JOIN() public méthode

Sends the JOIN message to the IRC server, with the specified channel to join.
public JOIN ( string p_channel ) : void
p_channel string The channel to join.
Résultat void

NICK() public méthode

Sends the NICK message to the IRC server, with the specified desired nickname.
public NICK ( string p_name ) : void
p_name string The desired nickname.
Résultat void

NOTICE() public méthode

Sends the NOTICE message to the IRC server, with the specified message and target channel.
public NOTICE ( string p_message, string p_target ) : void
p_message string The message to send.
p_target string The channel (or user) to send the message to.
Résultat void

OnMessageReceived() protected méthode

protected OnMessageReceived ( string message ) : void
message string
Résultat void

PART() public méthode

Sends the PART message to the IRC server, to leave the specified channel with the specified leaving message.
public PART ( string p_channel, string p_partMessage ) : void
p_channel string The channel to leave.
p_partMessage string
Résultat void

PRIVMSG() public méthode

Sends the PRIVMSG message to the IRC server, with the specified message and target channel.
public PRIVMSG ( string p_message, string p_target ) : void
p_message string The message to send.
p_target string The channel (or user) to send the message to.
Résultat void

QUIT() public méthode

Sends the QUIT message to the IRC server, with the specified quit message.
public QUIT ( string p_quitMessage ) : void
p_quitMessage string The quit message.
Résultat void

SendData() public méthode

Puts a message on the upstream IRC message buffer.
public SendData ( string p_string ) : void
p_string string The message to put on the upstream IRC message buffer.
Résultat void

USER() public méthode

Sends the USER message to the IRC server, with the specified name, host name, server name, and real name.
public USER ( string p_name, string p_hostname, string p_servername, string p_realname ) : void
p_name string The name to send.
p_hostname string The host name to send (usually ignored by the server).
p_servername string The server name to send (usually ignored by the server).
p_realname string The 'real' name to send.
Résultat void

worker_DoWork() public méthode

Gets new messages from the IRC server.
public worker_DoWork ( object sender, DoWorkEventArgs e ) : void
sender object
e System.ComponentModel.DoWorkEventArgs
Résultat void

worker_ProgressChanged() public méthode

Called when a new message is received.
public worker_ProgressChanged ( object sender, ProgressChangedEventArgs e ) : void
sender object
e System.ComponentModel.ProgressChangedEventArgs
Résultat void