diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2009-08-14 14:49:42 +0200 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2009-08-14 16:40:36 +0200 |
commit | e51cc13bc8cf22227580f09c3e03fc776549a4a9 (patch) | |
tree | 049e0609e950597c44c7eeefae29bb6eb639bbee /lib/rbot/ircbot.rb | |
parent | 3eb8b872a13cad7313e104dfb1eb3a64201b66b4 (diff) |
ircbot: clean up ping timings on connect
Diffstat (limited to 'lib/rbot/ircbot.rb')
-rw-r--r-- | lib/rbot/ircbot.rb | 8 |
1 files 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 |