move isregistered to DXChannel.pm
authorDirk Koopman <djk@tobit.co.uk>
Thu, 9 Dec 2021 12:02:07 +0000 (12:02 +0000)
committerDirk Koopman <djk@tobit.co.uk>
Thu, 9 Dec 2021 12:02:07 +0000 (12:02 +0000)
to allow people to announce themselves in cron..

Changes
perl/DXChannel.pm

diff --git a/Changes b/Changes
index 35ec0ef1111ee3b373c2256bddd467d9b694e41f..85ec11cf12d021e96da763220679ebf1840d47a8 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,16 +1,18 @@
-08Nov21=======================================================================
+09Dec21=======================================================================
+1. Moved isregistered to DXChannel for safety...
+08Dec21=======================================================================
 1. Get to the bottom of why ssid'd calls were using the base call's 
    credentials. This should now work as expected. 
-06Nov21=======================================================================
+06Dec21=======================================================================
 1. Improve console.pl scrolling. Split long lines (eg on announcements.
-04Nov21=======================================================================
+04Dec21=======================================================================
 1. Fix illogicalities in USDB creations and make sure that O_CREAT on tie does
    NOT encounter an existing file to barf about. Even though it shouldn't.
    Thanks Howard WB3FFV.
 2. Fixed a typo in show/registered that prevents a list of callsigns being
-   searched for. Got rid of some over complex code. Thnake Fabrizio iZ0UIN. 
+   searched for. Got rid of some over complex code. Thanks Fabrizio iZ0UIN. 
 3. Fix long line wrapping in console.pl
-03Nov21=======================================================================
+03Dec21=======================================================================
 1. Move motd and issue files to local_data if not already there.
 30Nov21=======================================================================
 1. Fix sh/dx with callsigns that have /p or VE/G1TLH in them.
index f5fc6eb26c4f792b6ff50acb08051ef2aa3df652..9d6b33a16743a213d26d7e4e503af48b3263aaa9 100644 (file)
@@ -765,6 +765,20 @@ sub error_handler
 }
 
 
+sub isregistered
+{
+       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;
+       }
+}
+
 #no strict;
 sub AUTOLOAD
 {