IRCMessage

Inherits: RefCounted < Object

Represents a fully parsed raw IRC protocol message.

Description

Parses and encapsulates an active IRC protocol line into an isolated structure, splitting it into standardized tags, prefixes, commands, and parameters based on the RFC 1459 and IRCv3 specifications.

Tutorials

Properties

String

command

""

PackedStringArray

params

PackedStringArray()

String

prefix

""

Dictionary

tags

{}

Methods

String

decode_base64_string(value: String) static

String

encode_ctcp(command: String, params: String = "") static

String

get_ctcp_command() const

String

get_ctcp_params() const

String

get_hostname() const

String

get_nick() const

int

get_numeric() const

Dictionary

get_processed_tags() const

Variant

get_tag_value(key: String) const

String

get_username() const

bool

is_base64(value: String) static

bool

is_ctcp() const

bool

is_json(value: String) static

bool

is_numeric() const

IRCMessage

parse(raw_message: String) static

Variant

parse_json_string(value: String) static


Property Descriptions

String command = "" 🔗

There is currently no description for this property. Please help us by contributing one!


PackedStringArray params = PackedStringArray() 🔗

There is currently no description for this property. Please help us by contributing one!

Note: The returned array is copied and any changes to it will not update the original property value. See PackedStringArray for more details.


String prefix = "" 🔗

There is currently no description for this property. Please help us by contributing one!


Dictionary tags = {} 🔗

There is currently no description for this property. Please help us by contributing one!


Method Descriptions

String decode_base64_string(value: String) static 🔗

Decodes a base64 string retrieved from an IRCv3 payload or tag sequence. Returns the decoded string.


String encode_ctcp(command: String, params: String = "") static 🔗

Wraps a standard payload in CTCP (Client-to-Client Protocol) byte delimiters (\001) for extended IRC interactions such as ACTIONs.


String get_ctcp_command() const 🔗

Extracts the target CTCP command from the message parameter array if the transmission is a valid CTCP protocol request.


String get_ctcp_params() const 🔗

Extracts the payload body arguments supplied with a CTCP command.


String get_hostname() const 🔗

Extracts the hostname portion from the origin client prefix wrapper.


String get_nick() const 🔗

Extracts the nickname portion from the origin client prefix wrapper.


int get_numeric() const 🔗

Returns the numeric reply code from the IRC protocol command, or 0 if the command resolves to a character string.


Dictionary get_processed_tags() const 🔗

Returns the IRCv3 metadata tags embedded in the message parsed cleanly into a Godot Dictionary.


Variant get_tag_value(key: String) const 🔗

Retrieves the explicit variant value of a specific IRCv3 metadata tag natively by its dictionary key.


String get_username() const 🔗

Extracts the username (ident) portion from the origin client prefix wrapper.


bool is_base64(value: String) static 🔗

Returns true if the provided string evaluates cleanly as a base64 encoded sequence array.


bool is_ctcp() const 🔗

Returns true if the active payload is encapsulated correctly inside standard CTCP data byte markers.


bool is_json(value: String) static 🔗

Returns true if the provided string is capable of being processed flawlessly as a standard JSON payload format.


bool is_numeric() const 🔗

Returns true if the underlying command identity is a 3-digit numeric server reply.


IRCMessage parse(raw_message: String) static 🔗

Accepts a raw IRC sequence line via raw_message and converts it directly into a structurally sound IRCMessage object endpoint.


Variant parse_json_string(value: String) static 🔗

Attempts to parse a formatted JSON string retrieved directly from an IRCv3 data tag pipeline block natively.