diff options
-rw-r--r-- | lib/rbot/core/userdata.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/rbot/core/userdata.rb b/lib/rbot/core/userdata.rb index 72cada78..f7c74a4a 100644 --- a/lib/rbot/core/userdata.rb +++ b/lib/rbot/core/userdata.rb @@ -90,10 +90,14 @@ class UserDataModule < CoreBotModule return h[key] end - def set_data_hash(user, h) + def set_data_hash(user, hh) iu = user.to_irc_user bu = iu.botuser + # we .dup the hash to remove singleton methods + # and make it dump-able + h = hh.dup + @ircuser[iu.nick] = h return h if bu.default? |