Created
March 15, 2017 23:49
-
-
Save Stevie-O/4912d6c1177097b6195f7532237023e2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use strict; | |
use warnings; | |
use Irssi qw/settings_add_int settings_get_int settings_set_int signal_add/; | |
use constant { LESS_THAN_10 => "less_than_10" }; | |
# test case based on pushover.pl | |
# https://github.com/hansnielsen/irssi-scripts/blob/108490bd3d2ad6a1b91ca58e5f866d01b64a9962/pushover.pl | |
sub sig_setup_changed { | |
if (settings_get_int(LESS_THAN_10) >= 10) { | |
settings_set_int(LESS_THAN_10, 9); | |
} | |
} | |
settings_add_int('test', LESS_THAN_10, 5); | |
signal_add('setup changed', \&sig_setup_changed); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment