IRCClient๏
Inherits: RefCounted < Object
Core IRC client implementation with full IRCv3 support, SSL/TLS, SASL, DCC, and advanced features.
Description๏
Complete IRC client supporting RFC 1459, RFC 2812, and IRCv3 extensions (v3.1-3.4). This is a RefCounted class that provides comprehensive IRC functionality without automatic polling - use IRCClientNode for automatic message processing.
Key Features:
Full IRC protocol support (RFC 1459, RFC 2812)
IRCv3.1-3.4 extensions (capabilities, SASL, message tags, MONITOR, SETNAME, BATCH, Chathistory, Multiline)
SSL/TLS encryption with custom TLSOptions
SASL authentication (PLAIN and EXTERNAL/CertFP)
DCC file transfers with IPv4/IPv6 support
Auto-reconnect with exponential backoff and fallback servers
Nickname alternatives and auto-join channels
Client-side ignore list with wildcard matching
Channel operator helpers (op, voice, kick, ban, etc.)
Flood protection using token bucket algorithm
Character encoding support (UTF-8, ISO-8859-1, CP1252) with auto-detection
Message history and ID tracking for threading
mIRC color/formatting parser and stripper
Connection metrics and latency measurement
NickServ/ChanServ integration helpers
Nick completion and highlight detection
URL extraction and user tracking
Basic Usage:
var irc = IRCClient.new()
# Connect signals
irc.connected.connect(func(): print("Connected!"))
irc.privmsg.connect(func(sender, target, text, tags):
print("%s: %s" % [sender, text])
)
# Connect to server
irc.connect_to_server("irc.libera.chat", 6697, true, "MyBot", "bot", "My Bot")
# In _process() or timer:
irc.poll() # Process messages
Note: You must call poll() regularly to process messages. For automatic polling, use IRCClientNode instead.
Tutorials๏
Methods๏
Signals๏
account_registration_failed(reason: String) ๐
Emitted when account registration fails. reason contains the failure reason.
account_registration_success(account: String) ๐
Emitted when account registration succeeds (IRCv3 draft/account-registration). account is the registered account name.
account_verification_failed(reason: String) ๐
Emitted when account verification fails. reason contains the failure reason.
account_verification_required(account: String, method: String) ๐
Emitted when account registration requires verification (email, etc.). account is the account name, method describes verification method.
account_verification_success(account: String) ๐
Emitted when account verification succeeds. account is the verified account name.
batch_ended(ref_tag: String, batch_type: String, messages: Array) ๐
Emitted when IRCv3 BATCH ends. ref_tag is the batch ID, batch_type is the type, messages contains accumulated messages.
batch_started(ref_tag: String, batch_type: String, params: PackedStringArray) ๐
Emitted when IRCv3 BATCH starts. ref_tag is the batch ID, batch_type is the type, params are batch parameters.
capability_acknowledged(capability: String) ๐
Emitted when server acknowledges a requested capability (CAP ACK). capability is the enabled capability.
capability_denied(capability: String) ๐
Emitted when server denies a requested capability (CAP NAK). capability is the denied capability.
capability_list(capabilities: PackedStringArray) ๐
Emitted when server sends CAP LS response. capabilities contains array of available IRCv3 capabilities.
connected() ๐
Emitted when successfully connected and registered to the IRC server (RPL_WELCOME received). You can now join channels and send messages.
connection_error(error: String) ๐
Emitted when connection to IRC server fails. error contains error description. Auto-reconnect will trigger if enabled.
ctcp_received(sender: String, command: String, params: String) ๐
Emitted when receiving a CTCP request (VERSION, PING, TIME, etc.). sender is the nick, command is the CTCP command, params are optional parameters.
ctcp_reply(sender: String, command: String, params: String) ๐
Emitted when receiving a CTCP reply. sender is the nick, command is the CTCP command, params are reply data.
dcc_completed(transfer_index: int) ๐
Emitted when a DCC transfer completes successfully. transfer_index identifies the transfer.
dcc_failed(transfer_index: int, error: String) ๐
Emitted when a DCC transfer fails. transfer_index identifies the transfer, error contains error description.
dcc_progress(transfer_index: int, bytes: int, total: int) ๐
Emitted during DCC transfer with progress. transfer_index identifies the transfer, bytes is transferred, total is file size.
dcc_request(transfer: IRCDCCTransfer) ๐
Emitted when receiving a DCC transfer request. transfer is an IRCDCCTransfer object. Accept with accept_dcc_transfer().
disconnected(reason: String) ๐
Emitted when disconnected from IRC server. reason contains quit message or error. Auto-reconnect will trigger if enabled and disconnect was not manual.
highlighted(channel: String, sender: String, message: String, tags: Dictionary) ๐
Emitted directly when the sequence identifies an inclusion of the user's nickname wrapped securely in an external message from a known sender inside a specific channel.
Emitted when you successfully join a channel. channel is the channel name.
kicked(channel: String, kicker: String, reason: String) ๐
Emitted securely when the client is forcefully disconnected from a target channel by an external kicker providing an underlying operational reason.
latency_measured(latency_ms: int) ๐
Emitted after each successful PONG with the measured round-trip latency in milliseconds. Use get_average_latency() for average latency.
message_received(message: IRCMessage) ๐
Emitted for every received IRC message. message is an IRCMessage object containing raw message data, tags, and parsed components.
mode_changed(target: String, modes: String, params: PackedStringArray) ๐
Emitted when channel or user modes change. target is the channel/user, modes is the mode string, params are mode parameters.
nick_changed(old_nick: String, new_nick: String) ๐
Emitted when a user (including yourself) changes nickname. old_nick is the previous nickname, new_nick is the new one.
notice(sender: String, target: String, text: String) ๐
Emitted natively whenever a NOTICE directive reaches the stream wrapper bypassing active automation processing elements over a specific target.
numeric_001_welcome(message: String) ๐
Emitted on RPL_WELCOME (001). Connection and registration is complete. message contains the welcome text.
numeric_005_isupport(features: Dictionary) ๐
Emitted on RPL_ISUPPORT (005). features contains server capabilities and limits (CHANLIMIT, NICKLEN, etc.) as a Dictionary.
numeric_332_topic(channel: String, topic: String) ๐
Emitted when receiving channel topic (RPL_TOPIC, 332). channel is the channel, topic is the topic text.
numeric_353_names(channel: String, names: PackedStringArray) ๐
Emitted when receiving channel names list (RPL_NAMREPLY, 353). channel is the channel, names are the users.
numeric_366_endofnames(channel: String) ๐
Emitted when channel names list is complete (RPL_ENDOFNAMES, 366). channel is the channel name.
numeric_372_motd(line: String) ๐
Emitted for each line of server MOTD (RPL_MOTD, 372). line contains the MOTD line text.
numeric_433_nicknameinuse(nick: String) ๐
Emitted when requested nickname is already in use (ERR_NICKNAMEINUSE, 433). Auto-tries alternatives if configured.
numeric_730_mononline(nicks: PackedStringArray) ๐
Emitted when monitored nicks come online (RPL_MONONLINE, 730, IRCv3.3). nicks contains array of nicks.
numeric_731_monoffline(nicks: PackedStringArray) ๐
Emitted when monitored nicks go offline (RPL_MONOFFLINE, 731, IRCv3.3). nicks contains array of nicks.
numeric_received(code: int, params: PackedStringArray) ๐
Emitted for any numeric reply not otherwise handled specifically. code is the numeric code, params are parameters.
parted(channel: String, message: String) ๐
Emitted successfully following a channel disconnection event natively over an available localized channel namespace string hook wrapper.
privmsg(sender: String, target: String, text: String, tags: Dictionary) ๐
Emitted when receiving a PRIVMSG (channel or private message). sender is the nick, target is you or a channel, text is the message, tags contains IRCv3 message tags if present.
sasl_failed(reason: String) ๐
Emitted cleanly if an internal SASL credential wrapper triggers a denial response directly from an IRCv3 authentication pipeline block.
sasl_success() ๐
Emitted immediately upon successfully negotiating a valid cryptographic credential wrapper dynamically against an IRC authentication service.
standard_reply_fail(command: String, code: String, context: String, description: String, tags: Dictionary) ๐
Emitted for IRCv3.4 FAIL command (structured error). command is the failed command, code is error code, context and description provide details.
standard_reply_note(command: String, code: String, context: String, description: String, tags: Dictionary) ๐
Emitted for IRCv3.4 NOTE command (structured notice). command is the command, code is notice code.
standard_reply_warn(command: String, code: String, context: String, description: String, tags: Dictionary) ๐
Emitted for IRCv3.4 WARN command (structured warning). command is the command, code is warning code.
status_changed(status: int) ๐
Emitted when connection status changes. status is the new Status value.
tag_base64_data(key: String, encoded: String, decoded: String) ๐
Emitted when an IRCv3 tag contains base64 data. key is the tag name, encoded is original, decoded is decoded string.
tag_json_data(key: String, data: Dictionary) ๐
Emitted when an IRCv3 tag contains base64-encoded JSON data (automatically decoded). key is the tag name, data is the parsed Dictionary.
topic_changed(channel: String, topic: String, setter: String) ๐
Emitted when channel topic changes. channel is the channel name, topic is the new topic, setter is who set it.
user_joined(channel: String, user: String, account: String, realname: String) ๐
Emitted when another user joins a channel you're in. channel is the channel name, user is the nick. If extended-join is enabled, account and realname contain additional IRCv3 info.
user_kicked(channel: String, kicker: String, kicked: String, reason: String) ๐
Emitted when a secondary standard user is forcefully unlinked from a shared channel network space by a secondary kicker client.
user_parted(channel: String, user: String, message: String) ๐
Emitted smoothly when a standard client node cleanly disassociates from a loaded connection sequence naturally over an active channel.
user_quit(user: String, message: String) ๐
Emitted when a user disconnects from IRC (QUIT). user is the nick, message is the quit message. Affects all channels they were in.
Enumerations๏
enum Status: ๐
Status STATUS_DISCONNECTED = 0
Not connected to any server.
Status STATUS_CONNECTING = 1
TCP connection in progress.
Status STATUS_REGISTERING = 2
Connected, sending NICK/USER registration and negotiating IRCv3 capabilities.
Status STATUS_CONNECTED = 3
Fully connected and registered. RPL_WELCOME (001) received. Ready to join channels and send messages.
Status STATUS_ERROR = 4
Connection error occurred. Check connection_error for details.
Method Descriptions๏
void accept_dcc_transfer(transfer_index: int) ๐
Accepts an incoming DCC file transfer by index from get_active_transfers(). transfer_index - Transfer index.
void add_alternative_nick(nick: String) ๐
Adds an alternative nickname to the fallback list. nick - Nick.
void add_autojoin_channel(channel: String, key: String = "") ๐
Adds a channel to auto-join on connect. key is optional channel password.
void add_fallback_server(host: String, port: int, use_ssl: bool = true) ๐
Adds a fallback server to try on reconnect. Servers are tried in order when reconnection fails. host - Host. port - Port. use_ssl - Use ssl.
void add_highlight_pattern(pattern: String) ๐
Adds a custom highlight pattern (regex). Triggers highlighted when matched in messages. pattern - Pattern.
void ban_user(channel: String, mask: String) ๐
Bans a user mask from the channel (+b mode). mask should be in the format nick!user@host with wildcards. Requires channel operator status.
void cancel_dcc_transfer(transfer_index: int) ๐
Cancels an active DCC transfer by index. transfer_index - Transfer index.
void clear_all_sts_policies() ๐
Clears all stored STS policies. Useful for testing or troubleshooting.
void clear_alternative_nicks() ๐
Clears all alternative nicknames.
void clear_autojoin_channels() ๐
Clears all auto-join channels.
void clear_channel_key(channel: String) ๐
Removes stored password for a channel. channel - Channel.
void clear_dcc_local_ip() ๐
Clears manual DCC IP configuration, reverting to automatic detection.
void clear_fallback_servers() ๐
Clears all fallback servers.
void clear_highlight_patterns() ๐
Clears all custom highlight patterns. Your nickname is always highlighted.
void clear_ignores() ๐
Clears all ignored users.
void clear_message_history() ๐
Clears all stored message history.
void clear_sts_policy(hostname: String) ๐
Clears the STS policy for a specific hostname. Use if policy is causing connection issues. hostname - Hostname.
String complete_nick(channel: String, partial: String, cycle: int = 0) const ๐
Completes a partial nickname for tab-completion. cycle allows cycling through multiple matches.
Error connect_to_server(host: String, port: int, use_ssl: bool, nick: String, username: String, realname: String, password: String = "") ๐
Connects to an IRC server. Returns @GlobalScope.OK on success.
host - Server hostname or IP address.
port - Server port (typically 6667 for plain, 6697 for SSL).
use_ssl - Whether to use SSL/TLS encryption.
nick - Your nickname.
username - IRC username (ident).
realname - Your real name or description.
password - Optional server password (PASS command). For SASL, use enable_sasl() instead.
Note: You must call poll() regularly after connecting to process IRC messages.
irc.connect_to_server("irc.libera.chat", 6697, true, "BlaziumBot", "bot", "Blazium Test Bot")
void deop_user(channel: String, nick: String) ๐
Removes channel operator status (-o) from a user. Requires channel operator status yourself.
void devoice_user(channel: String, nick: String) ๐
Removes voice (-v) from a user in a moderated channel. Requires channel operator status.
void disable_sasl() ๐
Disables SASL authentication.
void disconnect_from_server(quit_message: String = "") ๐
Disconnects from the IRC server with an optional quit message. Disables auto-reconnect for manual disconnects.
irc.disconnect_from_server("Shutting down bot")
void enable_auto_reconnect(enabled: bool) ๐
Enables or disables automatic reconnection on disconnect. Uses exponential backoff (base delay * 2^attempts, capped at 300s). See set_reconnect_delay() and add_fallback_server().
void enable_autojoin(enabled: bool) ๐
Enables or disables automatic channel joining on connect. Channels are configured with add_autojoin_channel(). Channels are rejoined in order after successful connection.
void enable_sasl(username: String, password: String) ๐
Alias for enable_sasl_plain(). Enables SASL PLAIN authentication with the specified credentials. Must be called before connect_to_server().
void enable_sasl_external() ๐
Enables SASL EXTERNAL authentication using client certificate (CertFP). Requires a client certificate configured in TLSOptions. Must be called before connect_to_server().
void enable_sasl_plain(username: String, password: String) ๐
Enables SASL PLAIN authentication. username is your account name (often same as nick), password is your account password. Must be called before connect_to_server(). Emits sasl_success or sasl_failed.
void enable_sasl_scram_sha256(username: String, password: String) ๐
Enables SASL SCRAM-SHA-256 authentication (RFC 7677). Note: Currently falls back to SASL PLAIN with warning. Full SCRAM requires HMAC-SHA-256 + PBKDF2 implementation. Use enable_sasl_plain() or enable_sasl_external() for production. username - Username. password - Password.
PackedStringArray extract_urls(message: String) const ๐
Extracts all URLs (http://, https://, www.) from a message using regex. Returns array of URL strings. message - Message.
Array[IRCDCCTransfer] get_active_transfers() const ๐
Returns array of all active IRCDCCTransfer objects.
PackedStringArray get_alternative_nicks() const ๐
Returns array of configured alternative nicknames.
bool get_auto_detect_encoding() const ๐
Returns true if automatic encoding detection is enabled.
PackedStringArray get_autojoin_channels() const ๐
Returns array of channels configured for auto-join.
PackedStringArray get_available_capabilities() const ๐
Returns array of IRCv3 capabilities advertised by server (from CAP LS).
int get_average_latency() const ๐
Returns average PING/PONG latency in milliseconds over recent measurements.
String get_away_message() const ๐
Returns current away message if set.
bool get_bot_mode() const ๐
Returns true if bot mode is enabled.
IRCChannel get_channel(channel: String) const ๐
Returns IRCChannel object for the specified channel, or null if not joined. channel - Channel.
String get_channel_key(channel: String) const ๐
Returns stored password for a channel. channel - Channel.
PackedStringArray get_common_channels(nick: String) const ๐
Returns array of channel names you share with a user. nick - Nick.
Dictionary get_connection_stats() const ๐
Returns Dictionary with connection statistics: uptime, messages_sent, messages_received, bytes_sent, bytes_received, average_latency.
String get_current_nick() const ๐
Returns your current nickname. May differ from requested nick if changed.
String get_dcc_local_ip() const ๐
Returns the configured or auto-detected local IP address for DCC.
PackedStringArray get_enabled_capabilities() const ๐
Returns array of IRCv3 capabilities successfully enabled via CAP ACK.
String get_encoding() const ๐
Returns current character encoding.
int get_fallback_server_count() const ๐
Returns the number of configured fallback servers.
PackedStringArray get_highlight_patterns() const ๐
Returns array of all custom highlight patterns.
bool get_history_enabled() const ๐
Returns true if message history is enabled.
PackedStringArray get_ignored_users() const ๐
Returns array of all ignored user masks.
Returns true if currently marked as away.
PackedStringArray get_joined_channels() const ๐
Returns array of all channel names you have joined.
PackedStringArray get_matching_nicks(channel: String, prefix: String) const ๐
Returns array of nicks in channel matching the prefix (case-insensitive). For tab-completion. channel - Channel. prefix - Prefix.
int get_max_history_size() const ๐
Returns maximum message history size.
int get_max_reconnect_attempts() const ๐
Returns maximum reconnect attempts (-1 = unlimited).
int get_max_tracked_messages() const ๐
Returns maximum tracked message limit.
Array get_message_history() const ๐
Returns array of recent messages as Dictionaries containing sender, target, text, and tags.
String get_message_text_by_id(message_id: String) const ๐
Returns message text by IRCv3 msgid tag. Used for threading, replies, and reactions. message_id - Message id.
int get_messages_per_second() const ๐
Returns current flood protection rate limit.
PackedStringArray get_monitored_nicks() const ๐
Returns array of locally tracked monitored nicknames.
int get_ping_timeout() const ๐
Returns PING timeout in milliseconds.
int get_reconnect_attempts() const ๐
Returns current number of reconnect attempts since last disconnect.
int get_reconnect_delay() const ๐
Returns base reconnect delay in seconds.
String get_reply_to_msgid(tags: Dictionary) const ๐
Extracts the reply-to message ID from message tags. Returns empty string if message is not a reply. Use for threading detection. tags - Tags.
Status get_status() const ๐
Returns current connection status. See Status for possible values.
PackedStringArray get_supported_encodings() const ๐
Returns array of supported character encodings.
TLSOptions get_tls_options() const ๐
Returns the configured TLSOptions for SSL/TLS connections.
int get_token_bucket_size() const ๐
Returns token bucket size (burst capacity for messages).
IRCUser get_user(nick: String) const ๐
Returns IRCUser object for a nickname, or null if not found in tracked users. nick - Nick.
Dictionary get_user_info(nick: String) const ๐
Returns Dictionary with comprehensive user information aggregated from all sources. nick - Nick.
void ghost_nick(nick: String, password: String) ๐
Disconnects a ghost session using NickServ GHOST command. nick - Nick. password - Password.
irc.ghost_nick("MyNick", "secret_password")
void group_nick(password: String) ๐
Groups current nickname to your main NickServ account. password - Password.
bool has_sts_policy(hostname: String) const ๐
Returns true if a valid STS (Strict Transport Security) policy exists for the hostname. Policies auto-expire based on duration. hostname - Hostname.
void identify_chanserv(channel: String, password: String) ๐
Identifies to ChanServ for a channel. channel - Channel. password - Password.
void identify_nickserv(password: String) ๐
Sends IDENTIFY command to NickServ with your password. password - Password.
void ignore_user(mask: String) ๐
Adds user/mask to client-side ignore list. Supports wildcards (* and ?). Ignored users' PRIVMSG are automatically filtered. mask - Mask.
irc.ignore_user("*!*@spam.host.com")
void invite_user(channel: String, nick: String) ๐
Invites a user to a channel using INVITE command. channel - Channel. nick - Nick.
bool is_auto_reconnect_enabled() const ๐
Returns true if auto-reconnect is enabled.
bool is_autojoin_enabled() const ๐
Returns true if auto-join is enabled.
bool is_highlighted(message: String, nick: String = "") const ๐
Returns true if message contains your nickname or any highlight pattern. nick defaults to current nick.
bool is_ignored(nick: String) const ๐
Returns true if the nickname matches any ignore mask (supports wildcards). nick - Nick.
bool is_irc_connected() const ๐
Returns true if the client is connected to an IRC server and ready to send/receive messages.
void join_channel(channel: String, key: String = "") ๐
Joins an IRC channel. Use key for password-protected channels. Emits joined when successful.
irc.join_channel("#blazium")
void kick_user(channel: String, nick: String, reason: String = "") ๐
Kicks a user from a channel. Requires channel operator status. reason is the optional kick message.
irc.kick_user("#blazium", "SpammerNick", "No spamming allowed")
void kickban_user(channel: String, nick: String, reason: String = "") ๐
Kicks and bans a user in one operation. Creates a ban mask like *!*@hostname. Requires channel operator status.
void knock_channel(channel: String, message: String = "") ๐
Sends KNOCK command to request invitation to invite-only channel. message is optional.
void list_channels(pattern: String = "", min_users: int = 0, max_users: int = -1) ๐
Lists channels with optional ELIST filters. pattern for name matching, min_users/max_users for size filtering.
void list_silence() ๐
Requests current SILENCE list from server.
void monitor_add(nick: String) ๐
Adds a nickname to MONITOR list for real-time presence tracking (IRCv3.3). Emits numeric_730_mononline or numeric_731_monoffline. nick - Nick.
void monitor_clear() ๐
Clears all monitored nicknames.
void monitor_list() ๐
Requests current MONITOR list from server.
void monitor_remove(nick: String) ๐
Removes a nickname from MONITOR list. nick - Nick.
void monitor_status() ๐
Requests online/offline status for all monitored nicknames.
void op_user(channel: String, nick: String) ๐
Gives channel operator status (+o) to a user. Requires channel operator status yourself.
irc.op_user("#blazium", "TrustedUser")
Dictionary parse_formatting(text: String) ๐
Parses mIRC formatting and returns Dictionary with parsed segments, colors, and styles. text - Text.
void part_channel(channel: String, message: String = "") ๐
Leaves an IRC channel with an optional part message. Emits parted when successful.
irc.part_channel("#blazium", "Goodbye everyone!")
Processes incoming and outgoing IRC messages. Must be called regularly (e.g., in Node._process()). Returns @GlobalScope.OK if successful. For automatic polling, use IRCClientNode instead.
void quiet_user(channel: String, mask: String) ๐
Quiets (mutes) a user in channel using +q mode. Requires channel operator status. channel - Channel. mask - Mask.
void register_account(account: String, password: String, email: String = "") ๐
Registers a new account with the server using IRCv3 draft/account-registration. email is optional for verification.
void register_channel(channel: String) ๐
Registers a channel with ChanServ. channel - Channel.
void register_nick(email: String, password: String) ๐
Registers your nickname with NickServ. email and password are registration credentials.
irc.register_nick("[email protected]", "secure_password")
void reject_dcc_transfer(transfer_index: int) ๐
Rejects an incoming DCC file transfer by index. transfer_index - Transfer index.
void remove_autojoin_channel(channel: String) ๐
Removes a channel from the auto-join list. channel - Channel.
void remove_ban(channel: String, mask: String) ๐
Removes a ban from channel (same as unban_user()). channel - Channel. mask - Mask.
void remove_highlight_pattern(pattern: String) ๐
Removes a highlight pattern. pattern - Pattern.
void remove_reaction(channel: String, msgid: String, reaction: String) ๐
Removes emoji reaction from a message using IRCv3 draft/react capability. channel - Channel. msgid - Msgid. reaction - Reaction.
void request_ban_list(channel: String) ๐
Requests channel ban list by sending MODE #channel +b. channel - Channel.
void request_capability(capability: String) ๐
Requests an IRCv3 capability from the server. Emits capability_acknowledged or capability_denied. capability - Capability.
void request_chathistory(target: String, timestamp_start: String, timestamp_end: String, limit: int = 100) ๐
Requests message history between two timestamps using IRCv3 chathistory extension. Requires server support. target - Target. timestamp_start - Timestamp start. timestamp_end - Timestamp end. limit - Limit.
void request_chathistory_after(target: String, msgid: String, limit: int = 100) ๐
Requests messages after a specific message ID using IRCv3 chathistory. target - Target. msgid - Msgid. limit - Limit.
void request_chathistory_before(target: String, msgid: String, limit: int = 100) ๐
Requests messages before a specific message ID using IRCv3 chathistory. target - Target. msgid - Msgid. limit - Limit.
void request_chathistory_latest(target: String, limit: int = 100) ๐
Requests the latest N messages from a channel using IRCv3 chathistory. target - Target. limit - Limit.
void request_exception_list(channel: String) ๐
Requests channel ban exception list (+e mode). channel - Channel.
void request_invite_list(channel: String) ๐
Requests channel invite exception list (+I mode). channel - Channel.
void request_quiet_list(channel: String) ๐
Requests channel quiet list (+q mode). channel - Channel.
void reset_connection_stats() ๐
Resets all connection statistics to zero.
void send_action(target: String, action: String) ๐
Sends a CTCP ACTION message (/me action) to a channel or user. target - Target. action - Action.
Error send_dcc_file(nick: String, file_path: String) ๐
Initiates a DCC SEND file transfer. Returns @GlobalScope.OK on success. Emits dcc_request to recipient. nick - Nick. file_path - File path.
void send_multiline_notice(target: String, lines: PackedStringArray) ๐
Sends multi-line NOTICE. Uses IRCv3 draft/multiline BATCH if supported, otherwise sends as separate messages. target - Target. lines - Lines.
void send_multiline_privmsg(target: String, lines: PackedStringArray) ๐
Sends multi-line PRIVMSG. Uses IRCv3 draft/multiline BATCH if supported, otherwise sends as separate messages. target - Target. lines - Lines.
void send_notice(target: String, message: String) ๐
Sends a NOTICE message to a channel or user. NOTICEs should not trigger automated responses.
irc.send_notice("TargetUser", "This is an automated notice")
void send_oper(username: String, password: String) ๐
Authenticates as an IRC server operator (OPER command). Requires server operator credentials.
void send_privmsg(target: String, message: String) ๐
Sends a PRIVMSG to a channel or user. Messages are automatically queued and flood-protected. For multi-line messages, see send_multiline_privmsg().
irc.send_privmsg("#blazium", "Hello world!")
void send_raw(message: String) ๐
Sends a raw IRC command. Use with caution - prefer specific methods when available. Message length is automatically enforced (510 bytes max).
void send_reaction(channel: String, msgid: String, reaction: String) ๐
Adds emoji reaction to a message using IRCv3 draft/react capability. msgid is the message ID from tags.
void send_read_marker(channel: String, timestamp: String) ๐
Sends IRCv3 read marker for multi-device sync (draft/read-marker capability). timestamp marks read position.
void send_reply(target: String, message: String, reply_to_msgid: String) ๐
Sends a PRIVMSG as a reply to another message using IRCv3 draft/reply tag. reply_to_msgid is the msgid from the original message tags. Enables conversation threading.
void send_reply_notice(target: String, message: String, reply_to_msgid: String) ๐
Sends a NOTICE as a reply to another message using IRCv3 draft/reply tag. Similar to send_reply() but for notices. target - Target. message - Message. reply_to_msgid - Reply to msgid.
void send_typing_notification(channel: String, typing: bool) ๐
Sends typing notification to channel using IRCv3 typing capability. typing indicates start/stop.
void send_whois(nick: String) ๐
Sends WHOIS command to query detailed information about a user. Server responds via numeric replies. nick - Nick.
void set_alternative_nicks(nicks: PackedStringArray) ๐
Sets array of alternative nicknames to try if primary is taken (433 error). Automatically cycles through on ERR_NICKNAMEINUSE. nicks - Nicks.
void set_auto_detect_encoding(auto: bool) ๐
Enables/disables automatic encoding detection on received messages. auto - Auto.
void set_away(message: String) ๐
Sets away status with a message using AWAY command. message - Message.
irc.set_away("Currently away for testing")
void set_back() ๐
Removes away status by sending AWAY with no message.
irc.set_back()
void set_ban(channel: String, mask: String) ๐
Sets a ban on channel (same as ban_user()). channel - Channel. mask - Mask.
void set_bot_mode(enabled: bool) ๐
Sets bot mode (+B) to identify client as a bot (IRCv3). Automatically sends MODE command after connection if enabled. enabled - Enabled.
irc.set_bot_mode(true)
void set_channel_key(channel: String, key: String) ๐
Stores a channel password locally for later use with auto-join. channel - Channel. key - Key.
void set_dcc_local_ip(ip: String) ๐
Manually sets the local IP address for DCC connections. Auto-detected if not set. ip - Ip.
void set_encoding(encoding: String) ๐
Sets character encoding (UTF-8, ISO-8859-1, CP1252). Default is UTF-8. encoding - Encoding.
void set_exception(channel: String, mask: String) ๐
Adds a ban exception to channel (+e mode). Users matching mask can bypass bans. channel - Channel. mask - Mask.
void set_history_enabled(enabled: bool) ๐
Enables or disables local message history storage in memory. enabled - Enabled.
void set_invite_exception(channel: String, mask: String) ๐
Adds an invite exception to channel (+I mode). Users matching mask can bypass invite-only. channel - Channel. mask - Mask.
void set_max_history_size(size: int) ๐
Sets maximum number of messages to store in history. Older messages are discarded. size - Size.
void set_max_reconnect_attempts(max: int) ๐
Sets maximum reconnect attempts. Use -1 for unlimited attempts. max - Max.
void set_max_tracked_messages(max: int) ๐
Sets maximum number of message IDs to track for threading. Default is 1000. max - Max.
void set_messages_per_second(rate: int) ๐
Sets maximum IRC messages to send per second for flood protection. Default is usually 2. rate - Rate.
void set_mode(target: String, modes: String, params: PackedStringArray = PackedStringArray()) ๐
Sets IRC modes on a channel or user. modes is the mode string (e.g., "+o"), params are mode parameters.
void set_nick(new_nick: String) ๐
Changes your nickname. Emits nick_changed when successful. May fail if nick is already in use (triggers numeric_433_nicknameinuse).
void set_ping_timeout(timeout_ms: int) ๐
Sets the PING timeout in milliseconds. Connection is considered dead if no PONG received within this time.
void set_realname(realname: String) ๐
Changes your real name using IRCv3.3 SETNAME command. Requires server support for setname capability.
void set_reconnect_delay(seconds: int) ๐
Sets base delay in seconds before reconnect attempts. Actual delay uses exponential backoff: delay * 2^attempts (capped at 300s).
void set_tls_options(options: TLSOptions) ๐
Configures TLS/SSL options for secure connections. Must be set before calling connect_to_server() with use_ssl=true.
void set_token_bucket_size(size: int) ๐
Constrains the automated outgoing payload limiter to a sequence maximum governed by size to effectively resolve connection aborts resulting from network spam protocols.
void set_topic(channel: String, topic: String) ๐
Generates and launches a TOPIC adjustment payload mapped accurately against channel dynamically altering the channel's standard display sequence with topic.
void silence_user(mask: String) ๐
Adds user mask to server-side SILENCE list (server-side ignore). Requires server support. mask - Mask.
String strip_formatting(text: String) ๐
Removes all mIRC color codes and formatting characters from text. Returns plain text. text - Text.
void unban_user(channel: String, mask: String) ๐
Removes a ban (-b mode) from the channel. Requires channel operator status.
void unignore_user(mask: String) ๐
Removes a user/mask from the client-side ignore list. See ignore_user().
void unquiet_user(channel: String, mask: String) ๐
Removes quiet from a user using -q mode. Requires channel operator status. channel - Channel. mask - Mask.
void unsilence_user(mask: String) ๐
Removes user mask from server-side SILENCE list. mask - Mask.
void userhost(nick: String) ๐
Queries user hostname and status with USERHOST command. nick - Nick.
void verify_account(account: String, code: String) ๐
Verifies account registration using verification code sent via email or other method. Part of IRCv3 draft/account-registration flow. account - Account. code - Code.
void voice_user(channel: String, nick: String) ๐
Gives voice (+v) to a user, allowing them to speak in a moderated channel. Requires channel operator status.
void who_channel(channel: String) ๐
Sends WHO command for a channel to query detailed user information. Server responds with user lists via numeric replies.
void who_user(mask: String) ๐
Sends WHO command for a user mask. Server responds with matching users via numeric replies. mask - Mask.
void whowas_user(nick: String, count: int = 1) ๐
Sends WHOWAS command for offline user information. count limits results.
void whox(mask: String, fields: String = "tcuihsnfdlar", querytype: int = 0) ๐
Sends WHOX query with custom field selection. fields specifies which fields to include (t=type, c=channel, u=user, i=ip, h=host, s=server, n=nick, f=flags, d=hopcount, l=idle, a=account, o=oplevel, r=realname). querytype allows response correlation. Default fields include all standard information.