Hanabi v0.1.1 Hanabi.IRC.Message View Source

This module defines the message structure widely used in this library. More informations about the structure of an IRC message can be found in the section 2.3.1 of RFC1459.

%Hanabi.IRC.Message{
  command: "",
  middle: nil,
  prefix: nil,
  trailing: nil
}

Link to this section Summary

Functions

Convenience function to build a message structure

Link to this section Functions

Link to this function build(prefix, command, middle, trailing) View Source

Convenience function to build a message structure.

Example

iex> msg = Hanabi.IRC.Message.build("Angel", "PRIVMSG", "Wiz", "Hello are you receiving this message ?")
%Hanabi.IRC.Message{command: "PRIVMSG", middle: "Wiz", prefix: "Angel",
  trailing: "Hello are you receiving this message ?"}
iex> Hanabi.IRC.build msg
":Angel PRIVMSG Wiz :Hello are you receiving this message ?"