--- deliantra/server/ext/login.ext 2007/09/02 12:37:10 1.70 +++ deliantra/server/ext/login.ext 2007/09/19 21:56:30 1.72 @@ -118,8 +118,12 @@ sub nuke_playerdir { my ($user) = @_; - aio_rename "$PLAYERDIR/$user", "$PLAYERDIR/~$Coro::current~deleting~"; - system "rm -rf \Q$PLAYERDIR/~$Coro::current~deleting~\E &"; + my $temp = "$PLAYERDIR/~$Coro::current~deleting~"; + + cf::fork_call { + rename "$PLAYERDIR/$user", $temp; + system "rm", "-rf", $temp; + }; } cf::client->attach (on_addme => sub { @@ -173,6 +177,8 @@ $ns->pl and return $ns->destroy; $ns->async (sub { + $Coro::current->{desc} = "addme init"; + my ($user, $pass); $ns->send_packet ("addme_success"); @@ -210,6 +216,8 @@ check_playing $ns, $user and next; + $Coro::current->{desc} = "addme($user) pass"; + $ns->send_drawinfo ( "Welcome $user, please enter your password now. " . "New users should now choose a password. " @@ -242,6 +250,8 @@ check_playing $ns, $user and next; + $Coro::current->{desc} = "addme($user) check"; + # try to read the user file and check the password if (my $pl = cf::player::find $user) { aio_stat $pl->path and next; @@ -304,6 +314,7 @@ } # the rest of this function is character creation + $Coro::current->{desc} = "addme($user) chargen"; # just to make sure nothing is left over nuke_playerdir $user; @@ -481,6 +492,8 @@ our $SAVE_TIMEOUT = $cf::CFG{player_save_interval} || 20; # save players every n seconds our $SCHEDULER = cf::async_ext { + $Coro::current->{desc} = "player scheduler"; + my $schedule_interval = Coro::Event->timer (after => 1); while () { $schedule_interval->interval ($SCHEDULE_INTERVAL);