diff options
Diffstat (limited to 'lib/rbot/ircbot.rb')
-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 |