From 8946b90f0efaee6f38a53c5e8db1cb29ba1b398c Mon Sep 17 00:00:00 2001 From: Tom Gilbert Date: Wed, 7 Sep 2005 19:20:24 +0000 Subject: better win32 fix --- lib/rbot/ircbot.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') 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 -- cgit v1.2.3