From: Tom Gilbert Date: Wed, 7 Sep 2005 19:20:24 +0000 (+0000) Subject: better win32 fix X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=8946b90f0efaee6f38a53c5e8db1cb29ba1b398c;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git better win32 fix --- 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