projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
PC32 will now actually emit a new message message
[spider.git]
/
perl
/
DXMsg.pm
diff --git
a/perl/DXMsg.pm
b/perl/DXMsg.pm
index 0fc327c4c543b6713c92ba456de5ac5cda3b4706..45f3afb9b6d9bd408198879277421f9d94e33ba9 100644
(file)
--- a/
perl/DXMsg.pm
+++ b/
perl/DXMsg.pm
@@
-201,7
+201,7
@@
sub process
$ref->store($ref->{lines});
add_dir($ref);
my $dxchan = DXChannel->get($ref->{to});
$ref->store($ref->{lines});
add_dir($ref);
my $dxchan = DXChannel->get($ref->{to});
- $dxchan->send(
"New mail has arrived for you"
) if $dxchan;
+ $dxchan->send(
$dxchan->msg('msgnew')
) if $dxchan;
Log('msg', "Message $ref->{msgno} from $ref->{from} received from $f[2] for $ref->{to}");
}
}
Log('msg', "Message $ref->{msgno} from $ref->{from} received from $f[2] for $ref->{to}");
}
}
@@
-504,7
+504,7
@@
sub queue_msg
}
if ($clref && !grep { $clref->{dxchan} == $_ } DXCommandmode::get_all) {
$dxchan = $clref->{dxchan};
}
if ($clref && !grep { $clref->{dxchan} == $_ } DXCommandmode::get_all) {
$dxchan = $clref->{dxchan};
- $ref->start_msg($dxchan) if $clref && !get_busy($dxchan->call) && $dxchan->state eq 'normal';
+ $ref->start_msg($dxchan) if $
dxchan && $
clref && !get_busy($dxchan->call) && $dxchan->state eq 'normal';
}
}
} elsif (!$sort) {
}
}
} elsif (!$sort) {
@@
-529,6
+529,21
@@
sub queue_msg
}
}
}
}
+# is there a message for me?
+sub for_me
+{
+ my $call = uc shift;
+ my $ref;
+
+ foreach $ref (@msg) {
+ # is it for me, private and unread?
+ if ($ref->{to} eq $call && $ref->{private}) {
+ return 1 if !$ref->{'read'};
+ }
+ }
+ return 0;
+}
+
# start the message off on its travels with a PC28
sub start_msg
{
# start the message off on its travels with a PC28
sub start_msg
{
@@
-727,9
+742,9
@@
sub do_send_stuff
delete $loc->{lines};
delete $loc->{to};
delete $self->{loc};
delete $loc->{lines};
delete $loc->{to};
delete $self->{loc};
- $self->state('prompt');
$self->func(undef);
DXMsg::queue_msg(0);
$self->func(undef);
DXMsg::queue_msg(0);
+ $self->state('prompt');
} elsif ($line eq "\031" || uc $line eq "/ABORT" || uc $line eq "/QUIT") {
#push @out, $self->msg('sendabort');
push @out, "aborted";
} elsif ($line eq "\031" || uc $line eq "/ABORT" || uc $line eq "/QUIT") {
#push @out, $self->msg('sendabort');
push @out, "aborted";