From: Giuseppe Bilotta Date: Fri, 14 Aug 2009 12:49:42 +0000 (+0200) Subject: ircbot: clean up ping timings on connect X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=e51cc13bc8cf22227580f09c3e03fc776549a4a9;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git ircbot: clean up ping timings on connect --- 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