summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2009-02-17 01:01:31 +0100
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2009-02-17 01:01:31 +0100
commite073f9bb44e99a0d71aa1e3dd6dca9b7993057e3 (patch)
tree6b48560748e4c50779f89f3c6a7e01d883c82bc4
parentd19ed741f83e7b17f30152b0f82ff69a52755544 (diff)
ircbot: fix nil error variable on ServerError
We were making use of an undefined variable e when catching ServerError in the main loop.
-rw-r--r--lib/rbot/ircbot.rb2
1 files changed, 1 insertions, 1 deletions
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")