summaryrefslogtreecommitdiff
path: root/lib/rbot
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2006-08-25 23:31:47 +0000
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2006-08-25 23:31:47 +0000
commitc44d4f37b8952c69bedd7bee1fcda448424ee41b (patch)
treee82ed3d37a5b5e47b8aa92af88b289bf20311b8e /lib/rbot
parentdb8b6059fb10ea524725ccb4ffb7258143a89c52 (diff)
Fix stupid bug in the new message mapping
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}"