Inherits EventEmitter (https://nodejs.org/api/events.html)
new Irc.Client({
nick: 'ircbot',
username: 'ircbot',
gecos: 'ircbot',
encoding: 'utf8',
version: 'node.js irc-framework',
enable_chghost: false,
enable_echomessage: false,
auto_reconnect: true,
auto_reconnect_wait: 4000,
auto_reconnect_max_retries: 3,
ping_interval: 30,
ping_timeout: 120
});
If connected to the IRC network and successfully registered
Request an extra IRCv3 capability
Add middleware to handle the events for the client instance
Start connecting to the IRC network. If connect_options
is provided it will
override any options given to the constructor.
Send a raw line to the IRC server
Generate a formatted line from either an array or arguments to be sent to the IRC server.
Quit from the IRC network with the given message
Ping the IRC server to show you're still alive.
Attempt to change the clients nick on the network
Send a message to the target.
Send a notice to the target.
Join a channel, optionally with a key/password.
Part/leave a channel with an optional parting message.
Send a CTCP request to target with any number of parameters.
Send a CTCP response to target with any number of parameters.
Send an action message (typically /me) to a target.
Receive information about a user on the network if they exist. Optionally calls
cb(event)
with the result if provided.
Receive a list of users on the network that matchs the target. The target may be
a channel or wildcard nick. Optionally calls cb(event)
with the result if
provided. Multiple calls to this function are queued up and run one at a time in
order.
Request that the IRC server sends a lsit of available channels. Extra parameters will be sent.
Create a channel object with the following methods:
- `say(message)
- `notice(message)
- `action(message)
- `part([part_message])
- `join([key])
Call cb()
when any incoming message matches match_regex
.
Call cb()
when an incoming notice message matches match_regex
.
Call cb()
when an incoming plain message matches match_regex
.
Call cb()
when an incoming action message matches match_regex
.