Ircxd.Client.Info (ircxd v1.1.0)

Copy Markdown View Source

Secret-free snapshot of protocol state cached by an Ircxd.Client process.

Reading a snapshot never sends IRC traffic. Adapter callbacks receive the same snapshot in their context so they do not need to call the client GenServer from inside its own process.

Summary

Functions

Compares two identifiers with the snapshot's IRC casemapping.

Returns true if nick identifies the client in the snapshot.

Types

status()

@type status() :: :disconnected | :connected | :registered

t()

@type t() :: %Ircxd.Client.Info{
  active_caps: MapSet.t(String.t()),
  available_caps: %{optional(String.t()) => String.t() | true},
  casemapping: Ircxd.Casemapping.mapping(),
  connected?: boolean(),
  current_nick: String.t() | nil,
  desired_nick: String.t(),
  host: String.t(),
  isupport: map(),
  port: :inet.port_number(),
  registered?: boolean(),
  status: status(),
  tls?: boolean(),
  transport: :gen_tcp | :ssl | nil
}

Functions

same_identifier?(info, left, right)

@spec same_identifier?(t(), String.t(), String.t()) :: boolean()

Compares two identifiers with the snapshot's IRC casemapping.

self_nick?(info, nick)

@spec self_nick?(t(), String.t()) :: boolean()

Returns true if nick identifies the client in the snapshot.