summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2007-12-04 15:01:21 +0000
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2007-12-04 15:01:21 +0000
commit43864ec494a9c2538934690f32eacb8bfb5cc921 (patch)
tree8ea113934028b7054303d080026c79478d51a6ba /lib
parent54782e5b2e1319a81e6c2a9ddb18adf53a1cec41 (diff)
userdata: extend userdata hash with DottedIndex access
Diffstat (limited to 'lib')
-rw-r--r--lib/rbot/core/userdata.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/rbot/core/userdata.rb b/lib/rbot/core/userdata.rb
index f4338592..6d7b7489 100644
--- a/lib/rbot/core/userdata.rb
+++ b/lib/rbot/core/userdata.rb
@@ -69,7 +69,15 @@ class UserDataModule < CoreBotModule
else
bh = @botuser[bu.username] || {}
end
- return ih.merge!(bh)
+ ih.merge!(bh)
+
+ class << ih
+ alias :single_retrieve :[]
+ alias :single_assign :[]=
+ include DottedIndex
+ end
+
+ return ih
end
def get_data(user, key=nil)