exirc v0.11.0 ExIrc.Channels

Responsible for managing channel state

Summary

Functions

Determine if a user is present in a tracked channel

Get the current topic for a tracked channel

Get the type of a tracked channel

Get a list of all users in a tracked channel

Get a list of all currently tracked channels

Initialize a new Channels data store

Add a channel to the data store when joining a channel

Remove a channel from the data store when leaving a channel

Update the topic for a tracked channel when it changes

Update the type of a tracked channel when it changes

Get all channel data as a tuple of the channel name and a proplist of metadata

Add a user to a tracked channel when they join

Remove a user from a tracked channel when they leave

Update the nick of a user in a tracked channel when they change their nick

Add multiple users to a tracked channel (used primarily in conjunction with the NAMES command)

Functions

channel_has_user?(channel_tree, channel_name, nick)

Determine if a user is present in a tracked channel

channel_topic(channel_tree, channel_name)

Get the current topic for a tracked channel

channel_type(channel_tree, channel_name)

Get the type of a tracked channel

channel_users(channel_tree, channel_name)

Get a list of all users in a tracked channel

channels(channel_tree)

Get a list of all currently tracked channels

init()

Initialize a new Channels data store

join(channel_tree, channel_name)

Add a channel to the data store when joining a channel

part(channel_tree, channel_name)

Remove a channel from the data store when leaving a channel

set_topic(channel_tree, channel_name, topic)

Update the topic for a tracked channel when it changes

set_type(channel_tree, channel_name, channel_type)

Update the type of a tracked channel when it changes

to_proplist(channel_tree)

Get all channel data as a tuple of the channel name and a proplist of metadata.

Example Result:

[{"#testchannel", [users: ["userA", "userB"], topic: "Just a test channel.", type: :public] }]
user_join(channel_tree, channel_name, nick)

Add a user to a tracked channel when they join

user_part(channel_tree, channel_name, nick)

Remove a user from a tracked channel when they leave

user_quit(channel_tree, nick)
user_rename(channel_tree, nick, new_nick)

Update the nick of a user in a tracked channel when they change their nick

users_join(channel_tree, channel_name, nicks)

Add multiple users to a tracked channel (used primarily in conjunction with the NAMES command)