IRC::Connection

This is the IRC::Connection class.

Initializer

$connection = Connection($addr: Str, $nick: Str)

Creates a new Connection class instance.

  • addr: Str - IRC server address.

  • optional port: Num - IRC server port.

  • nick: Str - Preferred nickname.

  • optional user: Str - Username (ident).

  • optional real: Str - Real name.

  • optional autojoin: List - Channels to join on connect.

Methods

connect

$connection.connect()

Initiates the connection.

send

$connection.send($line: Str)

Sends a line of IRC data.

  • line: Str - A string outgoing data.

getTarget

$connection.getTarget($target: Str)

Fetches a channel or user object.

  • target: Str - Channel name or nickname.

getChannel

$connection.getChannel($name: Str)

Fetches a channel object from a channel name.

  • name: Str - Channel name.

getUser

$connection.getUser($nick: Str)

Fetches a user object from a nickname.

  • nick: Str - Nickname associated with the user.

getServer

$connection.getServer($name: Str)

Fetches a server object from a server name.

  • name: Str - Server name.

connected

$connection.connected()

Hook. Called when a connection to the socket is established.

disconnected

$connection.disconnected()

Hook. Called on disconnect, whether it be user-initiated or due to error.

copy

$connection.copy()

Creates a new IRC::Connection with the same options.

End of the IRC::Connection class.

This file was generated automatically by the Ferret compiler from Connection.frt.