projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
change Aliases to allow other cmds for ^q.*
[spider.git]
/
perl
/
Route
/
User.pm
diff --git
a/perl/Route/User.pm
b/perl/Route/User.pm
index 3dfb18cec3069c0ddc99e2d47e116023cad10c3f..0cd170299f482243af45b801d767376d48d6bdda 100644
(file)
--- a/
perl/Route/User.pm
+++ b/
perl/Route/User.pm
@@
-3,13
+3,14
@@
#
# Copyright (c) 2001 Dirk Koopman G1TLH
#
#
# Copyright (c) 2001 Dirk Koopman G1TLH
#
-#
$Id$
+#
#
package Route::User;
use DXDebug;
use Route;
#
package Route::User;
use DXDebug;
use Route;
+use DXUtil;
use strict;
use strict;
@@
-18,6
+19,7
@@
use vars qw(%list %valid @ISA $max $filterdef);
%valid = (
parent => '0,Parent Calls,parray',
%valid = (
parent => '0,Parent Calls,parray',
+ ip => '0,IP Address',
);
$filterdef = $Route::filterdef;
);
$filterdef = $Route::filterdef;
@@
-43,12
+45,16
@@
sub new
my $call = uc shift;
my $ncall = uc shift;
my $flags = shift;
my $call = uc shift;
my $ncall = uc shift;
my $flags = shift;
+ my $ip = shift;
+
confess "already have $call in $pkg" if $list{$call};
my $self = $pkg->SUPER::new($call);
$self->{parent} = [ $ncall ];
confess "already have $call in $pkg" if $list{$call};
my $self = $pkg->SUPER::new($call);
$self->{parent} = [ $ncall ];
- $self->{flags} = $flags;
+ $self->{flags} = $flags || Route::here(1);
+ $self->{ip} = $ip if defined $ip;
$list{$call} = $self;
$list{$call} = $self;
+ dbg("CLUSTER: user $call added") if isdbg('cluster');
return $self;
}
return $self;
}
@@
-62,9
+68,11
@@
sub del
{
my $self = shift;
my $pref = shift;
{
my $self = shift;
my $pref = shift;
+ my $call = $self->{call};
$self->delparent($pref);
unless (@{$self->{parent}}) {
$self->delparent($pref);
unless (@{$self->{parent}}) {
- delete $list{$self->{call}};
+ delete $list{$call};
+ dbg("CLUSTER: user $call deleted") if isdbg('cluster');
return $self;
}
return undef;
return $self;
}
return undef;
@@
-91,6
+99,8
@@
sub delparent
return $self->_dellist('parent', @_);
}
return $self->_dellist('parent', @_);
}
+
+
#
# generic AUTOLOAD for accessors
#
#
# generic AUTOLOAD for accessors
#