display buddies online at logon.
+26Mar06=======================================================================
+1. Arrange for any online buddies to be displayed when a user logs on.
+2. Try to reduce the amount of POSIX stuff that is loaded to just that which
+is required.
23Mar06=======================================================================
1. Added cty-1603 data.
2. On the advice of Jim AD1C I have changed around some things in wpxloc.raw
package DXBearing;
-use POSIX;
use DXUtil;
+use POSIX qw(:math_h);
use strict;
use vars qw($pi);
#
sub tell_buddies
{
- my ($self, $m, $call) = @_;
+ my ($self, $m, $call, $node) = @_;
$call ||= $self->{call};
+ $call =~ s/-\d+$//;
+ my $s = $node ? "$node: $call" : $call;
# send info to all logged in thingies
my @dxchan = get_all_users();
foreach $dxchan (@dxchan) {
next if $dxchan == $self;
next if $dxchan->{call} eq $main::mycall;
- $dxchan->send($dxchan->msg($m, $call)) if grep $_ eq $call, @{$dxchan->{user}->{buddies}} ;
+ $dxchan->send($dxchan->msg($m, $s)) if grep $_ eq $call, @{$dxchan->{user}->{buddies}} ;
}
}
package DXCommandmode;
-use POSIX;
+#use POSIX;
@ISA = qw(DXChannel);
my $info = Route::cluster();
$self->send("Cluster:$info");
- # send prompts and things
+ # send prompts for qth, name and things
$self->send($self->msg('namee1')) if !$user->name;
$self->send($self->msg('qthe1')) if !$user->qth;
$self->send($self->msg('qll')) if !$user->qra || (!$user->lat && !$user->long);
$self->send($self->msg('hnodee1')) if !$user->qth;
$self->send($self->msg('m9')) if DXMsg::for_me($call);
+
+ # send out any buddy messages for other people that are online
+ foreach my $call (@{$user->buddies}) {
+ my $ref = Route::User::get($call);
+ if ($ref) {
+ foreach my $node (@{$ref->parent}) {
+ my $s = $node eq $main::mycall ? $call : "$node: $call";
+ $self->send($self->msg('loginb', $s));
+ }
+ }
+ }
+
$self->lastmsgpoll($main::systime);
$self->prompt;
}
# send info to all logged in thingies
$self->tell_login('loginu', "$ncall: $call") if DXUser->get_current($ncall)->is_local_node;
- $self->tell_buddies('loginb', "$ncall: $call");
+ $self->tell_buddies('loginb', $call, $ncall);
# add this station to the user database, if required
# $call =~ s/-\d+$//o; # remove ssid for users
# send info to all logged in thingies
$self->tell_login('logoutu', "$ncall: $ucall") if DXUser->get_current($ncall)->is_local_node;
- $self->tell_buddies('logoutb', "$ncall: $ucall");
+ $self->tell_buddies('logoutb', $ucall, $ncall);
if (eph_dup($line)) {
dbg("PCPROT: dup PC17 detected") if isdbg('chanerr');
package Minimuf;
-use POSIX;
require Exporter;
@ISA = qw(Exporter);
use strict;
+use DXDebug;
+use POSIX qw(:math_h);
+
use vars qw($VERSION $BRANCH);
$VERSION = sprintf( "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/ );
$BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/ || (0,0));
#
# $Id$
#
+# 2005/02/25 add calculation of civil dawn and dusk, defined to be times
+# when solar zenith angle is 96 degrees.
# 2001/12/16 Fixed Julian_Date_of_Epoch and now I actually use it...
# 2001/09/15 some changes to take care of cases where the object
# doesn't rise or set on a given day...
package Sun;
-use POSIX;
require Exporter;
@ISA = qw(Exporter);
use strict;
use vars qw($VERSION $BRANCH);
-
-main::mkver($VERSION = q$Revision$);
+$VERSION = sprintf( "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/ );
+$BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/ || (0,0));
+$main::build += $VERSION;
+$main::branch += $BRANCH;
use vars qw($pi $d2r $r2d);
use Keps;
use DXVars;
use DXUtil;
+use DXDebug;
+
+use POSIX qw(:math_h);
# reload the keps data
sub load