]> git.99rst.org Git - irssi-scripts.irssi.org.git/commitdiff
[trigger.pl] Added expando for own nick on the server where trigger was triggered
authorJari Matilainen <redacted>
Tue, 24 Mar 2020 16:19:55 +0000 (17:19 +0100)
committerGitHub <redacted>
Tue, 24 Mar 2020 16:19:55 +0000 (17:19 +0100)
* Added expando for own nick on the server where trigger was triggered

* bump version

scripts/trigger.pl

index c6bcf33fed2afcac3ca7f872f932cfb7d3ff2b46..c6f619f1601cef1b9305f729a736bd7509f3c0ce 100644 (file)
@@ -23,7 +23,7 @@ use Text::ParseWords;
 use IO::File;
 use vars qw($VERSION %IRSSI);
 
-$VERSION = '1.2.3';
+$VERSION = '1.2.4';
 %IRSSI = (
        authors     => 'Wouter Coekaerts',
        contact     => 'wouter@coekaerts.be',
@@ -31,7 +31,7 @@ $VERSION = '1.2.3';
        description => 'execute a command or replace text, triggered by an event in irssi',
        license     => 'GPLv2 or later',
        url         => 'http://wouter.coekaerts.be/irssi/',
-       changed     => '2020-01-10',
+       changed     => '2020-03-10',
 );
 
 sub cmd_help {
@@ -90,6 +90,7 @@ All filters except for -pattern and -regexp can also be inversed by prefixing wi
                 %|The following variables are also expanded:
                    $T: %|Server tag
                    $C: %|Channel name
+                   $O: %|Your nick
                    $N: %|Nickname of the person who triggered this command
                    $A: %|His address (foo@bar.com),
                    $I: %|His ident (foo)
@@ -600,6 +601,7 @@ TRIGGER:
                $expands->{'M'} = $message,;
                $expands->{'T'} = (defined($server)) ? $server->{'tag'} : '';
                $expands->{'C'} = $channelname;
+               $expands->{'O'} = (defined($server)) ? $server->{'nick'} : '';
                $expands->{'N'} = $nickname;
                $expands->{'A'} = $address;
                $expands->{'I'} = ((!defined($address)) ? '' : substr($address,0,index($address,'@')));
git clone https://git.99rst.org/PROJECT