diff options
author | Anne-Gwenn Kettunen <uniaika@crypto-keupone.eu> | 2016-03-30 17:45:50 +0200 |
---|---|---|
committer | Anne-Gwenn Kettunen <uniaika@crypto-keupone.eu> | 2016-03-30 18:01:59 +0200 |
commit | ecf2588d7f2d4786f726cbf24ba2ed5c9ef8a874 (patch) | |
tree | 9c8ac33e25cbca86b5c7ef0134290058b4abff7d /lib | |
parent | forgot a comma (diff) |
changed the map style
Diffstat (limited to 'lib')
-rw-r--r-- | lib/exirc/client.ex | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/exirc/client.ex b/lib/exirc/client.ex index e1a4b6b..fe9168d 100644 --- a/lib/exirc/client.ex +++ b/lib/exirc/client.ex @@ -550,12 +550,13 @@ defmodule ExIrc.Client do {:noreply, new_state} end # Called when another user joins a channel the client is in - def handle_data(%IrcMessage{nick: user_nick, cmd: "JOIN"} = msg, state) do + def handle_data(%IrcMessage{nick: user_nick, cmd: "JOIN", host: host, user: user} = msg, state) do + sender = %SenderInfo{nick: user_nick, host: host, user: user} channel = msg.args |> List.first |> String.strip if state.debug?, do: debug "ANOTHER USER JOINED A CHANNEL: #{channel} - #{user_nick}" channels = Channels.user_join(state.channels, channel, user_nick) new_state = %{state | channels: channels} - send_event {:joined, channel, user_nick}, new_state + send_event {:joined, channel, sender}, new_state {:noreply, new_state} end # Called on joining a channel, to tell us the channel topic |