$user->wantdxitu(0) unless defined $user->{wantdxitu};
$user->wantusstate(0) unless defined $user->{wantusstate};
- # sort out registration
- if ($main::reqreg == 1) {
- $self->{registered} = $user->registered;
- } elsif ($main::reqreg == 2) {
+ # sort out registration (who wanted 2???) Note registration *could* be used even when reqreg == 0
+ if ($main::reqreg == 2) {
$self->{registered} = !$user->registered;
} else {
- $self->{registered} = 1;
+ $self->{registered} = $user->registered;
}
# send the relevant MOTD
my $self = shift;
my $motd;
- unless ($self->{registered}) {
+ unless ($self->registered) {
$motd = "${main::motd}_nor_$self->{lang}";
$motd = "${main::motd}_nor" unless -e $motd;
}
}
$self->send_file($motd) if -e $motd;
}
+
+sub registered
+{
+ my $self = shift;
+
+ # the sysop is registered!
+ return 1 if $self->call eq $main::myalias || $self->call eq $main::mycall;
+
+ if ($main::reqreg) {
+ return $self->{registered};
+ } else {
+ return 1;
+ }
+}
+
1;
__END__