]> dxcluster.org Git - spider.git/commitdiff
fix all DXChannel->get to ::get
authorminima <minima>
Sun, 20 Feb 2005 23:56:18 +0000 (23:56 +0000)
committerminima <minima>
Sun, 20 Feb 2005 23:56:18 +0000 (23:56 +0000)
57 files changed:
cmd/connect.pl
cmd/dbshow.pl
cmd/delete/user.pl
cmd/demonstrate.pl
cmd/disconnect.pl
cmd/forward/latlong.pl
cmd/init.pl
cmd/links.pl
cmd/pc.pl
cmd/rinit.pl
cmd/set/announce.pl
cmd/set/anntalk.pl
cmd/set/arcluster.pl
cmd/set/bbs.pl
cmd/set/clx.pl
cmd/set/dx.pl
cmd/set/dxnet.pl
cmd/set/here.pl
cmd/set/isolate.pl
cmd/set/node.pl
cmd/set/obscount.pl
cmd/set/pinginterval.pl
cmd/set/privilege.pl
cmd/set/register.pl
cmd/set/spider.pl
cmd/set/talk.pl
cmd/set/wcy.pl
cmd/set/wwv.pl
cmd/set/wx.pl
cmd/show/configuration.pl
cmd/spoof.pl
cmd/stat/channel.pl
cmd/unset/announce.pl
cmd/unset/anntalk.pl
cmd/unset/dx.pl
cmd/unset/here.pl
cmd/unset/isolate.pl
cmd/unset/node.pl
cmd/unset/register.pl
cmd/unset/talk.pl
cmd/unset/wcy.pl
cmd/unset/wwv.pl
cmd/unset/wx.pl
perl/AMsg.pm
perl/DXChannel.pm
perl/DXCommandmode.pm
perl/DXCron.pm
perl/DXDb.pm
perl/DXMsg.pm
perl/DXProt.pm
perl/DXUser.pm
perl/Filter.pm
perl/Investigate.pm
perl/Route.pm
perl/Thingy.pm
perl/Thingy/Rt.pm
perl/cluster.pl

index 1f1ad03f640b76f53f1a59f8b1e8aecd678afb5e..e76bd01e0390b4e2bc50bb71820093b13f524b74 100644 (file)
@@ -7,7 +7,7 @@ my $lccall = lc $call;
 
 return (1, $self->msg('e5')) if $self->priv < 5;
 return (1, $self->msg('e6')) unless $call gt ' ';
-return (1, $self->msg('already', $call)) if DXChannel->get($call);
+return (1, $self->msg('already', $call)) if DXChannel::get($call);
 return (1, $self->msg('outconn', $call)) if grep {$_->{call} eq $call} @main::outstanding_connects;
 return (1, $self->msg('conscript', $lccall)) unless -e "$main::root/connect/$lccall";
 
index 309ce8a51d61cb16d3edcee339097dacc30ffcc1..6290dd3a5abc3c1d52aa2447eedff3edcef66171 100644 (file)
@@ -24,7 +24,7 @@ foreach  $n (@db) {
        if ($db->remote) {
 
                # remote databases
-               unless (Route::Node::get($db->remote) || DXChannel->get($db->remote)) {
+               unless (Route::Node::get($db->remote) || DXChannel::get($db->remote)) {
                        push @out, $self->msg('db4', uc $name, $db->remote);
                        last;
                }
index ac5a803411295b67c695d0d5ce6d50727c651012..5ab03a4f6932f2c90cd7a28e6d337a2dd20e9e8a 100644 (file)
@@ -18,7 +18,7 @@ return (1, $self->msg('e5')) if $self->priv < 9;
 
 foreach $call (@args) {
        $call = uc $call;
-       my $chan = DXChannel->get($call);
+       my $chan = DXChannel::get($call);
        if ($chan) {
                push @out, $self->msg('nodee1', $call);
        } else {
index 7ef0277ead9151680821f25abf82f25298302f26..1d2231e8ed66c79ae8108fabdec5a8bfb6088d5a 100644 (file)
@@ -11,7 +11,7 @@ my ($self, $line) = @_;
 
 my ($call, $newline) = split /\s+/, $line, 2;
 $call = uc $call;
-my $dxchan = DXChannel->get($call);
+my $dxchan = DXChannel::get($call);
 my $mycall = $self->call;
 
 return (1, $self->msg('e7', $call)) unless $dxchan;
index a023c609ee72388bcee49bed1adbaa79ab141524..60078704f375994a29a8c5c8b87aeef3b0e9cb6b 100644 (file)
@@ -13,7 +13,7 @@ if ($self->priv < 5) {
 foreach $call (@calls) {
        $call = uc $call;
        next if $call eq $main::mycall;
-       my $dxchan = DXChannel->get($call);
+       my $dxchan = DXChannel::get($call);
        if ($dxchan) {
                if ($dxchan->is_node) {
 #                      $dxchan->send_pc39($self->msg('disc1', $self->call));
@@ -28,7 +28,7 @@ foreach $call (@calls) {
                push @out, $self->msg('disc3', $call);
 #      } elsif (my $ref = DXCluster->get_exact($call)) {
 #              my $dxchancall = $ref->dxchancall;
-#              if ($dxchancall eq $main::mycall || !DXChannel->get($dxchancall)) {
+#              if ($dxchancall eq $main::mycall || !DXChannel::get($dxchancall)) {
 #                      $ref->del;
 #                      push @out, $self->msg('disc4', $call);
 #              }
index 7f6472bdf1d158de0eaa27534c3da81b8d7f338b..e10239890e3675173286cc7928c5faa5b6fd72c2 100644 (file)
@@ -16,7 +16,7 @@ my @out;
 my $dxchan;
 
 for ( map {uc $_ } split /\s+/, $line ) {
-       if (($dxchan = DXChannel->get($_)) && $dxchan->is_node) {
+       if (($dxchan = DXChannel::get($_)) && $dxchan->is_node) {
                push @dxchan, $dxchan;
        } else {
                push @out, $self->msg('e10', $_);
index ab49b6ee4ca9c78a6811d13b0bae0ae2db65e02f..b508a04acaed2a76d853ac5f4e80c9b6fe3f7482 100644 (file)
@@ -15,7 +15,7 @@ return (1, $self->msg('e5')) if $self->priv < 5;
 foreach $call (@calls) {
        $call = uc $call;
        next if $call eq $main::mycall;
-       my $dxchan = DXChannel->get($call);
+       my $dxchan = DXChannel::get($call);
        if ($dxchan) {
                if ($dxchan->is_node) {
                        # first clear out any nodes on this dxchannel
index 68e2d044c7b67c079004e6550462a0c7960b44ec..1289211edef34a7df6785201c753c9c3cdfac0d5 100644 (file)
@@ -18,7 +18,7 @@ my $nowt = time;
 push @out, "                                      Ave   Obs   Ping   Sec Since";
 push @out, "  Callsign Type Started               RTT  count  Int.   Last Ping";
 
-foreach $dxchan ( sort {$a->call cmp $b->call} DXChannel::get_all() ) {
+foreach $dxchan ( sort {$a->call cmp $b->call} grep {$_->is_node || $_->is_aranea} DXChannel::get_all() ) {
        next if $dxchan->is_user;
        my $call = $dxchan->call();
        next if $dxchan == $main::me;
index dcc2f668e86682391d11ab23e7f25a6326bd890d..12ab8fdc4d9cbb362599f9946ec918322fbe75e4 100644 (file)
--- a/cmd/pc.pl
+++ b/cmd/pc.pl
@@ -12,7 +12,7 @@ my @f = split /\s+/, $line;
 return (1, $self->msg('e5')) if $self->priv < 8 || $self->remotecmd || $self->inscript;
 
 my $call = uc shift @f;
-my $dxchan = DXChannel->get($call);
+my $dxchan = DXChannel::get($call);
 return (1, $self->msg('e10', $call)) if !$dxchan;
 return (1, $self->msg('e8')) if @f <= 0;
 
index 953a30a92e318fe297f0066f92847d57ed78a713..3a7e17c0672403a10d3da04f313d7d93539f20d7 100644 (file)
@@ -15,7 +15,7 @@ return (1, $self->msg('e5')) if $self->priv < 5;
 foreach $call (@calls) {
        $call = uc $call;
        next if $call eq $main::mycall;
-       my $dxchan = DXChannel->get($call);
+       my $dxchan = DXChannel::get($call);
        if ($dxchan) {
                if ($dxchan->is_node) {
                        my $parent = Route::Node::get($call);
index 323ff5e07b5000a09d000558e9f1b10256f9ccb4..533d177acb7ad538e364d72a73a6c2e81b148f01 100644 (file)
@@ -15,7 +15,7 @@ my @out;
 
 foreach $call (@args) {
   $call = uc $call;
-  my $chan = DXChannel->get($call);
+  my $chan = DXChannel::get($call);
   if ($chan) {
     $chan->ann(1);
     $chan->user->wantann(1);
index eec6540010d3c701ce58965c249dd4886866b3ed..2d70f8468c3e6d606fcca5c3a8e889ea45dc39e4 100644 (file)
@@ -15,7 +15,7 @@ my @out;
 
 foreach $call (@args) {
   $call = uc $call;
-  my $chan = DXChannel->get($call);
+  my $chan = DXChannel::get($call);
   if ($chan) {
     $chan->ann_talk(1);
     $chan->user->wantann_talk(1);
index 4e1dd45204ae9d403de55c3eedafb19489b0169e..6ad80c6c6acc899c018859be0df5549823c45bbc 100644 (file)
@@ -19,7 +19,7 @@ return (1, $self->msg('e5')) if $self->priv < 5;
 
 foreach $call (@args) {
        $call = uc $call;
-       my $chan = DXChannel->get($call);
+       my $chan = DXChannel::get($call);
        if ($chan) {
                push @out, $self->msg('nodee1', $call);
        } else {
index 0cb6cf3905bab18dab7e0895be3af924afa736ac..f92f85de7e2f4cf0ce6244c0ca95d04d937185ff 100644 (file)
@@ -19,7 +19,7 @@ return (1, $self->msg('e5')) if $self->priv < 5;
 
 foreach $call (@args) {
        $call = uc $call;
-       my $chan = DXChannel->get($call);
+       my $chan = DXChannel::get($call);
        if ($chan) {
                push @out, $self->msg('nodee1', $call);
        } else {
index f453e41fbe4b95a1930c4d0f4498c502278d2ae3..dd0ee2fdbaf167452274bb8a225388b2b66e346e 100644 (file)
@@ -19,7 +19,7 @@ return (1, $self->msg('e5')) if $self->priv < 5;
 
 foreach $call (@args) {
        $call = uc $call;
-       my $chan = DXChannel->get($call);
+       my $chan = DXChannel::get($call);
        if ($chan) {
                push @out, $self->msg('nodee1', $call);
        } else {
index 8d599d5e5e81dba128f02f018e194762475a30ba..3eb9bbf017be9d0275326d6ee5ee0a8c935e26f2 100644 (file)
@@ -15,7 +15,7 @@ my @out;
 
 foreach $call (@args) {
   $call = uc $call;
-  my $chan = DXChannel->get($call);
+  my $chan = DXChannel::get($call);
   if ($chan) {
     $chan->dx(1);
     $chan->user->wantdx(1);
index f8e3686fd5524921ba84ba1efb02409902ad2d13..e8714c53b82e3f930a4aa9a77ce83da144167804 100644 (file)
@@ -19,7 +19,7 @@ return (1, $self->msg('e5')) if $self->priv < 5;
 
 foreach $call (@args) {
        $call = uc $call;
-       my $chan = DXChannel->get($call);
+       my $chan = DXChannel::get($call);
        if ($chan) {
                push @out, $self->msg('nodee1', $call);
        } else {
index 1c4b167cb0bc942837b268bdb6ad4a1563a513f9..646997ea9db310889b90fa3df2242ff805873280 100644 (file)
@@ -15,7 +15,7 @@ my @out;
 
 foreach $call (@args) {
        $call = uc $call;
-       my $dxchan = DXChannel->get($call);
+       my $dxchan = DXChannel::get($call);
        if ($dxchan) {
                $dxchan->here(1);
                push @out, $self->msg('heres', $call);
index 89d8257b0fe5f71d3e1afa692eaaca3d7f8bed2d..b90f0c2bddeff9501963aea081cba06223d0f025 100644 (file)
@@ -19,7 +19,7 @@ return (1, $self->msg('e5')) if $self->priv < 9;
 
 foreach $call (@args) {
        $call = uc $call;
-       my $chan = DXChannel->get($call);
+       my $chan = DXChannel::get($call);
        if ($chan) {
                push @out, $self->msg('nodee1', $call);
        } else {
index 4eeae7f1ea9db2230c9b60f0e2ae6d8711495c7e..95b38bb60b401c2d2cf6fae03ddba16e03265ab5 100644 (file)
@@ -19,7 +19,7 @@ return (1, $self->msg('e5')) if $self->priv < 5;
 
 foreach $call (@args) {
        $call = uc $call;
-       my $chan = DXChannel->get($call);
+       my $chan = DXChannel::get($call);
        if ($chan) {
                push @out, $self->msg('nodee1', $call);
        } else {
index e37387fe12f4258bd58eed6de543659880a34bdd..8a6dc42541eeba851b92e7ec856521ae3263f0fb 100644 (file)
@@ -20,7 +20,7 @@ return (1, $self->msg('e12')) unless @args;
 
 foreach $call (@args) {
        $call = uc $call;
-       my $dxchan = DXChannel->get($call);
+       my $dxchan = DXChannel::get($call);
        $user = $dxchan->user if $dxchan;
        $user = DXUser->get_current($call);
        if ($user) {
index 6511c5b65065b471bfe35b678b836b833f443c27..1e1da5697bca44acd0ea33926f4e0b5fb2376b13 100644 (file)
@@ -32,7 +32,7 @@ if ($val =~ /^(\d+)[sS]$/) {
 
 foreach $call (@args) {
        $call = uc $call;
-       my $dxchan = DXChannel->get($call);
+       my $dxchan = DXChannel::get($call);
        $user = $dxchan->user if $dxchan;
        $user = DXUser->get($call) unless $user;
        if ($user) {
index 6d5fd4d20cd053a443fc3911e3edffb7b69a0d68..7f6cbd395c5496534482ca7d3b7fb388caff4500 100644 (file)
@@ -27,7 +27,7 @@ if ($priv < 0 || $priv > 9) {
 foreach $call (@args) {
        $call = uc $call;
        unless ($self->remotecmd || $self->inscript) {
-               if ($ref = DXChannel->get($call)) {
+               if ($ref = DXChannel::get($call)) {
                        $ref->priv($priv);
                        $ref->user->priv($priv);
                        $ref->user->put();
index 3a7c7db5f9bf0306189961166474a69780d4d6d6..509eaff6d3dd3d018b9c07e2fe7a257c59ccad0f 100644 (file)
@@ -32,7 +32,7 @@ foreach $call (@args) {
                        $ref->put();
                        push @out, $self->msg("regc", $call);
                }
-               my $dxchan = DXChannel->get($call);
+               my $dxchan = DXChannel::get($call);
                $dxchan->registered(1) if $dxchan;
                Log('DXCommand', $self->call . " registered $call");
        } else {
index 7bd3e6a646dfd1f492bc3a0a891ef449ecbd8049..9c821826083b60019bb65925922c9c0a1e06bf6e 100644 (file)
@@ -19,7 +19,7 @@ return (1, $self->msg('e5')) if $self->priv < 5;
 
 foreach $call (@args) {
        $call = uc $call;
-       my $chan = DXChannel->get($call);
+       my $chan = DXChannel::get($call);
        if ($chan) {
                push @out, $self->msg('nodee1', $call);
        } else {
index 70bde6e79a468a41dd7e952e4166d1564d24858c..0c1e6be70aeeb29b3783445fa81dbc2204bc0d37 100644 (file)
@@ -15,7 +15,7 @@ my @out;
 
 foreach $call (@args) {
   $call = uc $call;
-  my $chan = DXChannel->get($call);
+  my $chan = DXChannel::get($call);
   if ($chan) {
     $chan->talk(1);
     $chan->user->wanttalk(1);
index 1aed404c238510bfbcdf3fc669e6c9f51da87232..8efd6299ae5d91298c2cd9e3032689eed8a824e1 100644 (file)
@@ -15,7 +15,7 @@ my @out;
 
 foreach $call (@args) {
   $call = uc $call;
-  my $chan = DXChannel->get($call);
+  my $chan = DXChannel::get($call);
   if ($chan) {
     DXChannel::wcy($chan, 1);
     $chan->user->wantwcy(1);
index da06ebc1cb5a132dbfad14c222c65eda3d8e9632..33ac78619b5f9d41f6b591ae30e9773750b8086d 100644 (file)
@@ -15,7 +15,7 @@ my @out;
 
 foreach $call (@args) {
        $call = uc $call;
-       my $chan = DXChannel->get($call);
+       my $chan = DXChannel::get($call);
        if ($chan) {
                DXChannel::wwv($chan, 1);
                $chan->user->wantwwv(1);
index f609df353001f6faffd303b8c7de537518dd7913..ef6a71cc55159b7b03f0fb80b114492929f1ce19 100644 (file)
@@ -15,7 +15,7 @@ my @out;
 
 foreach $call (@args) {
   $call = uc $call;
-  my $chan = DXChannel->get($call);
+  my $chan = DXChannel::get($call);
   if ($chan) {
     $chan->wx(1);
     $chan->user->wantwx(1);
index 3386a1716e5a65404ce7398a0d59378a6e712dd9..af81ad2101610eab36832f2e41dc34a098f7e9af 100644 (file)
@@ -16,7 +16,7 @@ my @val;
 
 push @out, $self->msg('showconf');
 if ($list[0] && $list[0] =~ /^NOD/) {
-       my @ch = sort {$a->call cmp $b->call} DXChannel::get_all_nodes();
+       my @ch = sort {$a->call cmp $b->call} grep {$_->is_node || $_->is_aranea} DXChannel::get_all();
        my $dxchan;
        
        foreach $dxchan (@ch) {
index 5336a3248c2d673face8f0fa0b5513f144e0b34d..ad2f9b8ccbb408a9b64b15accd907f87b36370a3 100644 (file)
@@ -13,7 +13,7 @@ my $myuser = $self->user;
 my $mylang = $self->lang;
 
 my ($call, $newline) = split /\s+/, $line, 2;
-return (1, $self->msg('nodee1', $call)) if DXChannel->get($call);
+return (1, $self->msg('nodee1', $call)) if DXChannel::get($call);
 
 if ($self->remotecmd || $self->inscript) {
        Log('DXCommand', "$mycall is trying to spoof $call remotely");
index d963eb45eee91b62b56404952b067530cbe30d8f..be4e5f9330d237acf160555dda41973708af6941 100644 (file)
@@ -13,7 +13,7 @@ my $call;
 my @out;
 foreach $call (@list) {
   $call = uc $call;
-  my $ref = DXChannel->get($call);
+  my $ref = DXChannel::get($call);
   if ($ref) {
     @out = print_all_fields($self, $ref, "Channel Information $call");
   } else {
index 2c4ebd30883aa7c5894e6edb3b605b51e7ecc4e8..3e7b61dcb483ae996ea5c7dd4ad9ec8f66bf92ad 100644 (file)
@@ -15,7 +15,7 @@ my @out;
 
 foreach $call (@args) {
   $call = uc $call;
-  my $chan = DXChannel->get($call);
+  my $chan = DXChannel::get($call);
   if ($chan) {
     $chan->ann(0);
        $chan->user->wantann(0);
index 7e8f012fa682444efd18140414cfccaf92aef645..9b7cc238756b34251e6d7f87b83b1959002a8b62 100644 (file)
@@ -15,7 +15,7 @@ my @out;
 
 foreach $call (@args) {
   $call = uc $call;
-  my $chan = DXChannel->get($call);
+  my $chan = DXChannel::get($call);
   if ($chan) {
     $chan->ann_talk(0);
     $chan->user->wantann_talk(0);
index dcc177a91562ee7bcbad80311cba9a8bf2addae9..2090b7809782959319abaf28fc8b5889ef022586 100644 (file)
@@ -15,7 +15,7 @@ my @out;
 
 foreach $call (@args) {
   $call = uc $call;
-  my $chan = DXChannel->get($call);
+  my $chan = DXChannel::get($call);
   if ($chan) {
     $chan->dx(0);
        $chan->user->wantdx(0);
index 19db8dbd9ffdb647bf55e85426f981cf25a15dd0..d83d59cbbeb721ee56271cffdaaf681548cd6214 100644 (file)
@@ -15,7 +15,7 @@ my @out;
 
 foreach $call (@args) {
        $call = uc $call;
-       my $dxchan = DXChannel->get($call);
+       my $dxchan = DXChannel::get($call);
        if ($dxchan) {
                $dxchan->here(0);
                push @out, $self->msg('hereu', $call);
index ecf033173ca322a563813582cf3df9140a5c1552..6396caef43e8245b36b44dc45945ddee4b2ca149 100644 (file)
@@ -19,7 +19,7 @@ return (1, $self->msg('e5')) if $self->priv < 5;
 
 foreach $call (@args) {
        $call = uc $call;
-       my $chan = DXChannel->get($call);
+       my $chan = DXChannel::get($call);
        if ($chan) {
                push @out, $self->msg('nodee1', $call);
        } else {
index 671f1b2d9d291dc915c3ab6367c31719288a95c5..76350a3ff722880bd93d25c1cf89f0b92a1c677c 100644 (file)
@@ -19,7 +19,7 @@ return (1, $self->msg('e5')) if $self->priv < 5;
 
 foreach $call (@args) {
        $call = uc $call;
-       my $chan = DXChannel->get($call);
+       my $chan = DXChannel::get($call);
        if ($chan) {
                push @out, $self->msg('nodee1', $call);
        } else {
index 555fe02149116536b88c515ed6e5291830493ae9..f789d1ed08f3adad52ef37eb0fc7a94a8f3bc161 100644 (file)
@@ -25,7 +25,7 @@ foreach $call (@args) {
                if ($ref = DXUser->get_current($call)) {
                        $ref->registered(0);
                        $ref->put();
-                       my $dxchan = DXChannel->get($call);
+                       my $dxchan = DXChannel::get($call);
                        $dxchan->registered(0) if $dxchan;
                        push @out, $self->msg("regun", $call);
                        Log('DXCommand', $self->call . " unregistered $call");
index 77deccbccdc1bcb31ab9180d0b2a3444902e6622..c693cca57820443d9c452b32414f12eea643e801 100644 (file)
@@ -15,7 +15,7 @@ my @out;
 
 foreach $call (@args) {
   $call = uc $call;
-  my $chan = DXChannel->get($call);
+  my $chan = DXChannel::get($call);
   if ($chan) {
     $chan->talk(0);
        $chan->user->wanttalk(0);
index 42b098a3228e2f68cc333822e9bdc9e51fd114e9..8d1cdbeb5fe5fea17466a6309500a3d6312253ad 100644 (file)
@@ -15,7 +15,7 @@ my @out;
 
 foreach $call (@args) {
   $call = uc $call;
-  my $chan = DXChannel->get($call);
+  my $chan = DXChannel::get($call);
   if ($chan) {
     DXChannel::wcy($chan, 0);
     $chan->user->wantwcy(0);
index eebf16d73b54e95e64b5ba86071a28bedd4d8526..57b041193a4454fe9fb3f3a956449ff46f084ad1 100644 (file)
@@ -15,7 +15,7 @@ my @out;
 
 foreach $call (@args) {
   $call = uc $call;
-  my $chan = DXChannel->get($call);
+  my $chan = DXChannel::get($call);
   if ($chan) {
     DXChannel::wwv($chan, 0);
     $chan->user->wantwwv(0);
index 755ed026c601c4aadd6a23036b4e959edfd36ac0..21ed1a1ce6ec9fe9bea222b4299bfdfcfa1cbac9 100644 (file)
@@ -15,7 +15,7 @@ my @out;
 
 foreach $call (@args) {
   $call = uc $call;
-  my $chan = DXChannel->get($call);
+  my $chan = DXChannel::get($call);
   if ($chan) {
     $chan->wx(0);
     $chan->user->wantwx(0);
index 15596a98196958e3e2185e0d76cb09ca397f26da..4ca43cb495951433f88cf4e325f548e9d3d7e037 100644 (file)
@@ -170,7 +170,7 @@ sub new_channel
        # set up the basic channel info
        # is there one already connected to me - locally? 
        my $user = DXUser->get_current($call);
-       my $dxchan = DXChannel->get($call);
+       my $dxchan = DXChannel::get($call);
        if ($dxchan) {
                if ($main::bumpexisting && $call ne $main::mycall) {
                        my $ip = $conn->{peerhost} || 'unknown';
index 90e19ef9e2bb433c3d80b397286ed757a7db8c97..ad6e46b7194f0ef469fb6797c0425adc4590980c 100644 (file)
@@ -185,11 +185,10 @@ sub rec
        }
 }
 
-# obtain a channel object by callsign [$obj = DXChannel->get($call)]
+# obtain a channel object by callsign [$obj = DXChannel::get($call)]
 sub get
 {
-       my ($pkg, $call) = @_;
-       return $channels{$call};
+       return $channels{$_[0]};
 }
 
 # obtain all the channel objects
index 02164669eeef0e319206de79b58ea46d3b3e4543..937bbfea034b21da0d447bdf95f3483a95ee9c6c 100644 (file)
@@ -498,7 +498,7 @@ sub run_cmd
 sub process
 {
        my $t = time;
-       my @dxchan = DXChannel->get_all();
+       my @dxchan = DXChannel::get_all();
        my $dxchan;
        
        foreach $dxchan (@dxchan) {
@@ -589,7 +589,7 @@ sub broadcast
        my $pkg = shift;                        # ignored
        my $s = shift;                          # the line to be rebroadcast
        
-    foreach my $dxchan (DXChannel->get_all()) {
+    foreach my $dxchan (DXChannel::get_all()) {
                next unless $dxchan->{sort} eq 'U'; # only interested in user channels  
                next if grep $dxchan == $_, @_;
                $dxchan->send($s);                      # send it
@@ -599,7 +599,7 @@ sub broadcast
 # gimme all the users
 sub get_all
 {
-       return grep {$_->{sort} eq 'U'} DXChannel->get_all();
+       return grep {$_->{sort} eq 'U'} DXChannel::get_all();
 }
 
 # run a script for this user
@@ -895,7 +895,7 @@ sub broadcast_debug
 {
        my $s = shift;                          # the line to be rebroadcast
        
-       foreach my $dxchan (DXChannel->get_all) {
+       foreach my $dxchan (DXChannel::get_all) {
                next unless $dxchan->{enhanced} && $dxchan->{senddbg};
                $dxchan->send_later('L', $s);
        }
index 868420585b70e416e48e9af0ed56e27a09a524ff..2a9913f1f9682a4a20bb62b84850c7dbbacadf96 100644 (file)
@@ -174,7 +174,7 @@ sub process
 sub connected
 {
        my $call = uc shift;
-       return DXChannel->get($call);
+       return DXChannel::get($call);
 }
 
 # is it remotely connected anywhere (with exact callsign)?
@@ -224,7 +224,7 @@ sub presentish_on
 sub last_connect
 {
        my $call = uc shift;
-       return $main::systime if DXChannel->get($call);
+       return $main::systime if DXChannel::get($call);
        my $user = DXUser->get($call);
        return $user ? $user->lastin : 0;
 }
index a088866c5873e675586b4a72c8c93c6565170e70..833640f5862b2d5dfa75a7b1666a35e53336ab6e 100644 (file)
@@ -277,7 +277,7 @@ sub handle_45
        # incoming DB Information
        my $n = getstream($_[3]);
        if ($n) {
-               my $mchan = DXChannel->get($n->{call});
+               my $mchan = DXChannel::get($n->{call});
                $mchan->send($_[2] . ":$_[4]") if $mchan;
        }
 }
index 67165ef455a03df1fcae0368bd1ba21504f5c325..b25b70a5b704c57f02ba863d88ca406a6bbdf651 100644 (file)
@@ -479,7 +479,7 @@ sub notify
        my $ref = shift;
        my $to = $ref->{to};
        my $uref = DXUser->get_current($to);
-       my $dxchan = DXChannel->get($to);
+       my $dxchan = DXChannel::get($to);
        if (((*Net::SMTP && $email_server) || $email_prog) && $uref && $uref->wantemail) {
                my $email = $uref->email;
                if ($email) {
index 2bf621e1a1883d61776c0b689bb2c3b5961e917b..35f91fefb301a56d9334dc59b0f2cd4024550757 100644 (file)
@@ -441,8 +441,8 @@ sub handle_10
 #      RouteDB::update($to, $_[6]);
 
        # it is here and logged on
-       $dxchan = DXChannel->get($main::myalias) if $to eq $main::mycall;
-       $dxchan = DXChannel->get($to) unless $dxchan;
+       $dxchan = DXChannel::get($main::myalias) if $to eq $main::mycall;
+       $dxchan = DXChannel::get($to) unless $dxchan;
        if ($dxchan && $dxchan->is_user) {
                $_[3] =~ s/\%5E/^/g;
                $dxchan->talk($from, $to, $via, $_[3]);
@@ -640,7 +640,7 @@ sub handle_12
 
        my $dxchan;
        
-       if ((($dxchan = DXChannel->get($_[2])) && $dxchan->is_user) || $_[4] =~ /^[\#\w.]+$/){
+       if ((($dxchan = DXChannel::get($_[2])) && $dxchan->is_user) || $_[4] =~ /^[\#\w.]+$/){
                $self->send_chat($line, @_[1..6]);
        } elsif ($_[2] eq '*' || $_[2] eq $main::mycall) {
 
@@ -756,7 +756,7 @@ sub handle_16
                                                }
                                        }
                                        $user->wantroutepc19(1) unless defined $wantpc19; # for now we work on the basis that pc16 = real route 
-                                       $user->lastin($main::systime) unless DXChannel->get($ncall);
+                                       $user->lastin($main::systime) unless DXChannel::get($ncall);
                                        $user->put;
                                                
                                        # route the pc19 - this will cause 'stuttering PC19s' for a while
@@ -827,7 +827,7 @@ sub handle_16
                $user = DXUser->new($call) if !$user;
                $user->homenode($parent->call) if !$user->homenode;
                $user->node($parent->call);
-               $user->lastin($main::systime) unless DXChannel->get($call);
+               $user->lastin($main::systime) unless DXChannel::get($call);
                $user->put;
        }
        $self->route_pc16($origin, $line, $parent, @rout) if @rout;
@@ -993,7 +993,7 @@ sub handle_19
                next if $call eq $main::mycall;
 
                # check that this PC19 isn't trying to alter the wrong dxchan
-               my $dxchan = DXChannel->get($call);
+               my $dxchan = DXChannel::get($call);
                if ($dxchan && $dxchan != $self) {
                        dbg("PCPROT: PC19 from $origin trying to alter wrong locally connected $call, ignored!") if isdbg('chanerr');
                        next;
@@ -1075,7 +1075,7 @@ sub handle_19
                my $mref = DXMsg::get_busy($call);
                $mref->stop_msg($call) if $mref;
                                
-               $user->lastin($main::systime) unless DXChannel->get($call);
+               $user->lastin($main::systime) unless DXChannel::get($call);
                $user->put;
        }
 
@@ -1144,7 +1144,7 @@ sub handle_21
                        my $node = Route::Node::get($call);
                        if ($node) {
                                                
-                               my $dxchan = DXChannel->get($call);
+                               my $dxchan = DXChannel::get($call);
                                if ($dxchan && $dxchan != $self) {
                                        dbg("PCPROT: PC21 from $origin trying to alter locally connected $call, ignored!") if isdbg('chanerr');
                                        return;
@@ -1526,10 +1526,10 @@ sub handle_51
                        # it's a reply, look in the ping list for this one
                        my $ref = $pings{$from};
                        if ($ref) {
-                               my $tochan =  DXChannel->get($from);
+                               my $tochan =  DXChannel::get($from);
                                while (@$ref) {
                                        my $r = shift @$ref;
-                                       my $dxchan = DXChannel->get($r->{call});
+                                       my $dxchan = DXChannel::get($r->{call});
                                        next unless $dxchan;
                                        my $t = tv_interval($r->{t}, [ gettimeofday ]);
                                        if ($dxchan->is_user) {
@@ -1677,7 +1677,7 @@ sub handle_default
 sub process
 {
        my $t = time;
-       my @dxchan = DXChannel->get_all();
+       my @dxchan = DXChannel::get_all();
        my $dxchan;
        my $pc50s;
        
@@ -1759,7 +1759,7 @@ sub send_wwv_spot
 {
        my $self = shift;
        my $line = shift;
-       my @dxchan = DXChannel->get_all();
+       my @dxchan = DXChannel::get_all();
        my $dxchan;
        my @dxcc = ((Prefix::cty_data($_[6]))[0..2], (Prefix::cty_data($_[7]))[0..2]);
 
@@ -1793,7 +1793,7 @@ sub send_wcy_spot
 {
        my $self = shift;
        my $line = shift;
-       my @dxchan = DXChannel->get_all();
+       my @dxchan = DXChannel::get_all();
        my $dxchan;
        my @dxcc = ((Prefix::cty_data($_[10]))[0..2], (Prefix::cty_data($_[11]))[0..2]);
        
@@ -1826,7 +1826,7 @@ sub send_announce
 {
        my $self = shift;
        my $line = shift;
-       my @dxchan = DXChannel->get_all();
+       my @dxchan = DXChannel::get_all();
        my $dxchan;
        my $target;
        my $to = 'To ';
@@ -1891,7 +1891,7 @@ sub send_chat
 {
        my $self = shift;
        my $line = shift;
-       my @dxchan = DXChannel->get_all();
+       my @dxchan = DXChannel::get_all();
        my $dxchan;
        my $target = $_[3];
        my $text = unpad($_[2]);
@@ -1987,7 +1987,7 @@ sub send_local_config
         # don't appear outside of this node
 
                # send locally connected nodes
-               my @dxchan = grep { $_->call ne $main::mycall && $_ != $self && !$_->{isolate} } DXChannel::get_all_nodes();
+               my @dxchan = grep { $_->call ne $main::mycall && $_ != $self && !$_->{isolate} && ($_->is_node || $_->is_aranea) } DXChannel::get_all();
                @localnodes = map { my $r = Route::Node::get($_->{call}); $r ? $r : () } @dxchan if @dxchan;
                $self->send_route($main::mycall, \&pc19, scalar(@localnodes)+1, $main::routeroot, @localnodes);
 
@@ -2032,7 +2032,7 @@ sub route
        }
 
        # always send it down the local interface if available
-       my $dxchan = DXChannel->get($call);
+       my $dxchan = DXChannel::get($call);
        if ($dxchan) {
                dbg("route: $call -> $dxchan->{call} direct" ) if isdbg('route');
        } else {
@@ -2055,7 +2055,7 @@ sub route
                                dbg("PCPROT: Trying to route back to source, dropped") if isdbg('chanerr');
                                return;
                        }
-                       $dxchan = DXChannel->get($rcall);
+                       $dxchan = DXChannel::get($rcall);
                        dbg("route: $call -> $rcall using RouteDB" ) if isdbg('route') && $dxchan;
                }
        }
@@ -2136,7 +2136,7 @@ sub addping
        my $r = {};
        $r->{call} = $from;
        $r->{t} = [ gettimeofday ];
-       if ($via && (my $dxchan = DXChannel->get($via))) {
+       if ($via && (my $dxchan = DXChannel::get($via))) {
                $dxchan->send(pc51($to, $main::mycall, 1));
        } else {
                route(undef, $to, pc51($to, $main::mycall, 1));
@@ -2188,13 +2188,13 @@ sub process_rcmd_reply
        if ($tonode eq $main::mycall) {
                my $s = $rcmds{$fromnode};
                if ($s) {
-                       my $dxchan = DXChannel->get($s->{call});
-                       my $ref = $user eq $tonode ? $dxchan : (DXChannel->get($user) || $dxchan);
+                       my $dxchan = DXChannel::get($s->{call});
+                       my $ref = $user eq $tonode ? $dxchan : (DXChannel::get($user) || $dxchan);
                        $ref->send($line) if $ref;
                        delete $rcmds{$fromnode} if !$dxchan;
                } else {
                        # send unsolicited ones to the sysop
-                       my $dxchan = DXChannel->get($main::myalias);
+                       my $dxchan = DXChannel::get($main::myalias);
                        $dxchan->send($line) if $dxchan;
                }
        } else {
index a349f6ab41f9d3c90629c3c1cb20f038e9ba2256..056fe9ff50b3a1e2ce1c42cccc6f3491b4f19839 100644 (file)
@@ -262,7 +262,7 @@ sub get_current
        my $pkg = shift;
        my $call = uc shift;
   
-       my $dxchan = DXChannel->get($call);
+       my $dxchan = DXChannel::get($call);
        return $dxchan->user if $dxchan;
        my $rref = Route::get($call);
        return $rref->user if $rref && exists $rref->{user};
index 4b32ab50407168f05eca8fdf6a1d557f9c40ea0d..74f74d444dbc2ab34610071e1b8acb25d39e71cc 100644 (file)
@@ -35,10 +35,8 @@ use Prefix;
 use strict;
 
 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));
-$main::build += $VERSION;
-$main::branch += $BRANCH;
+
+main::mkver($VERSION = q$Revision$);
 
 use vars qw ($filterbasefn $in);
 
@@ -304,11 +302,11 @@ sub install
        my $dxchan;
        my @dxchan;
        if ($name eq 'NODE_DEFAULT') {
-               @dxchan = DXChannel::get_all_nodes();
+               @dxchan = grep{$_->is_node || $_->is_aranea} DXChannel::get_all();
        } elsif ($name eq 'USER_DEFAULT') {
                @dxchan = DXChannel::get_all_users();
        } else {
-               $dxchan = DXChannel->get($name);
+               $dxchan = DXChannel::get($name);
                push @dxchan, $dxchan if $dxchan;
        }
        foreach $dxchan (@dxchan) {
index e1cb9b2801c46e72d41b4527563689b0b98b2e1a..426e23ebfe11ab5650be7ecd79320da6662161f0 100644 (file)
@@ -95,7 +95,7 @@ sub handle_ping
                        $user->set_believe($self->{call});
                        $user->put;
                }
-               my $dxchan = DXChannel->get($self->{via});
+               my $dxchan = DXChannel::get($self->{via});
                if ($dxchan) {
                        dbg("Investigate: sending PC19 for $self->{call}") if isdbg('investigate');
                        foreach my $pc (@{$self->{pcxx}}) {
index e0cfe3e549a3ea2c9a50c8e7ad75abae7c4590f0..5f9de7d72a823db72b50d20791362638e6454e02 100644 (file)
@@ -211,7 +211,7 @@ sub config
                $call = ' ' x length $call; 
                
                # recursion detector
-               if ((DXChannel->get($self->{call}) && $level > 1) || grep $self->{call} eq $_, @$seen) {
+               if ((DXChannel::get($self->{call}) && $level > 1) || grep $self->{call} eq $_, @$seen) {
                        $line .= ' ...';
                        push @out, $line;
                        return @out;
@@ -289,7 +289,7 @@ sub alldxchan
        my @dxchan;
 #      dbg("Trying node $self->{call}") if isdbg('routech');
 
-       my $dxchan = DXChannel->get($self->{call});
+       my $dxchan = DXChannel::get($self->{call});
        push @dxchan, $dxchan if $dxchan;
        
        # it isn't, build up a list of dxchannels and possible ping times 
@@ -298,7 +298,7 @@ sub alldxchan
                foreach my $p (@{$self->{parent}}) {
 #                      dbg("Trying parent $p") if isdbg('routech');
                        next if $p eq $main::mycall; # the root
-                       my $dxchan = DXChannel->get($p);
+                       my $dxchan = DXChannel::get($p);
                        if ($dxchan) {
                                push @dxchan, $dxchan unless grep $dxchan == $_, @dxchan;
                        } else {
@@ -318,7 +318,7 @@ sub dxchan
        my $self = shift;
        
        # ALWAYS return the locally connected channel if present;
-       my $dxchan = DXChannel->get($self->call);
+       my $dxchan = DXChannel::get($self->call);
        return $dxchan if $dxchan;
        
        my @dxchan = $self->alldxchan;
index 8b3f3ccef0d6bc6ad75a6f512b8e4101115557c8..a420206d5ef402a7c70f038927ab575a068fd41d 100644 (file)
@@ -115,7 +115,7 @@ sub process
        }
        while (@queue) {
                $thing = shift @queue;
-               my $dxchan = DXChannel->get($thing->{dxchan});
+               my $dxchan = DXChannel::get($thing->{dxchan});
                if ($dxchan) {
                        if ($thing->can('in_filter')) {
                                next unless $thing->in_filter($dxchan);
index d7d73f48c5ab77530c613ccc968c68205acbe031..798f0a82f98748a836ae5ccd782fde79b810b30c 100644 (file)
@@ -86,7 +86,7 @@ sub upd_user_rec
        $user = DXUser->new($call) if !$user;
        $user->homenode($parentcall) if !$user->homenode;
        $user->node($parentcall);
-       $user->lastin($main::systime) unless DXChannel->get($call);
+       $user->lastin($main::systime) unless DXChannel::get($call);
        return $user;
 }
 
index 6ad2a0ad8b3edce0dc05fdffe3a107cb99e41938..d7b3228f6b2aac52ff4602d7a6242aeeb2c6c034 100755 (executable)
@@ -377,7 +377,7 @@ sub new_channel
        # set up the basic channel info
        # is there one already connected to me - locally? 
        my $user = DXUser->get_current($call);
-       my $dxchan = DXChannel->get($call);
+       my $dxchan = DXChannel::get($call);
        if ($dxchan) {
                if ($user && $user->is_node) {
                        already_conn($conn, $call, DXM::msg($lang, 'concluster', $call, $main::mycall));
@@ -459,13 +459,13 @@ sub cease
        dbg("Local::finish error $@") if $@;
 
        # disconnect nodes
-       foreach $dxchan (DXChannel->get_all_nodes) {
+       foreach $dxchan (grep {$_->is_node || $_->is_aranea} DXChannel::get_all()) {
            $dxchan->disconnect(2) unless $dxchan == $main::me;
        }
        Msg->event_loop(100, 0.01);
 
        # disconnect users
-       foreach $dxchan (DXChannel->get_all_users) {
+       foreach $dxchan (DXChannel::get_all_users) {
                $dxchan->disconnect;
        }