Class IRCClient

Represents a connection to an IRC server.

class IRCClient ;

Properties

NameTypeDescription
buffering[get, set] boolWhether to buffer outgoing messages.
bufferLimit[get, set] uintMaximum number of messages to send per time period, if buffering is enabled.
bufferTimeout[get, set] core.time.DurationAmount of time to wait before sending each batch of messages, if buffering is enabled.
connected[get] boolReturns whether this connection is active.
loggedIn[get] boolWhether or not this connection has successfully logged in to the network.
nickname[get, set] stringThe display name this client will use.
onConnect[get, set] PerformLogin delegate()Called after the connection is established, before logging in to the network.
onDisconnect[get, set] void delegate(string)Called after being disconnected from the network.
onLogin[get, set] void delegate()Called after succesfully logging in to the network.
onMessage[get, set] void delegate(Message)Called upon reception of an incoming message.
onNotice[get, set] void delegate(Message)Called upon reception of an incoming notice.
onUnknownCommand[get, set] void delegate(string, string, string[])Called when an unknown command is received.
onUnknownNumeric[get, set] void delegate(string, int, string[])Called when an unknown numeric command is received.
onUserJoin[get, set] void delegate(User, string)Called when a user joins a channel.
onUserKick[get, set] void delegate(User, string, string, string)Called when a user is kicked from a channel.
onUserPart[get, set] void delegate(User, string, string)Called when a user leaves a channel.
onUserQuit[get, set] void delegate(User, string)Called when a user disconnects from the network.
onUserRename[get, set] void delegate(User, string)Called when a user changes their nickname.
realname[get, set] stringThe real name shown by the WHOIS command.
serverHostname[get] stringThe hostname of the server this client is connected to.
sleepTimeout[get, set] core.time.DurationHow long the protocol loop should sleep after failing to read a line.
username[get, set] stringThe username shown by the WHOIS command.

Methods

NameDescription
connect Connect to the IRC network and start the protocol loop.
join Join a channel.
quit Disconnect from the network, giving reason as the quit message.
send Send a message.
sendLine Send a raw IRC command.