summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTom Gilbert <tom@linuxbrit.co.uk>2005-09-07 19:20:24 +0000
committerTom Gilbert <tom@linuxbrit.co.uk>2005-09-07 19:20:24 +0000
commit8946b90f0efaee6f38a53c5e8db1cb29ba1b398c (patch)
tree4186ce949d971e53398fc5c1c1a670407b6b46ce /lib
parent255bec85703f504f13056f7deb8ce6767ed7b617 (diff)
better win32 fix
Diffstat (limited to 'lib')
-rw-r--r--lib/rbot/ircbot.rb4
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