diff options
author | Kevin Montuori <montuori@gmail.com> | 2014-07-15 04:17:22 -0400 |
---|---|---|
committer | Kevin Montuori <montuori@gmail.com> | 2014-07-15 04:17:22 -0400 |
commit | 32d80f8722afdb0adb04d9d8d2e0db161d7b0ae0 (patch) | |
tree | bf6b12f2c7a0de503d1a8eb68d72be55bb5ba5b7 | |
parent | Merge pull request #6 from kevinmontuori/from_char_data (diff) |
made SENT PONG{1,2} messages conditional upon state.debug being set
-rw-r--r-- | lib/exirc/client.ex | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/exirc/client.ex b/lib/exirc/client.ex index 79390f7..0cd92fd 100644 --- a/lib/exirc/client.ex +++ b/lib/exirc/client.ex @@ -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 |