C# Class Meebey.SmartIrc4net.IrcClient

This layer is an event driven high-level API with all features you could need for IRC programming.
Inheritance: Meebey.SmartIrc4net.IrcCommands
Show file Open project: NewEraCracker/LOIC Class Usage Examples

Public Methods

Method Description
Connect ( string addresslist, int port ) : void

Connection parameters required to establish an server connection.

GetChannel ( string channelname ) : Meebey.SmartIrc4net.Channel

GetChannelUser ( string channelname, string nickname ) : ChannelUser

Returns extended user information including channel information

GetChannels ( ) : string[]

Gets a list of all joined channels on server

GetIrcUser ( string nickname ) : IrcUser

Returns user information

IrcClient ( ) : System

This class manages the connection server and provides access to all the objects needed to send and receive messages.

IsJoined ( string channelname ) : bool

Determines if your nickname can be found in a specified channel

IsJoined ( string channelname, string nickname ) : bool

Determine if a specified nickname can be found in a specified channel

IsMe ( string nickname ) : bool

Determine if a specifier nickname is you

Login ( string nicklist, string realname ) : void

Login parameters required identify with server connection

Login ( string nicklist, string realname, int usermode ) : void

Login parameters required identify with server connection

Login ( string nicklist, string realname, int usermode, string username ) : void

Login parameters required identify with server connection

Login ( string nicklist, string realname, int usermode, string username, string password ) : void

Login parameters required identify with server connection

MessageParser ( string rawline ) : IrcMessageData
Reconnect ( bool login ) : void
Reconnect ( bool login, bool channels ) : void

Private Methods

Method Description
_Event_ERR ( IrcMessageData ircdata ) : void

Event handler for error messages

_Event_ERROR ( IrcMessageData ircdata ) : void

Event handler for error messages

_Event_ERR_NICKNAMEINUSE ( IrcMessageData ircdata ) : void

Event handler for nickname in use error messages

_Event_INVITE ( IrcMessageData ircdata ) : void

Event handler for invite messages

_Event_JOIN ( IrcMessageData ircdata ) : void

Event handler for join messages

_Event_KICK ( IrcMessageData ircdata ) : void

Event handler for kick messages

_Event_MODE ( IrcMessageData ircdata ) : void

Event handler for mode messages

_Event_NICK ( IrcMessageData ircdata ) : void

Event handler for nickname messages

_Event_NOTICE ( IrcMessageData ircdata ) : void

Event handler for notice messages

_Event_PART ( IrcMessageData ircdata ) : void

Event handler for part messages

_Event_PING ( IrcMessageData ircdata ) : void

Event handler for ping messages

_Event_PONG ( IrcMessageData ircdata ) : void

Event handler for PONG messages

_Event_PRIVMSG ( IrcMessageData ircdata ) : void

Event handler for private messages

_Event_QUIT ( IrcMessageData ircdata ) : void

Event handler for quit messages

_Event_RPL_AWAY ( IrcMessageData ircdata ) : void

Event handler for away messages

_Event_RPL_BANLIST ( IrcMessageData ircdata ) : void
_Event_RPL_CHANNELMODEIS ( IrcMessageData ircdata ) : void

Event handler for channel mode reply messages

_Event_RPL_ENDOFBANLIST ( IrcMessageData ircdata ) : void
_Event_RPL_ENDOFMOTD ( IrcMessageData ircdata ) : void

Event handler for end of mesage of the day reply messages

_Event_RPL_ENDOFNAMES ( IrcMessageData ircdata ) : void

Event handler for end of names reply messages

_Event_RPL_MOTD ( IrcMessageData ircdata ) : void

Event handler for mesage of the day reply messages

_Event_RPL_NAMREPLY ( IrcMessageData ircdata ) : void

Event handler for name reply messages

_Event_RPL_NOTOPIC ( IrcMessageData ircdata ) : void

Event handler for topic reply messages == null

_Event_RPL_NOWAWAY ( IrcMessageData ircdata ) : void

Event handler for nowaway messages

_Event_RPL_TOPIC ( IrcMessageData ircdata ) : void

Event handler for topic reply messages

_Event_RPL_UNAWAY ( IrcMessageData ircdata ) : void

Event handler for unaway messages

_Event_RPL_WELCOME ( IrcMessageData ircdata ) : void

Event handler for welcome reply messages

_Event_RPL_WHOREPLY ( IrcMessageData ircdata ) : void

Event handler for who reply messages

_Event_TOPIC ( IrcMessageData ircdata ) : void

Event handler for topic messages

_GetMessageType ( string rawline ) : ReceiveType
_HandleEvents ( IrcMessageData ircdata ) : void
_InterpretChannelMode ( IrcMessageData ircdata, string mode, string parameter ) : void

_NextNickname ( ) : string

_OnConnectionError ( object sender, EventArgs e ) : void
_OnDisconnected ( object sender, EventArgs e ) : void
_RejoinChannels ( ) : void
_RemoveChannelUser ( string channelname, string nickname ) : void

Removes a specified user from a specified channel list

_RemoveIrcUser ( string nickname ) : bool

Removes a specified user from all channel lists

_StoreChannelsToRejoin ( ) : void
_SyncingCleanup ( ) : void
_Worker ( object sender, ReadLineEventArgs e ) : void

Method Details

Connect() public method

Connection parameters required to establish an server connection.
public Connect ( string addresslist, int port ) : void
addresslist string The list of server hostnames.
port int The TCP port the server listens on.
return void

GetChannel() public method

public GetChannel ( string channelname ) : Meebey.SmartIrc4net.Channel
channelname string The name of the channel you wish to query
return Meebey.SmartIrc4net.Channel

GetChannelUser() public method

Returns extended user information including channel information
public GetChannelUser ( string channelname, string nickname ) : ChannelUser
channelname string The name of the channel you wish to query
nickname string The users 'nick' name which may NOT contain spaces
return ChannelUser

GetChannels() public method

Gets a list of all joined channels on server
public GetChannels ( ) : string[]
return string[]

GetIrcUser() public method

Returns user information
public GetIrcUser ( string nickname ) : IrcUser
nickname string The users 'nick' name which may NOT contain spaces
return IrcUser

IrcClient() public method

This class manages the connection server and provides access to all the objects needed to send and receive messages.
public IrcClient ( ) : System
return System

IsJoined() public method

Determines if your nickname can be found in a specified channel
public IsJoined ( string channelname ) : bool
channelname string The name of the channel you wish to query
return bool

IsJoined() public method

Determine if a specified nickname can be found in a specified channel
public IsJoined ( string channelname, string nickname ) : bool
channelname string The name of the channel you wish to query
nickname string The users 'nick' name which may NOT contain spaces
return bool

IsMe() public method

Determine if a specifier nickname is you
public IsMe ( string nickname ) : bool
nickname string The users 'nick' name which may NOT contain spaces
return bool

Login() public method

Login parameters required identify with server connection
public Login ( string nicklist, string realname ) : void
nicklist string The users list of 'nick' names which may NOT contain spaces
realname string The users 'real' name which may contain space characters
return void

Login() public method

Login parameters required identify with server connection
public Login ( string nicklist, string realname, int usermode ) : void
nicklist string The users list of 'nick' names which may NOT contain spaces
realname string The users 'real' name which may contain space characters
usermode int A numeric mode parameter. /// Set to 0 to recieve wallops and be invisible. /// Set to 4 to be invisible and not receive wallops.
return void

Login() public method

Login parameters required identify with server connection
public Login ( string nicklist, string realname, int usermode, string username ) : void
nicklist string The users list of 'nick' names which may NOT contain spaces
realname string The users 'real' name which may contain space characters
usermode int A numeric mode parameter. /// Set to 0 to recieve wallops and be invisible. /// Set to 4 to be invisible and not receive wallops.
username string The user's machine logon name
return void

Login() public method

Login parameters required identify with server connection
public Login ( string nicklist, string realname, int usermode, string username, string password ) : void
nicklist string The users list of 'nick' names which may NOT contain spaces
realname string The users 'real' name which may contain space characters
usermode int A numeric mode parameter. /// /// Set to 0 to recieve wallops and be invisible. /// Set to 4 to be invisible and not receive wallops. /// ///
username string The user's machine logon name
password string The optional password can and MUST be set before any attempt to register /// the connection is made.
return void

MessageParser() public method

public MessageParser ( string rawline ) : IrcMessageData
rawline string
return IrcMessageData

Reconnect() public method

public Reconnect ( bool login ) : void
login bool If the login data should be sent, after successful connect.
return void

Reconnect() public method

public Reconnect ( bool login, bool channels ) : void
login bool If the login data should be sent, after successful connect.
channels bool If the channels should be rejoined, after successful connect.
return void