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}"
- if m.thread || (m.thread.nil? && tmpl.options[:thread] || tmpl.options[:threaded])
+ if !m.in_thread && (tmpl.options[:thread] || tmpl.options[:threaded])
Thread.new do
begin
@parent.send(action, m, options)
# debug "Delimited optionals: #{rx.inspect}"
rx.gsub!(/(?:\\ )+/, "\\s+")
# debug "Corrected spaces: #{rx.inspect}"
- @regexp = Regexp.new("^#{rx}$")
+ # Created message (such as by fake_message) can contain multiple lines
+ @regexp = /\A#{rx}\z/m
end
# Recognize the provided string components, returning a hash of