summaryrefslogtreecommitdiff
path: root/lib/rbot
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rbot')
-rw-r--r--lib/rbot/messagemapper.rb14
1 files changed, 5 insertions, 9 deletions
diff --git a/lib/rbot/messagemapper.rb b/lib/rbot/messagemapper.rb
index bb193cbf..fd8c7e7d 100644
--- a/lib/rbot/messagemapper.rb
+++ b/lib/rbot/messagemapper.rb
@@ -329,19 +329,15 @@ module Irc
case default
when String
value.instance_variable_set(:@string_value, default)
- def value.to_s
- @string_value
- end
else
- def value.to_s
- value.join(' ')
- end
+ value.instance_variable_set(:@string_value, value.join(' '))
end
else
value = matching[i].split
- def value.to_s
- matching[i]
- end
+ value.instance_variable_set(:@string_value, matching[i])
+ end
+ def value.to_s
+ @string_value
end
options[item] = value
debug "set #{item} to #{value.inspect}"