ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/lib/cf.pm
(Generate patch)

Comparing deliantra/server/lib/cf.pm (file contents):
Revision 1.353 by root, Sun Sep 2 08:43:46 2007 UTC vs.
Revision 1.354 by root, Sun Sep 2 12:26:54 2007 UTC

1413 or return []; 1413 or return [];
1414 1414
1415 my @logins; 1415 my @logins;
1416 1416
1417 for my $login (@$dirs) { 1417 for my $login (@$dirs) {
1418 my $path = path $login;
1419
1420 # a .pst is a dead give-away for a valid player
1421 unless (-e "$path.pst") {
1418 my $fh = aio_open path $login, Fcntl::O_RDONLY, 0 or next; 1422 my $fh = aio_open $path, Fcntl::O_RDONLY, 0 or next;
1419 aio_read $fh, 0, 512, my $buf, 0 or next; 1423 aio_read $fh, 0, 512, my $buf, 0 or next;
1420 $buf !~ /^password -------------$/m or next; # official not-valid tag 1424 $buf !~ /^password -------------$/m or next; # official not-valid tag
1425 }
1421 1426
1422 utf8::decode $login; 1427 utf8::decode $login;
1423 push @logins, $login; 1428 push @logins, $login;
1424 } 1429 }
1425 1430

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines