--- deliantra/Deliantra-Client/DC.pm 2012/01/18 13:42:19 1.215 +++ deliantra/Deliantra-Client/DC.pm 2012/11/17 10:40:08 1.216 @@ -44,6 +44,7 @@ use Coro::AIO (); use AnyEvent::AIO (); +use Deliantra::Util (); use Deliantra::Protocol::Constants (); =item shorten $string[, $maxlength] @@ -214,7 +215,7 @@ if (-e "$Deliantra::VARDIR/client.cf") { DC::read_cfg "$Deliantra::VARDIR/client.cf"; } else { - $::CFG = {}; + $::CFG = { cfg_schema => 1, db_schema => 1 }; } } @@ -265,12 +266,18 @@ uitheme => "wood", map_shift_x => -24, # arbitrary map_shift_y => +24, # arbitrary - #db_schema => 0, ); while (my ($k, $v) = each %DEF_CFG) { $::CFG->{$k} = $v unless exists $::CFG->{$k}; } + + if ($::CFG->{cfg_schema} < 1) { + for my $profile (values %{ $::CFG->{profile} }) { + $profile->{password} = unpack "H*", Deliantra::Util::hash_pw $profile->{password}; + } + $::CFG->{cfg_schema} = 1; + } } sub http_proxy {