]> git.99rst.org Git - irssi-scripts.irssi.org.git/commitdiff
trigger.pl: fix some bugs
authorDoug Freed <redacted>
Wed, 9 May 2018 19:46:00 +0000 (15:46 -0400)
committerGitHub <redacted>
Wed, 9 May 2018 19:46:00 +0000 (15:46 -0400)
* Quits don't have channel parameters, so move the type to the right list
* Fix deleting filters by /trigger change so it actually works

scripts/trigger.pl

index 0b05ad9f9766a6d9c9a0564e34de8a33d4f58f6c..68d0e31e0a75512a82dff19021243b1943bb0e0b 100644 (file)
@@ -23,7 +23,7 @@ use Text::ParseWords;
 use IO::File;
 use vars qw($VERSION %IRSSI);
 
-$VERSION = '1.2';
+$VERSION = '1.2.1';
 %IRSSI = (
        authors     => 'Wouter Coekaerts',
        contact     => 'wouter@coekaerts.be',
@@ -162,9 +162,9 @@ Irssi::theme_register([
 #########################################
 
 # trigger types with a message and a channel
-my @allchanmsg_types = qw(publics pubactions pubnotices pubctcps pubctcpreplies parts quits kicks topics);
+my @allchanmsg_types = qw(publics pubactions pubnotices pubctcps pubctcpreplies parts kicks topics);
 # trigger types with a message
-my @allmsg_types = (@allchanmsg_types, qw(privmsgs privactions privnotices privctcps privctcpreplies dcc_msgs dcc_actions dcc_ctcps));
+my @allmsg_types = (@allchanmsg_types, qw(privmsgs privactions privnotices privctcps privctcpreplies dcc_msgs dcc_actions dcc_ctcps quits));
 # trigger types with a channel
 my @allchan_types = (@allchanmsg_types, qw(mode_channel mode_nick joins invites pubflood));
 # trigger types in -all
@@ -1132,7 +1132,7 @@ ARGS:     for (my $arg = shift @args; $arg; $arg = shift @args) {
                
                # -no<filter>
                if ($option =~ /^no(.*)$/ && $filters{$1}) {
-                       delete $trigger->{'filters'}->{$option};
+                       delete $trigger->{'filters'}->{$1};
                }
        }
        
git clone https://git.99rst.org/PROJECT