diff options
author | Tom Gilbert <tom@linuxbrit.co.uk> | 2005-09-07 19:20:24 +0000 |
---|---|---|
committer | Tom Gilbert <tom@linuxbrit.co.uk> | 2005-09-07 19:20:24 +0000 |
commit | 8946b90f0efaee6f38a53c5e8db1cb29ba1b398c (patch) | |
tree | 4186ce949d971e53398fc5c1c1a670407b6b46ce | |
parent | 255bec85703f504f13056f7deb8ce6767ed7b617 (diff) |
better win32 fix
-rw-r--r-- | lib/rbot/ircbot.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/rbot/ircbot.rb b/lib/rbot/ircbot.rb index 91afd94e..167cc0bc 100644 --- a/lib/rbot/ircbot.rb +++ b/lib/rbot/ircbot.rb @@ -308,9 +308,9 @@ class IrcBot # connect the bot to IRC def connect begin + trap("SIGINT") { quit } trap("SIGTERM") { quit } trap("SIGHUP") { quit } - trap("SIGINT") { quit } rescue debug "failed to trap signals, probably running on windows?" end @@ -454,9 +454,9 @@ class IrcBot # disconnect from the server and cleanup all plugins and modules def shutdown(message = nil) begin + trap("SIGINT", "DEFAULT") trap("SIGTERM", "DEFAULT") trap("SIGHUP", "DEFAULT") - trap("SIGINT", "DEFAULT") rescue debug "failed to trap signals, probably running on windows?" end |