--- deliantra/server/ext/login.ext 2007/04/04 02:07:19 1.35 +++ deliantra/server/ext/login.ext 2007/04/06 22:57:53 1.37 @@ -160,8 +160,8 @@ } elsif ($k eq "mapsize") { my ($x, $y) = split /x/, $v; - $ns->mapx ($x = max 9, min cf::MAP_CLIENT_X, $x); - $ns->mapy ($y = max 9, min cf::MAP_CLIENT_Y, $y); + $ns->mapx ($x = max 9, min cf::MAP_CLIENT_X, ($x - 1) | 1); + $ns->mapy ($y = max 9, min cf::MAP_CLIENT_Y, ($y - 1) | 1); $setup{$k} = "${x}x${y}"; @@ -355,6 +355,19 @@ cf::NDI_RED ); next; + } + } else { + # unable to load the playerfile: + # check wether the player dir exists, which means the file is corrupted or + # something very similar. + if (!aio_stat cf::player::playerdir $user) { + $ns->send_drawinfo ( + "Unable to retrieve this player. It might be a locked or broken account. " + . "If this is your account, ask a dungeon master for assistance. " + . "Otherwise choose a different login name.", + cf::NDI_RED + ); + next; } }