--- deliantra/server/ext/login.ext 2007/07/14 19:27:59 1.64 +++ deliantra/server/ext/login.ext 2007/09/02 12:37:10 1.70 @@ -88,6 +88,7 @@ # kill them. # reminds me of the famous badness 10000 syndrome... $ob->stats->hp (-10000); #] if they survive this they deserved to live + $pl->killer ("a cave-in"); } else { $ob->message ( "You didn't use a bed to reality to leave this realm, leaving your body in great danger. " @@ -117,10 +118,8 @@ sub nuke_playerdir { my ($user) = @_; - aio_stat "$PLAYERDIR/$user"; - system "cd \Q$PLAYERDIR\E " - . "&& mv \Q$user\E ~\Q$Coro::current\E~deleting~ 2>/dev/null " - . "&& (rm -rf ~\Q$Coro::current\E~deleting~ &)"; + aio_rename "$PLAYERDIR/$user", "$PLAYERDIR/~$Coro::current~deleting~"; + system "rm -rf \Q$PLAYERDIR/~$Coro::current~deleting~\E &"; } cf::client->attach (on_addme => sub { @@ -143,7 +142,7 @@ *** cfclient: use the -cache commandline option. *** cfclient: map will not redraw automatically (bug). *** gcfclient: use -cache commandline option, or enable -*** gcfclient: Client=>Configure=>Map & Image=>Cache Images. +*** gcfclient: Client => Configure => Map & Image => Cache Images. *** jcrossclient: your client is broken, use CFPlus or gcfclient. *** *** @@ -358,10 +357,10 @@ $ob->add_statbonus; while () { - $ns->send_msg (-1, "chargen-race-title", ucfirst $pl->title); + $ns->send_msg ("chargen-race-title", ucfirst $pl->title, -1); my $msg = $ob->msg; $msg =~ s/(?<=\S)\n(?=\S)/ /g; - $ns->send_msg (cf::NDI_BLUE, "chargen-race-description", $msg); + $ns->send_msg ("chargen-race-description", $msg, cf::NDI_BLUE); my $res = query $ns, cf::CS_QUERY_SINGLECHAR, "Now choose a character.\nPress any key to change outlook.\nPress `d' when you're pleased.\n"; @@ -478,12 +477,13 @@ ############################################################################# -our $SCHEDULE_INTERVAL = 10; # time the player scheduler sleeps between runs -our $SAVE_TIMEOUT = 20; # save players every n seconds +our $SCHEDULE_INTERVAL = $cf::CFG{player_schedule_interval} || 10; # time the player scheduler sleeps between runs +our $SAVE_TIMEOUT = $cf::CFG{player_save_interval} || 20; # save players every n seconds our $SCHEDULER = cf::async_ext { - my $schedule_interval = Coro::Event->timer (after => 1, interval => $SCHEDULE_INTERVAL); + my $schedule_interval = Coro::Event->timer (after => 1); while () { + $schedule_interval->interval ($SCHEDULE_INTERVAL); $schedule_interval->next; # this weird form of iteration over values is used because @@ -498,7 +498,6 @@ eval { if ($pl->{last_save} + $SAVE_TIMEOUT <= $cf::RUNTIME) { - cf::wait_for_tick_begin; $pl->save; unless ($pl->active || $pl->ns) {