ExampleHandler
This is an example event handler that you can attach to the client using add_handler or add_handler_async. To remove, call remove_handler or remove_handler_async with the pid of the handler process.
Summary
Functions
Handle messages from the client
Examples:
def handle_info({:connected, server, port}, _state) do IO.puts "Connected to #{server}:#{port}" end def handle_info(:logged_in, _state) do IO.puts "Logged in!" end def handle_info(%IrcMessage{:nick => from, :cmd => "PRIVMSG", :args => ["mynick", msg]}, _state) do IO.puts "Received a private message from #{from}: #{msg}" end def handle_info(%IrcMessage{:nick => from, :cmd => "PRIVMSG", :args => [to, msg]}, _state) do IO.puts "Received a message in #{to} from #{from}: #{msg}" end