From 32d80f8722afdb0adb04d9d8d2e0db161d7b0ae0 Mon Sep 17 00:00:00 2001 From: Kevin Montuori Date: Tue, 15 Jul 2014 04:17:22 -0400 Subject: [PATCH] made SENT PONG{1,2} messages conditional upon state.debug being set --- lib/exirc/client.ex | 6 ++++-- 1 file 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