--- deliantra/server/ext/login.ext 2008/12/23 18:52:57 1.96 +++ deliantra/server/ext/login.ext 2010/04/11 21:26:36 1.103 @@ -1,4 +1,4 @@ -#! perl # mandatory +#! perl # mandatory depends=highscore # login handling @@ -72,7 +72,6 @@ sub enter_map { my ($pl) = @_; - warn $pl->ob->name, ": enter map 1\n";#d# my $ob = $pl->ob; my ($map, $x, $y) @@ -80,13 +79,10 @@ ? @{delete $ob->{_link_pos}} : ($pl->maplevel, $ob->x, $ob->y); - warn $pl->ob->name, ": enter map 2\n";#d# $ob->enter_link; - warn $pl->ob->name, ": enter map 3\n";#d# my $m = cf::map::find $map; my $time = delete $pl->{unclean_save}; - warn $pl->ob->name, ": enter map 4\n";#d# if ($time && $m) { if ($time < $m->{instantiate_time}) { @@ -129,16 +125,7 @@ } } - warn $pl->ob->name, ": enter map 5\n";#d# - #$ob->goto ($map, $x, $y); - $ob->goto ($map, $x, $y, sub { - warn $pl->ob->name, ": enter map check\n";#d# - $_[0] - }, sub { - warn $pl->ob->name, ": enter map done\n";#d# - }); - warn $pl->ob->name, ": enter map 6\n";#d# - + $ob->goto ($map, $x, $y); } # delete a player directory, be non-blocking AND synchronous... @@ -157,51 +144,6 @@ cf::client->attach (on_addme => sub { my ($ns) = @_; - if (!$ns->facecache) - { - $ns->send_drawinfo (< Configure => Map & Image => Cache Images. -*** jcrossclient: your client is broken, use deliantra or gcfclient. -*** -*** -EOF - if ($ns->version =~ /jcrossclient/) { - # let them, for now - } else { - $ns->flush; - return $ns->destroy; - } - - # $ns->facecache = true; - } - - if ($ns->mapmode < cf::Map1aCmd) { - $ns->send_drawinfo (<flush; - return $ns->destroy; - } - $ns->pl and return $ns->destroy; $ns->async (sub { @@ -291,7 +233,6 @@ # password matches, wonderful my $pl = cf::player::find $user or next; $pl->connect ($ns); - $pl->ob->flag (cf::FLAG_DEBUG, 1);#d# temp enter_map $pl; last; } elsif (can_cleanup $pl, $mtime) { @@ -408,7 +349,7 @@ last if $res =~ /[dD]/; $pl->chargen_race_next; - Coro::Timer::sleep 0.2; + Coro::Timer::sleep 0.05; } # create the playerdir, if necessary, as chargen_race_done did it before @@ -427,7 +368,7 @@ $pl->gender (0); last; } - Coro::Timer::sleep 0.2; + Coro::Timer::sleep 0.05; } $ob->reply (undef, "Welcome to Deliantra!"); @@ -439,6 +380,10 @@ last; } + + if (0 < Coro::AIO::aio_load "$cf::CONFDIR/motd", my $motd) { + $ns->send_msg ("c/motd" => $motd, cf::NDI_CLEAR); + } }); }); @@ -481,7 +426,7 @@ cf::async { $pl->save }; my $killer = cf::arch::get "killer_logout"; $pl->killer ($killer); $killer->destroy; - $ob->check_score; + ext::highscore::check $ob; $ob->send_msg ($cf::SAY_CHANNEL => "In the future, you will wake up here when you die.", cf::NDI_DEF | cf::NDI_REPLY);