Skip to content

Commit

Permalink
Merge pull request bitwalker#8 from kevinmontuori/conditional-debug
Browse files Browse the repository at this point in the history
made SENT PONG{1,2}  messages conditional upon state.debug being set
  • Loading branch information
bitwalker committed Jul 15, 2014
2 parents 6dfe85a + 32d80f8 commit d12b6d8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/exirc/client.ex
Original file line number Diff line number Diff line change
Expand Up @@ -564,9 +564,11 @@ defmodule ExIrc.Client do
if state.debug?, do: debug "RECEIVED A PING!"
case msg do
%IrcMessage{:args => [from]} ->
debug("SENT PONG2"); send!(state.socket, pong2!(state.nick, from))
if state.debug?, do: debug("SENT PONG2")
send!(state.socket, pong2!(state.nick, from))
_ ->
debug("SENT PONG1"); send!(state.socket, pong1!(state.nick))
if state.debug?, do: debug("SENT PONG1")
send!(state.socket, pong1!(state.nick))
end
{:noreply, state};
end
Expand Down

0 comments on commit d12b6d8

Please sign in to comment.