tmi.ex v0.3.0 TMI.Client View Source

Link to this section Summary

Functions

Send an action message, i.e. (/me slaps someone with a big trout)

Add a new event handler process.

Add a new event handler process, asynchronously.

Determine if a user is present in the provided chat.

Map chat names to channel names with the prepended "#".

Get a list of users in the provided channel.

Send a raw IRC command to TMI IRC server.

Connect to a server with the provided server and port.

Connect to a server with the provided server and port via SSL.

Determine if the provided client process has an open connection to a server.

Determine if the provided client is logged on to a server.

Join a chat.

Logon to a server.

Send a chat message.

Leave a chat.

Quit the server.

Remove an event handler process.

Remove an event handler process, asynchronously

Stop the client process.

Send a whisper message to a user.

Link to this section Functions

Link to this function

action(conn, chat, message)

View Source

Send an action message, i.e. (/me slaps someone with a big trout)

Link to this function

add_handler(conn, handler)

View Source

Add a new event handler process.

Link to this function

add_handler_async(conn, handler)

View Source

Add a new event handler process, asynchronously.

Link to this function

chat_has_user?(conn, chat, user)

View Source

Specs

chat_has_user?(TMI.Conn.t(), chat :: String.t(), user :: String.t()) ::
  true | false | {:error, atom()}

Determine if a user is present in the provided chat.

Link to this function

chat_to_channel(channel)

View Source

Map chat names to channel names with the prepended "#".

Examples

iex> TMI.Client.chat_to_channel("#foo")
"#foo"

iex> TMI.Client.chat_to_channel("bar")
"#bar"

Specs

chat_users(TMI.Conn.t(), chat :: String.t()) ::
  [String.t()] | [] | {:error, atom()}

Get a list of users in the provided channel.

Send a raw IRC command to TMI IRC server.

Connect to a server with the provided server and port.

Connect to a server with the provided server and port via SSL.

Specs

is_connected?(TMI.Conn.t()) :: true | false

Determine if the provided client process has an open connection to a server.

Specs

is_logged_on?(TMI.Conn.t()) :: true | false

Determine if the provided client is logged on to a server.

Join a chat.

Logon to a server.

Link to this function

message(conn, chat, message)

View Source

Send a chat message.

Leave a chat.

Quit the server.

Link to this function

remove_handler(conn, handler)

View Source

Remove an event handler process.

Link to this function

remove_handler_async(conn, handler)

View Source

Remove an event handler process, asynchronously

See ExIRC.start_link!/0.

Stop the client process.

Link to this function

whisper(conn, user, message)

View Source

Send a whisper message to a user.