From e073f9bb44e99a0d71aa1e3dd6dca9b7993057e3 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Tue, 17 Feb 2009 01:01:31 +0100 Subject: ircbot: fix nil error variable on ServerError We were making use of an undefined variable e when catching ServerError in the main loop. --- lib/rbot/ircbot.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/rbot/ircbot.rb b/lib/rbot/ircbot.rb index abf64618..b6843b46 100644 --- a/lib/rbot/ircbot.rb +++ b/lib/rbot/ircbot.rb @@ -972,7 +972,7 @@ class Bot rescue Errno::ETIMEDOUT, Errno::ECONNABORTED, TimeoutError, SocketError => e error "network exception: #{e.pretty_inspect}" quit_msg = e.to_s - rescue ServerError + rescue ServerError => e # received an ERROR from the server quit_msg = "server ERROR: " + e.message too_fast = e.message.index("reconnect too fast") -- cgit v1.2.3