]> git.99rst.org Git - irssi-scripts.irssi.org.git/commitdiff
[print_signals] remove signals that cannot be enumerated
authorbw1 <redacted>
Tue, 2 Nov 2021 22:29:03 +0000 (23:29 +0100)
committermartin f. krafft <redacted>
Wed, 3 Nov 2021 21:37:04 +0000 (22:37 +0100)
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.

scripts/print_signals.pl

index fb795fb9de720c840d1b6f364deeb4551d4424d2..04a94a6f33f3da13e686a3b4ff2a921974c561e4 100644 (file)
@@ -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;
git clone https://git.99rst.org/PROJECT