--- deliantra/server/ext/login.ext 2012/11/15 06:00:16 1.120 +++ deliantra/server/ext/login.ext 2012/11/15 07:08:15 1.122 @@ -61,11 +61,6 @@ $m->linkable or return 1; -# return 0;#d# -# warn join ":", $m->at ($x, $y);#d# -# warn "FOO$m { ".scalar ($m->at ($x, $y))." }\n"; -# return 0; - scalar grep $_->type == cf::SAVEBED, $m->at ($x, $y) } @@ -337,7 +332,6 @@ if ($cf::CFG{ext_login_nocheck} or compare_password $pass, $token) { # player exists and passwords match - we can proceed - $pl->password (encode_password $pass); # make sure we store the new encoding #d# # password matches, wonderful my $pl = cf::player::find $user or next; $pl->connect ($ns); @@ -411,6 +405,26 @@ }); }); +cf::client->attach ( + on_version => sub { + my ($ns, $arg) = @_; + + $ns->ext_msg (nonces => map { join "", map { chr rand 256 } 0..63 } 1..2); + }, +); + +#cf::register_async_exticmd create_login => sub { +# my ($ns, $reply, $user, $pass) = @_; +# +# $ns->pl and return $ns->destroy; +#}; + +cf::register_async_exticmd login => sub { + my ($ns, $reply, $user, $hash) = @_; + + $ns->pl and return $ns->destroy; +}; + cf::register_command password => sub { my ($pl, $arg) = @_;