exirc v1.1.0 ExIRC

Supervises IRC client processes

Usage:

# Start the supervisor (started automatically when ExIRC is run as an application)
ExIRC.start_link

# Start a new IRC client
{:ok, client} = ExIRC.start_client!

# Connect to an IRC server
ExIRC.Client.connect! client, "localhost", 6667

# Logon
ExIRC.Client.logon client, "password", "nick", "user", "name"

# Join a channel (password is optional)
ExIRC.Client.join client, "#channel", "password"

# Send a message
ExIRC.Client.msg client, :privmsg, "#channel", "Hello world!"

# Quit (message is optional)
ExIRC.Client.quit client, "message"

# Stop and close the client connection
ExIRC.Client.stop! client

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor

Callback invoked to start the supervisor and during hot code upgrades

Start the ExIRC supervisor

Start a new ExIRC client under the ExIRC supervisor

Start a new ExIRC client

Link to this section Functions

Link to this function

child_spec(arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function

init(_)
init(any()) :: {:ok, pid()} | {:error, term()}

Callback invoked to start the supervisor and during hot code upgrades.

Developers typically invoke Supervisor.init/2 at the end of their init callback to return the proper supervision flags.

Callback implementation for Supervisor.init/1.

Link to this function

start!()
start!() :: {:ok, pid()} | {:error, term()}

Start the ExIRC supervisor.

Link to this function

start_client!()
start_client!() :: {:ok, pid()} | {:error, term()}

Start a new ExIRC client under the ExIRC supervisor

Start a new ExIRC client