struct

FastIRC::Prefix

Inherits Struct / Value / Object

Prefix of the IRC message (nick!user@host).

IRC Prefixes can either consist of a nickname with optional user and host, or a server hostname. To handle both these cases, source is set to either the nick or server name depending on which type of prefix is received. This means source is always present.

Constructors

new(*, source : String, user : Nil | String, host : Nil | String)
Source

Instance methods

host
Source
inspect(io)
Source
server?

Returns true if the source of this prefix an IRC server.

The check used for the is if the source contains a '.' character.

Source
source
Source
to_s(io)

Converts the prefix back into a raw IRC prefix (e.g. nick!user@host). Does not include leading ':'.

Source
user
Source
user?

Returns true if the source of this prefix an IRC server.

The same as !server?.

Source