]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
ircbot: fix nil error variable on ServerError
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Tue, 17 Feb 2009 00:01:31 +0000 (01:01 +0100)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Tue, 17 Feb 2009 00:01:31 +0000 (01:01 +0100)
We were making use of an undefined variable e when catching ServerError
in the main loop.

lib/rbot/ircbot.rb

index abf64618a80107c8792c49f802cb70a03e607814..b6843b461845690629449ce53c6e9eebe5443119 100644 (file)
@@ -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")