--- /dev/null
+#
+# Add a believable node - used to filter nodes as being believable
+#
+# Copyright (c) 2004 - Dirk Koopman
+#
+# $Id$
+#
+
+my ($self, $line) = @_;
+my @args = split /\s+/, uc $line;
+my $call;
+my $node = shift @args;
+my @out;
+my @nodes;
+
+return (1, $self->msg('e5')) if $self->priv < 6;
+return (1, $self->msg('e22', $node)) unless is_callsign($node);
+my $user = DXUser->get_current($node);
+return (1, $self->msg('e13', $node)) unless $user->is_node;
+
+foreach $call (@args) {
+ return (1, $self->msg('e22', $node)) unless is_callsign($call);
+
+ my $u = DXUser->get_current($call);
+ if ($u->is_node) {
+ push @nodes, $call;
+ } else {
+ push @out, $self->msg('e13', $call);
+ }
+}
+
+foreach $call (@nodes) {
+ $user->set_believe($call);
+ push @out, $self->msg('believes', $call, $node);
+}
+$user->put if @nodes;
+
+return (1, @out);
--- /dev/null
+#
+# Add a believable node - used to filter nodes as being believable
+#
+# Copyright (c) 2004 - Dirk Koopman
+#
+# $Id$
+#
+
+my ($self, $line) = @_;
+my @args = split /\s+/, uc $line;
+my $call;
+my $node = shift @args;
+my @out;
+my @nodes;
+
+return (1, $self->msg('e5')) if $self->priv < 6;
+return (1, $self->msg('e22', $node)) unless is_callsign($node);
+my $user = DXUser->get_current($node);
+return (1, $self->msg('e13', $node)) unless $user->is_node;
+
+foreach $call (@args) {
+ return (1, $self->msg('e22', $node)) unless is_callsign($call);
+
+ my $u = DXUser->get_current($call);
+ push @nodes, $call;
+}
+
+foreach $call (@nodes) {
+ $user->unset_believe($call);
+ push @out, $self->msg('believeu', $call, $node);
+}
+$user->put if @nodes;
+
+return (1, @out);
prompt => '0,Required Prompt',
version => '1,Version',
build => '1,Build',
+ believe => '1,Believable nodes,parray',
);
#no strict;
my $self = shift;
delete $self->{passphrase};
}
+
+sub set_believe
+{
+ my $self = shift;
+ my $call = uc shift;
+ $self->{believe} ||= [];
+ push @{$self->{believe}}, $call;
+}
+
+sub unset_believe
+{
+ my $self = shift;
+ my $call = uc shift;
+ if (exists $self->{believe}) {
+ $self->{believe} = [grep {$_ ne $call} @{$self->{believe}}];
+ delete $self->{believe} unless @{$self->{believe}};
+ }
+}
1;
__END__
bbs => 'Your BBS Address is now \"$_[0]\"',
beepoff => 'Beeps are now off',
beepon => 'Beeps are now on',
+ believes => 'Believe node $_[0] via $_[1]',
+ believeu => 'Don\'t believe node $_[0] via $_[1]',
call1 => 'Callsign lookup via $_[0]:',
conother => 'Sorry $_[0] you are connected to me on another port',
concluster => 'Sorry $_[0] you are already connected elsewhere on the cluster (on $_[1])',