X-Git-Url: http://www.dxcluster.org/gitweb/gitweb.cgi?p=spider.git;a=blobdiff_plain;f=perl%2FDXMsg.pm;h=9316c374444ca0eff24087994b181f17c1fb7978;hp=e9097d9ca4f8fa159b2ecce5092e08689a8d8a3f;hb=6a0068ec3df1dca0c6ae2714af3c0a4a62998dcf;hpb=3f145290a93b39bf15b50269dd8be585d7b4bc9c diff --git a/perl/DXMsg.pm b/perl/DXMsg.pm index e9097d9c..9316c374 100644 --- a/perl/DXMsg.pm +++ b/perl/DXMsg.pm @@ -167,6 +167,8 @@ sub process push @{$ref->{gotit}}, $f[2]; # mark this up as being received $ref->store($ref->{lines}); add_dir($ref); + my $dxchan = DXChannel->get($ref->{to}); + $dxchan->send("New mail has arrived for you") if $dxchan; } $ref->stop_msg($self); queue_msg(); @@ -633,6 +635,8 @@ sub do_send_stuff $ref->add_dir(); #push @out, $self->msg('sendsent', $to); push @out, "msgno $ref->{msgno} sent to $to"; + my $dxchan = DXChannel->get(uc $to); + $dxchan->send("New mail has arrived for you") if $dxchan; } } delete $loc->{lines}; @@ -658,6 +662,15 @@ sub do_send_stuff return (1, @out); } +# return the standard directory line for this ref +sub dir +{ + my $ref = shift; + return sprintf "%6d%s%s%5d %8.8s %8.8s %-6.6s %5.5s %-30.30s", + $ref->msgno, $ref->read ? '-' : ' ', $ref->private ? 'p' : ' ', $ref->size, + $ref->to, $ref->from, cldate($ref->t), ztime($ref->t), $ref->subject; +} + no strict; sub AUTOLOAD {