summaryrefslogtreecommitdiff
path: root/lib/rbot
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2009-11-05 12:45:56 +0100
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2009-11-05 12:45:56 +0100
commitb19163aa6cc90a1f5a1d8c1d1d4ae4134c2171a0 (patch)
tree069296b3ebc74cc5e5248dbf9cb6e5f783b58e62 /lib/rbot
parent8df647d608cef7b1416fe9e07d69c889684ed717 (diff)
remote: bring up to date with changes in MessageMapper
Diffstat (limited to 'lib/rbot')
-rw-r--r--lib/rbot/core/remote.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/rbot/core/remote.rb b/lib/rbot/core/remote.rb
index 52de3f3f..bd037cca 100644
--- a/lib/rbot/core/remote.rb
+++ b/lib/rbot/core/remote.rb
@@ -160,13 +160,13 @@ class Bot
# Skip this element if it was unmapped
next unless tmpl
botmodule = @parent.plugins[tmpl.botmodule]
- options, failure = tmpl.recognize(m)
- if options.nil?
- failures << [tmpl, failure]
+ options = tmpl.recognize(m)
+ if options.kind_of? Failure
+ failures << options
else
action = tmpl.options[:action]
unless botmodule.respond_to?(action)
- failures << [tmpl, "#{botmodule} does not respond to action #{action}"]
+ failures << NoActionFailure.new(tmpl, m)
next
end
auth = tmpl.options[:full_auth_path]
@@ -182,8 +182,8 @@ class Bot
return false
end
end
- failures.each {|f, r|
- debug "#{f.inspect} => #{r}"
+ failures.each {|r|
+ debug "#{r.template.inspect} => #{r}"
}
debug "no handler found"
return false