]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
ircbot: clean up ping timings on connect
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Fri, 14 Aug 2009 12:49:42 +0000 (14:49 +0200)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Fri, 14 Aug 2009 14:40:36 +0000 (16:40 +0200)
lib/rbot/ircbot.rb

index 2825f7e6092a0b3804e962206b3b9a23eb44304f..6c8d6332b38e16177709f0cd45655741909ee588 100644 (file)
@@ -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