Kaguya v0.6.0 Kaguya.Channel

Channel GenServer, with a few utility functions for working with channels. As a GenServer, it can be called in the following ways:

  • {:send, message}, where message is the message to be sent to the channel
  • {:set_user, nick_string}, where the nick string is a nick with the mode prefix(+, @, etc.)
  • {:get_user, nick}, where nick is the nick of the user to be returned. The Kaguya.Channel.User struct is returned
  • {:del_user, nick}, where nick is the nick of the user to be deleted

Link to this section Summary

Functions

Convenience function to remove a nick from a channel

Convenience function to perform a function on a channel’s buffer and get the result

Convenience function to get information of a user in a channel

Convenience function to get a user count from a channel

Convenience function to get all users from a channel

Convnenience function to join the specified channel

Convnenience function to part the specified channel

Convenience function to send a nickstring to a channel

Starts a channel worker with the given name and options

Link to this section Functions

Link to this function del_user(chan, nick)

Convenience function to remove a nick from a channel.

Link to this function get_buffer(chan, fun)

Convenience function to perform a function on a channel’s buffer and get the result.

Link to this function get_user(chan, nick)

Convenience function to get information of a user in a channel.

Link to this function get_user_count(chan)

Convenience function to get a user count from a channel.

Link to this function get_users(chan)

Convenience function to get all users from a channel.

Convnenience function to join the specified channel.

Convnenience function to part the specified channel.

Link to this function set_user(chan, nick)

Convenience function to send a nickstring to a channel.

Link to this function start_link(name, opts \\ [])

Starts a channel worker with the given name and options