kaguya v0.1.3 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

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

Convnenience function to join the specified channel

Convenience function to send a nickstring to a channel

Starts a channel worker with the given name and options

Functions

del_user(chan, nick)

Convenience function to remove a nick from a channel.

get_buffer(chan, fun)

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

join(channel)

Convnenience function to join the specified channel.

set_user(chan, nick)

Convenience function to send a nickstring to a channel.

start_link(name, opts \\ [])

Starts a channel worker with the given name and options