]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - lib/rbot/messagemapper.rb
rfc2812.rb: handle mode changes like -o+b
[user/henk/code/ruby/rbot.git] / lib / rbot / messagemapper.rb
index 62543f327bbadc60b57acdcc34bc7614fcd43ddd..87bdd01f6e7150b2630848ce98cc6bca0eec111a 100644 (file)
@@ -193,7 +193,14 @@ class Bot
           if m.bot.auth.allow?(auth, m.source, m.replyto)
             debug "template match found and auth'd: #{action.inspect} #{options.inspect}"
             if tmpl.options[:thread] || tmpl.options[:threaded]
-              Thread.new { @parent.send(action, m, options) }
+              Thread.new do
+                begin
+                  @parent.send(action, m, options)
+                rescue Exception => e
+                  error "In threaded action: #{e.message}"
+                  debug e.backtrace.join("\n")
+                end
+              end
             else
               @parent.send(action, m, options)
             end