end
module Irc
+class Bot
# MessageMapper is a class designed to reduce the amount of regexps and
# string parsing plugins and bot modules need to do, in order to process
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
end
pre = nil if extra.sub!(/^!/, "")
post = nil if extra.sub!(/!$/, "")
+ extra = nil if extra.empty?
else
extra = nil
end
end
end
end
+end