struct FastIRC::Message

Overview

An IRC message containing command, parameters, prefix and IRCv3 tags.

To parse a line of IRC, see FastIRC.parse or FastIRC.parse_line.

Defined in:

fast_irc/message.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(command : String, params : Nil | Array(String), *, prefix : FastIRC::Prefix | Nil = nil, tags : Nil | Hash(String, Nil | String) = nil) #
m = FastIRC::Message.new("PRIVMSG", ["#WAMM", "testing message"])
m.to_s # => "PRIVMSG #WAMM :testing message\r\n"

[View source]

Instance Method Detail

def command : String #

[View source]
def inspect(io) #

[View source]
def params #

[View source]
def params? : Array(String)? #

[View source]
def prefix : Prefix | Nil #

See Prefix


[View source]
def tags #

IRCv3 tags


[View source]
def tags? : Hash(String, String?)? #

ditto


[View source]
def to_s(io) #

Converts the message back into a raw IRC message, including trailing "\r\n".


[View source]