]> git.99rst.org Git - irssi-scripts.irssi.org.git/commitdiff
Do not store version reference in %IRSSI/$VERSION
authormartin f. krafft <redacted>
Mon, 20 Sep 2021 02:35:50 +0000 (04:35 +0200)
committermartin f. krafft <redacted>
Mon, 20 Sep 2021 02:43:14 +0000 (04:43 +0200)
Signed-off-by: martin f. krafft <redacted>
scripts/ctrlact.pl

index 90c9d7bc22e1390605ce77c9f415ea93d4a2d6ca..1a59bf644470cb762cc1496a64176087f0aab75a 100644 (file)
@@ -121,8 +121,6 @@ use Irssi;
 use Text::ParseWords;
 use version;
 
-our $VERSION = version->parse('1.5');
-
 our %IRSSI = (
     authors     => 'martin f. krafft',
     contact     => 'madduck@madduck.net',
@@ -130,10 +128,13 @@ our %IRSSI = (
     description => 'allows per-channel control over activity indication',
     license     => 'MIT',
     url         => 'https://github.com/irssi/scripts.irssi.org/blob/master/scripts/ctrlact.pl',
-    version     => $VERSION,
+    version     => '1.5',
     changed     => '2021-09-20'
 );
 
+our $VERSION = $IRSSI{version};
+my $_VERSION = version->parse($VERSION);
+
 ### DEFAULTS AND SETTINGS ######################################################
 
 my @DATALEVEL_KEYWORDS = ('all', 'messages', 'hilights', 'none');
@@ -646,7 +647,7 @@ sub save_mappings {
        my $ftc = from_data_level($fallback_channel_threshold);
        my $ftq = from_data_level($fallback_query_threshold);
        print FH <<"EOF";
-# ctrlact mappings file (version: $VERSION)
+# ctrlact mappings file (version: $_VERSION)
 #
 # WARNING: this file will be overwritten on /save,
 # use "/set ctrlact_autosave off" to avoid.
@@ -945,7 +946,7 @@ sub UNLOAD {
 sub cmd_help {
        my ($data, $server, $item) = @_;
        Irssi::print (<<"SCRIPTHELP_EOF", MSGLEVEL_CLIENTCRAP);
-%_ctrlact $VERSION - fine-grained control of activity indication%_
+%_ctrlact $_VERSION - fine-grained control of activity indication%_
 
 %U%_Synopsis%_%U
 
git clone https://git.99rst.org/PROJECT