summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Gilbert <tom@linuxbrit.co.uk>2005-08-27 13:11:15 +0000
committerTom Gilbert <tom@linuxbrit.co.uk>2005-08-27 13:11:15 +0000
commitc6425686430c97824de999151836854db7893eac (patch)
tree102caf9d93965560f5f21e1e81e812bcb44c084d
parent0b108ce18fa56b85be510b6bc854f5a2b6b6e213 (diff)
fix for ticket #17
-rw-r--r--lib/rbot/ircbot.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/rbot/ircbot.rb b/lib/rbot/ircbot.rb
index 12765da2..3881771d 100644
--- a/lib/rbot/ircbot.rb
+++ b/lib/rbot/ircbot.rb
@@ -311,9 +311,13 @@ class IrcBot
# connect the bot to IRC
def connect
- trap("SIGTERM") { quit }
- trap("SIGHUP") { quit }
- trap("SIGINT") { quit }
+ begin
+ trap("SIGTERM") { quit }
+ trap("SIGHUP") { quit }
+ trap("SIGINT") { quit }
+ rescue
+ debug "failed to trap signals, probably running on windows?"
+ end
begin
@socket.connect
rescue => e