summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/rbot/messagemapper.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/rbot/messagemapper.rb b/lib/rbot/messagemapper.rb
index 1162a3a2..c1691aff 100644
--- a/lib/rbot/messagemapper.rb
+++ b/lib/rbot/messagemapper.rb
@@ -535,8 +535,6 @@ class Bot
return nil, "template #{@template} is not configured for private messages" if @options.has_key?(:private) && !@options[:private] && m.private?
return nil, "template #{@template} is not configured for public messages" if @options.has_key?(:public) && !@options[:public] && !m.private?
- options = {}
-
matching = @regexp.match(m.message)
return nil, "#{m.message.inspect} doesn't match #{@template} (#{@regexp})" unless matching
return nil, "#{m.message.inspect} only matches #{@template} (#{@regexp}) partially: #{matching[0].inspect}" unless matching[0] == m.message
@@ -545,6 +543,8 @@ class Bot
debug "#{m.message.inspect} matched #{@regexp} with #{debug_match}"
debug "Associating #{debug_match} with dyn items #{@dyn_items.join(', ')}"
+ options = @defaults.dup
+
@dyn_items.each_with_index { |it, i|
next if i == 0
item = it.name