Blur v0.2.1-beta1 Blur.IRC.Message View Source

Handles incoming messages on the IRC connection.

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor.

Handle messages from IRC connection.

Parse out message from tagged message.

Start message handler.

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

Specs

handle_info(
  {:received, message :: charlist(),
   %ExIRC.SenderInfo{host: term(), nick: term(), user: term()}},
  state :: pid()
) :: {:noreply, pid()}
handle_info(
  {:received, message :: charlist(),
   %ExIRC.SenderInfo{host: term(), nick: term(), user: term()},
   channel :: charlist()},
  pid()
) :: {:noreply, pid()}
handle_info(
  {:mentioned, message :: charlist(),
   sender :: %ExIRC.SenderInfo{host: term(), nick: term(), user: term()},
   channel :: charlist()},
  pid()
) :: {:noreply, pid()}
handle_info(
  {:unrecognized, code :: charlist(),
   %ExIRC.Message{
     args: term(),
     cmd: term(),
     ctcp: term(),
     host: term(),
     nick: term(),
     server: term(),
     user: term()
   }},
  pid()
) :: {:noreply, pid()}
handle_info(
  {:unrecognized, code :: charlist(),
   %ExIRC.Message{
     args: term(),
     cmd: term(),
     ctcp: term(),
     host: term(),
     nick: term(),
     server: term(),
     user: term()
   }},
  pid()
) :: {:noreply, pid()}
handle_info(
  {:unrecognized, code :: charlist(),
   msg :: %ExIRC.Message{
     args: term(),
     cmd: term(),
     ctcp: term(),
     host: term(),
     nick: term(),
     server: term(),
     user: term()
   }},
  pid()
) :: {:noreply, pid()}

Handle messages from IRC connection.

Specs

parse(%ExIRC.Message{
  args: term(),
  cmd: term(),
  ctcp: term(),
  host: term(),
  nick: term(),
  server: term(),
  user: term()
}) :: %ExIRC.Message{
  args: term(),
  cmd: term(),
  ctcp: term(),
  host: term(),
  nick: term(),
  server: term(),
  user: term()
}

Parse out message from tagged message.

Link to this function

parse_message(channel, user, msg)

View Source

Specs

parse_message(channel :: binary(), user :: charlist(), msg :: charlist()) ::
  nil | :ok

Specs

start_link(client :: pid()) :: GenServer.on_start()

Start message handler.