IRCClient

Represents a connection to an IRC server.

final
class IRCClient {}

Members

Functions

connect
void connect(string host, ushort port, string password)

Connect to the IRC network and start the protocol loop.

join
void join(string name)

Join a channel.

quit
void quit(string reason)

Disconnect from the network, giving reason as the quit message.

send
void send(string destination, string message, bool notice)

Send a message.

sendLine
void sendLine(string contents, Args args)

Send a raw IRC command.

Properties

bufferLimit
uint bufferLimit [@property getter]
uint bufferLimit [@property setter]

Maximum number of messages to send per time period, if buffering is enabled.

bufferTimeout
Duration bufferTimeout [@property getter]
Duration bufferTimeout [@property setter]

Amount of time to wait before sending each batch of messages, if buffering is enabled.

buffering
bool buffering [@property getter]
bool buffering [@property setter]

Whether to buffer outgoing messages.

connected
bool connected [@property getter]

Returns whether this connection is active.

loggedIn
bool loggedIn [@property getter]

Whether or not this connection has successfully logged in to the network.

nickname
string nickname [@property getter]
string nickname [@property setter]

The display name this client will use.

onConnect
typeof(_onConnect) onConnect [@property getter]
typeof(_onConnect) onConnect [@property setter]

Called after the connection is established, before logging in to the network.

onDisconnect
typeof(_onDisconnect) onDisconnect [@property getter]
typeof(_onDisconnect) onDisconnect [@property setter]

Called after being disconnected from the network.

onLogin
typeof(_onLogin) onLogin [@property getter]
typeof(_onLogin) onLogin [@property setter]

Called after succesfully logging in to the network.

onMessage
typeof(_onMessage) onMessage [@property getter]
typeof(_onMessage) onMessage [@property setter]

Called upon reception of an incoming message.

onNotice
typeof(_onNotice) onNotice [@property getter]
typeof(_onNotice) onNotice [@property setter]

Called upon reception of an incoming notice.

onUnknownCommand
typeof(_onUnknownCommand) onUnknownCommand [@property getter]
typeof(_onUnknownCommand) onUnknownCommand [@property setter]

Called when an unknown command is received.

onUnknownNumeric
typeof(_onUnknownNumeric) onUnknownNumeric [@property getter]
typeof(_onUnknownNumeric) onUnknownNumeric [@property setter]

Called when an unknown numeric command is received.

onUserJoin
typeof(_onUserJoin) onUserJoin [@property getter]
typeof(_onUserJoin) onUserJoin [@property setter]

Called when a user joins a channel.

onUserKick
typeof(_onUserKick) onUserKick [@property getter]
typeof(_onUserKick) onUserKick [@property setter]

Called when a user is kicked from a channel.

onUserPart
typeof(_onUserPart) onUserPart [@property getter]
typeof(_onUserPart) onUserPart [@property setter]

Called when a user leaves a channel.

onUserQuit
typeof(_onUserQuit) onUserQuit [@property getter]
typeof(_onUserQuit) onUserQuit [@property setter]

Called when a user disconnects from the network.

onUserRename
typeof(_onUserRename) onUserRename [@property getter]
typeof(_onUserRename) onUserRename [@property setter]

Called when a user changes their nickname.

realname
string realname [@property getter]
string realname [@property setter]

The real name shown by the WHOIS command.

serverHostname
string serverHostname [@property getter]

The hostname of the server this client is connected to.

sleepTimeout
Duration sleepTimeout [@property getter]
Duration sleepTimeout [@property setter]

How long the protocol loop should sleep after failing to read a line.

username
string username [@property getter]
string username [@property setter]

The username shown by the WHOIS command.

Meta