summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGhouli <huhtala.teemu@gmail.com>2017-11-10 16:59:08 +0200
committerGhouli <huhtala.teemu@gmail.com>2017-11-10 16:59:08 +0200
commitd523854e9d21644bc60463220f96666e95d356d8 (patch)
tree37392746cb52085dc72b72db14820f42c60a0e36
parentMerge pull request #70 from w1gz/master (diff)
Fixed handling of KICK messages
-rw-r--r--lib/exirc/client.ex8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/exirc/client.ex b/lib/exirc/client.ex
index 9d6905b..c86f58d 100644
--- a/lib/exirc/client.ex
+++ b/lib/exirc/client.ex
@@ -692,17 +692,17 @@ defmodule ExIrc.Client do
{:noreply, state}
end
# Called when we are kicked from a channel
- def handle_data(%IrcMessage{cmd: "KICK", args: [channel, nick], nick: by, host: host, user: user} = _msg, %ClientState{nick: nick} = state) do
+ def handle_data(%IrcMessage{cmd: "KICK", args: [channel, nick, reason], nick: by, host: host, user: user} = _msg, %ClientState{nick: nick} = state) do
sender = %SenderInfo{nick: by, host: host, user: user}
if state.debug?, do: debug "WE WERE KICKED FROM #{channel} BY #{by}"
- send_event {:kicked, sender, channel}, state
+ send_event {:kicked, sender, channel, reason}, state
{:noreply, state}
end
# Called when someone else was kicked from a channel
- def handle_data(%IrcMessage{cmd: "KICK", args: [channel, nick], nick: by, host: host, user: user} = _msg, state) do
+ def handle_data(%IrcMessage{cmd: "KICK", args: [channel, nick, reason], nick: by, host: host, user: user} = _msg, state) do
sender = %SenderInfo{nick: by, host: host, user: user}
if state.debug?, do: debug "#{nick} WAS KICKED FROM #{channel} BY #{by}"
- send_event {:kicked, nick, sender, channel}, state
+ send_event {:kicked, nick, sender, channel, reason}, state
{:noreply, state}
end
# Called when someone sends us a message