From e51cc13bc8cf22227580f09c3e03fc776549a4a9 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Fri, 14 Aug 2009 14:49:42 +0200 Subject: [PATCH] ircbot: clean up ping timings on connect --- lib/rbot/ircbot.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/rbot/ircbot.rb b/lib/rbot/ircbot.rb index 2825f7e6..6c8d6332 100644 --- a/lib/rbot/ircbot.rb +++ b/lib/rbot/ircbot.rb @@ -468,11 +468,6 @@ class Bot exit 2 end - # Time at which the last PING was sent - @last_ping = nil - # Time at which the last line was RECV'd from the server - @last_rec = nil - @startup_time = Time.new begin @@ -906,6 +901,9 @@ class Bot # connect the bot to IRC def connect + # make sure we don't have any spurious ping checks running + # (and initialize the vars if this is the first time we connect) + stop_server_pings begin quit if $interrupted > 0 @socket.connect -- 2.39.5