summaryrefslogtreecommitdiff
path: root/lib/rbot
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rbot')
-rw-r--r--lib/rbot/messagemapper.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/rbot/messagemapper.rb b/lib/rbot/messagemapper.rb
index 3d49e918..df661b5e 100644
--- a/lib/rbot/messagemapper.rb
+++ b/lib/rbot/messagemapper.rb
@@ -149,7 +149,12 @@ module Irc
debug "checking auth for #{auth}"
if m.bot.auth.allow?(auth, m.source, m.replyto)
debug "template match found and auth'd: #{action.inspect} #{options.inspect}"
- @parent.send(action, m, options)
+ if tmpl.options[:thread] || tmpl.options[:threaded]
+ Thread.new { @parent.send(action, m, options) }
+ else
+ @parent.send(action, m, options)
+ end
+
return true
end
debug "auth failed for #{auth}"