# :title: rbot user data management from IRC
#
# Author:: Giuseppe "Oblomov" Bilotta <giuseppe.bilotta@gmail.com>
-# Copyright:: (C) 2006,2007 Giuseppe Bilotta
-# License:: GPL v2
module ::Irc
class User
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?