%fresult=();
# tables
- return unless (defined $ftext);
+ unless (defined $ftext) {
+ %fresult=('Error'=>[['no data']]);
+ return;
+ }
my $dom = Mojo::DOM->new($ftext);
foreach my $tbl ( $dom->find('table')->each ) {
$s="Error: results ($count)";
}
Irssi::print("selfcheck: $s");
- my $schs_version = $Irssi::Script::selfcheckhelperscript::VERSION;
- Irssi::command("selfcheckhelperscript $s") if ( defined $schs_version );
+ my $schs = exists $Irssi::Script::{'selfcheckhelperscript::'};
+ Irssi::command("selfcheckhelperscript $s") if ( $schs );
}
sub sig_setup_changed {