… | |
… | |
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 | |
… | |
… | |
2534 | |
2539 | |
2535 | if (ref $channel) { |
2540 | if (ref $channel) { |
2536 | # send meta info to client, if not yet sent |
2541 | # send meta info to client, if not yet sent |
2537 | unless (exists $self->{channel}{$channel->{id}}) { |
2542 | unless (exists $self->{channel}{$channel->{id}}) { |
2538 | $self->{channel}{$channel->{id}} = $channel; |
2543 | $self->{channel}{$channel->{id}} = $channel; |
2539 | $self->ext_msg (channel_info => $channel); |
2544 | $self->ext_msg (channel_info => $channel) |
|
|
2545 | if $self->can_msg; |
2540 | } |
2546 | } |
2541 | |
2547 | |
2542 | $channel = $channel->{id}; |
2548 | $channel = $channel->{id}; |
2543 | } |
2549 | } |
2544 | |
2550 | |