diff options
author | Dmitry Kim <dmitry point kim at gmail point com> | 2007-09-11 17:37:26 +0000 |
---|---|---|
committer | Dmitry Kim <dmitry point kim at gmail point com> | 2007-09-11 17:37:26 +0000 |
commit | a6738b25dbe4f8eee9223a60622abac5ac6108e5 (patch) | |
tree | 9e0129631b5455c4e9d0f41a4832794f9c595718 /lib | |
parent | 38db12d7482f62275ecf9e67819ae148b3514f9a (diff) |
+ (plugins) :thread option for plugin.map makes an action automatically threaded
* (plugins/*) converted to the new threading model
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rbot/messagemapper.rb | 7 |
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}" |