From 3679815abe399b1357b5ad9196743e8f447f80a1 Mon Sep 17 00:00:00 2001 From: Tom Gilbert Date: Sun, 28 Aug 2005 17:19:59 +0000 Subject: fix ping/pong/reconnect issue reported in #20 --- lib/rbot/ircbot.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/rbot') diff --git a/lib/rbot/ircbot.rb b/lib/rbot/ircbot.rb index 1374929d..d16b0583 100644 --- a/lib/rbot/ircbot.rb +++ b/lib/rbot/ircbot.rb @@ -355,6 +355,7 @@ class IrcBot end puts "disconnected" + @last_ping = nil @channels.clear @socket.clearq @@ -568,6 +569,7 @@ class IrcBot # we'll ping the server every 30 seconds or so, and expect a response # before the next one come around.. def start_server_pings + @last_ping = nil # stop existing timers if running unless @ping_timer.nil? @timer.remove @ping_timer @@ -593,6 +595,7 @@ class IrcBot rescue debug "couldn't shutdown connection (already shutdown?)" end + @last_ping = nil end end } -- cgit v1.2.3