Thrown if the server sends an error message to the client.
Represents an IRC client connection.
Use the separate type irc.tracker.IrcTracker returned by irc.tracker.track to keep track of the channels the user for this connection is a member of, and the members of those channels.
Create a new unconnected IRC client.
If socket is provided, it must be an unconnected TCP socket.
Provide an instance of ssl.socket.SslSocket to
use SSL/TLS.
User information should be configured before connecting.
Only the nick name can be changed after connecting.
Event callbacks can be added both before and after connecting.
Connect this client to a server.
Address serverAddress | address of server |
char[] password | server password, or null to specify no password |
Read all available data from the connection, parse all complete IRC messages and invoke registered callbacks.
Write a raw IRC protocol message to the connection stream.
If there is more than one argument, then the first argument is formatted with subsequent arguments. Arguments must not contain newlines. Messages longer than 510 characters (UTF-8 code units) will be cut off. It is the caller's responsibility to ensure a cut-off message is valid.
Send lines of chat to a channel or user. Each line in message is sent as one message. Lines exceeding the IRC message length limit will be split up into multiple messages.
char[] target | channel or nick name to send to |
char[] message | message(s) to send. Can contain multiple lines. |
Send formatted lines of chat to a channel or user. Each line in the formatted result is sent as one message. Lines exceeding the IRC message length limit will be split up into multiple messages.
char[] target | channel or nick name to send to |
char[] fmt | message format |
FormatArgs fmtArgs | format arguments |
Send notices to a channel or user. Each line in message is sent as one notice. Lines exceeding the IRC message length limit will be split up into multiple notices.
char[] target | channel or nick name to notice |
char[] message | notices(s) to send. Can contain multiple lines. |
Send formatted notices to a channel or user. Each line in the formatted result is sent as one notice. Lines exceeding the IRC message length limit will be split up into multiple notices.
char[] target | channel or nick name to send to |
char[] fmt | message format |
FormatArgs fmtArgs | format arguments |
Send a CTCP query to a channel or user.
Send a CTCP reply to a user.
Send a CTCP error message reply.
char[] invalidData | data that caused the error |
char[] error | human-readable error message |
Check if this client is connected.
Address of the server this client is currently connected to, or null if this client is not connected.
Real name of the user for this client.
Cannot be changed after connecting.
User name of the user for this client.
Cannot be changed after connecting.
Nick name of the user for this client.
Setting this property when connected can cause the IrcClient.onNickInUse event to fire.
The name of the IRC network the server is part of, or null if the server has not advertised the network name.
The maximum number of characters (bytes) allowed in this user's nick name.
The limit is network-specific.
Add or remove user modes to/from this user.
Add or remove an address to/from a channel list.
client.addToChannelList("#foo", 'b', "Alice!*@*", "Bob!*@*");
Add or remove channel modes in the given channel.
client.addChannelModes("#foo", ChannelMode('o', "Alice"), ChannelMode('v', "Bob"));
Join a channel.
char[] channel | channel to join |
Join a passworded channel.
char[] channel | channel to join |
char[] key | channel password |
Leave a channel.
char[] channel | channel to leave |
Leave a channel with a parting message.
char[] channel | channel to leave |
char[] message | parting message |
Kick users from channels in a single message.
channelUserPairs must be a range of std.typecons.Tuple pairs of strings, where the first string is the name of a channel and the second string is the user to kick from that channel.
Query the user name and host name of up to 5 users.
char[][] nicks | between 1 and 5 nick names to query |
Query information about a particular user.
char[] nick | target user's nick name |
Query the list of members in the given channels.
Leave and disconnect from the server.
char[] message | comment sent in quit notification |
Invoked when this client has successfully connected to a server.
Invoked when a message is picked up by the user for this client.
user | user who sent the message |
target | message target. This is either the nick of this client in the case of a personal message, or the name of the channel which the message was sent to. |
Invoked when a notice is picked up by the user for this client.
user | user who sent the notice |
target | notice target. This is either the nick of this client in the case of a personal notice, or the name of the channel which the notice was sent to. |
Invoked when a user receives a new nickname.
When the user is this user, the IrcClient.nick property will return the old nickname until after all onNickChange callbacks have been invoked.
user | user which nickname was changed; the nick field contains the old nickname. Can be this user |
newNick | new nickname of user |
Invoked following a call to IrcClient.join when the channel was successfully joined.
channel | channel that was successfully joined |
Invoked when another user joins a channel that this user is a member of.
user | joining user |
channel | channel that was joined |
Invoked when a user parts a channel that this user is a member of. Also invoked when this user parts a channel.
user | parting user |
channel | channel that was parted |
Invoked when another user disconnects from the network.
user | disconnecting user |
comment | quit message |
Invoked when a user is kicked (forcefully removed) from a channel that this user is a member of.
kicker | user that initiated the kick |
channel | channel from which the user was kicked |
kickedNick | nickname of the user that was kicked |
comment | comment sent with the kick; usually describing the reason the user was kicked. Can be null |
Invoked when a list of member nick names for a channel are received.
The list is received after a successful join to a channel by this user,
or when explicitly queried with IrcClient.queryNames.
The list for a single invocation is partial;
the event can be invoked several times for the same channel
as a response to a single trigger. The list is signaled complete
when IrcClient.onNameListEnd is invoked.
channel | channel of which the users are members |
nickNames | list of member nicknames |
Invoked when the complete list of members of a channel have been received. All invocations of onNameList between invocations of this event are part of the same member list.
Invoked when a CTCP query is received in a message. IrcClient.onMessage is not invoked for the given message when onCtcpQuery has a non-zero number of registered handlers.
Invoked when a CTCP reply is received in a notice. IrcClient.onNotice is not invoked for the given notice when onCtcpReply has a non-zero number of registered handlers.
Invoked when the requested nick name of the user for this client is already in use.
Return a non-null string to provide a new nick. No further callbacks in the list are called once a callback provides a nick.
newNick | the nick name that was requested. |
Invoked when a channel is joined, a topic is set in a channel or when the current topic was requested.
topic | topic or new topic for channel |
Invoked when a channel is joined or when the current topic was requested.
nick | nick name of user who set the topic |
time | time the topic was set |
Invoked with the reply of a userhost query.
Invoked when a WHOIS reply is received.