]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
better win32 fix
authorTom Gilbert <tom@linuxbrit.co.uk>
Wed, 7 Sep 2005 19:20:24 +0000 (19:20 +0000)
committerTom Gilbert <tom@linuxbrit.co.uk>
Wed, 7 Sep 2005 19:20:24 +0000 (19:20 +0000)
lib/rbot/ircbot.rb

index 91afd94ea41be0e1360693c05bfe16ae67942ac1..167cc0bcedcc1ab16575ee682dec5bea1729cc3a 100644 (file)
@@ -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