-# log out text
-if ($self->is_user && -e "$main::data/logout") {
- open(I, "$main::data/logout") or confess;
- my @in = <I>;
- close(I);
- $self->send_now('D', @in);
- sleep(1);
+my $fn = localdata("logout");
+#dbg("fn: $fn " . (-e $fn ? 'exists' : 'missing'));
+
+if ($self->is_user && -e $fn) {
+ $self->send_file($fn);