summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/exirc/client.ex6
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