X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=perl%2FDXCommandmode.pm;h=02164669eeef0e319206de79b58ea46d3b3e4543;hb=4d22d5fd3874e8292d82f84a777b99ff7d10402a;hp=e207b0df6da8515666e2e34720c9dbcbe72d3cc3;hpb=56acf117e704090501056412d10b62664ed94825;p=spider.git diff --git a/perl/DXCommandmode.pm b/perl/DXCommandmode.pm index e207b0df..02164669 100644 --- a/perl/DXCommandmode.pm +++ b/perl/DXCommandmode.pm @@ -37,6 +37,8 @@ use DB_File; use VE7CC; use Thingy; use Thingy::Dx; +use Thingy::Hello; +use Thingy::Bye; use strict; use vars qw(%Cache %cmd_cache $errstr %aliases $scriptbase $maxerrors %nothereslug $maxbadcount $msgpolltime); @@ -52,10 +54,8 @@ $msgpolltime = 3600; # the time between polls for new messages 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$); # # obtain a new connection this is derived from dxchannel @@ -71,9 +71,11 @@ sub new my @rout = $main::routeroot->add_user($call, Route::here(1)); # ALWAYS output the user + my $thing = Thingy::Hello->new(user => $call); + $thing->broadcast($self); + my $ref = Route::User::get($call); $main::me->route_pc16($main::mycall, undef, $main::routeroot, $ref) if $ref; - return $self; } @@ -542,6 +544,9 @@ sub disconnect # issue a pc17 to everybody interested $main::me->route_pc17($main::mycall, undef, $main::routeroot, $uref); + + my $thing = Thingy::Bye->new(user=>$call); + $thing->broadcast($self); } else { confess "trying to disconnect a non existant user $call"; }