From: bw1 Date: Tue, 2 Nov 2021 22:29:03 +0000 (+0100) Subject: [print_signals] remove signals that cannot be enumerated X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=60a57edab2ef2077c3207cfbc24b74bcfe8718d3;p=irssi-scripts.irssi.org.git [print_signals] remove signals that cannot be enumerated Irssi supports signals like "command ping", but there is no real way to enumerate all the possible signals for all the valid IRC commands, so it's better to remove the handler for those. --- diff --git a/scripts/print_signals.pl b/scripts/print_signals.pl index fb795fb..04a94a6 100644 --- a/scripts/print_signals.pl +++ b/scripts/print_signals.pl @@ -47,7 +47,7 @@ $VERSION = '1.1'; authors => 'martin f. krafft', contact => 'madduck@madduck.net', name => 'print signals debugger', - description => 'hooks into every signal and writes the information provided to a file', + description => 'hooks into almost every signal and writes the information provided to a file', license => 'MIT', changed => '2021-09-20' ); @@ -299,6 +299,7 @@ sub load { foreach my $sigline (split(/\n/, $signals)) { my ($sig, @args) = split(/, /, $sigline); $sig =~ y/"//d; + next if ( $sig =~ m/<.*>/ ); my $handler = sub { signal_handler($sig, \@args, \@_); }; Irssi::signal_add_first($sig, $handler); $handlers{$sig} = $handler;