X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=perl%2FDXCommandmode.pm;h=02164669eeef0e319206de79b58ea46d3b3e4543;hb=bcf099764f49e68ef016964e420b906e7900623e;hp=7371a8690ab781391150847d33b86d02747d0a9e;hpb=5764cc1c0f79b56fdf5389d2b0dcb2ab7e54723d;p=spider.git diff --git a/perl/DXCommandmode.pm b/perl/DXCommandmode.pm index 7371a869..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"; }