+ # set our data (manually 'cos we only have a psuedo channel [at the moment])
+ my $hops = $self->get_hops();
+ $self->send("PC19^1^$main::mycall^0^$DXProt::myprot_version^$hops^");
+
+ # get all the local users and send them out
+ my @list;
+ for (@list = DXCommandmode::get_all(); @list; ) {
+ @list = $self->pc16(@list);
+ my $out = shift @list;
+ $self->send($out);
+ }
+ $self->send($self->pc22());
+ last SWITCH;
+ }
+ if ($pcno == 21) {last SWITCH;}
+ if ($pcno == 22) {last SWITCH;}
+ if ($pcno == 23) {last SWITCH;}
+ if ($pcno == 24) {last SWITCH;}
+ if ($pcno == 25) {last SWITCH;}
+ if ($pcno == 26) {last SWITCH;}
+ if ($pcno == 27) {last SWITCH;}
+ if ($pcno == 28) {last SWITCH;}
+ if ($pcno == 29) {last SWITCH;}
+ if ($pcno == 30) {last SWITCH;}
+ if ($pcno == 31) {last SWITCH;}
+ if ($pcno == 32) {last SWITCH;}
+ if ($pcno == 33) {last SWITCH;}
+ if ($pcno == 34) {last SWITCH;}
+ if ($pcno == 35) {last SWITCH;}
+ if ($pcno == 36) {last SWITCH;}
+ if ($pcno == 37) {last SWITCH;}
+ if ($pcno == 38) {last SWITCH;}
+ if ($pcno == 39) {last SWITCH;}
+ if ($pcno == 40) {last SWITCH;}
+ if ($pcno == 41) {last SWITCH;}
+ if ($pcno == 42) {last SWITCH;}
+ if ($pcno == 43) {last SWITCH;}
+ if ($pcno == 44) {last SWITCH;}
+ if ($pcno == 45) {last SWITCH;}
+ if ($pcno == 46) {last SWITCH;}
+ if ($pcno == 47) {last SWITCH;}
+ if ($pcno == 48) {last SWITCH;}
+ if ($pcno == 49) {last SWITCH;}
+ if ($pcno == 50) {last SWITCH;}
+ if ($pcno == 51) {last SWITCH;}
+ }
+
+ # if get here then rebroadcast the thing with its Hop count decremented (if
+ # the is one). If it has a hop count and it decrements to zero then don't
+ # rebroadcast it.
+ #
+ # NOTE - don't arrive here UNLESS YOU WANT this lump of protocol to be
+ # REBROADCAST!!!!
+ #
+
+ my $hopfield = pop @field;
+ push @field, $hopfield;
+
+ if ($hopfield =~ /H\d\d./o) {
+ my ($hops) = $hopfield =~ /H(\d+)/o;
+ $hops--;
+ if ($hops > 0) {
+ $line =~ s/\^H\d+(\^\~.)$/\^H$hops$1/; # change the hop count
+ DXProt->broadcast($line, $self); # send it to everyone but me
+ }
+ }