projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix all DXChannel->get to ::get
[spider.git]
/
perl
/
DXCommandmode.pm
diff --git
a/perl/DXCommandmode.pm
b/perl/DXCommandmode.pm
index 7371a8690ab781391150847d33b86d02747d0a9e..937bbfea034b21da0d447bdf95f3483a95ee9c6c 100644
(file)
--- a/
perl/DXCommandmode.pm
+++ b/
perl/DXCommandmode.pm
@@
-37,6
+37,8
@@
use DB_File;
use VE7CC;
use Thingy;
use Thingy::Dx;
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);
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);
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
#
# 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 @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;
my $ref = Route::User::get($call);
$main::me->route_pc16($main::mycall, undef, $main::routeroot, $ref) if $ref;
-
return $self;
}
return $self;
}
@@
-496,7
+498,7
@@
sub run_cmd
sub process
{
my $t = time;
sub process
{
my $t = time;
- my @dxchan = DXChannel
->
get_all();
+ my @dxchan = DXChannel
::
get_all();
my $dxchan;
foreach $dxchan (@dxchan) {
my $dxchan;
foreach $dxchan (@dxchan) {
@@
-542,6
+544,9
@@
sub disconnect
# issue a pc17 to everybody interested
$main::me->route_pc17($main::mycall, undef, $main::routeroot, $uref);
# 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";
}
} else {
confess "trying to disconnect a non existant user $call";
}
@@
-584,7
+589,7
@@
sub broadcast
my $pkg = shift; # ignored
my $s = shift; # the line to be rebroadcast
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
next unless $dxchan->{sort} eq 'U'; # only interested in user channels
next if grep $dxchan == $_, @_;
$dxchan->send($s); # send it
@@
-594,7
+599,7
@@
sub broadcast
# gimme all the users
sub get_all
{
# 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
}
# run a script for this user
@@
-890,7
+895,7
@@
sub broadcast_debug
{
my $s = shift; # the line to be rebroadcast
{
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);
}
next unless $dxchan->{enhanced} && $dxchan->{senddbg};
$dxchan->send_later('L', $s);
}