summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorbw12017-03-11 22:38:33 +0100
committerbw12017-03-17 14:23:00 +0100
commit5ca0f825df0c593050851929b11850ce0e50b08d (patch)
tree9bf8e592c698581df2829eae3f8e51884d445bb5 /scripts
parent75a8b37c37a0545abd5e09b35995ccccc2e04edc (diff)
downloadscripts.irssi.org-5ca0f825df0c593050851929b11850ce0e50b08d.tar.bz2
[hitcount] unload
Diffstat (limited to 'scripts')
-rw-r--r--scripts/hitcount.pl6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/hitcount.pl b/scripts/hitcount.pl
index df87f6c..f0acfcc 100644
--- a/scripts/hitcount.pl
+++ b/scripts/hitcount.pl
@@ -149,12 +149,16 @@ sub read_settings {
$last_refresh = $time;
- #Irssi::timeout_remove(my $refresh_tag) if (my $refresh_tag);
+ Irssi::timeout_remove($refresh_tag) if ($refresh_tag);
$refresh_tag = Irssi::timeout_add($time*1000, 'refresh_hitcount', undef);
refresh_hitcount();
}
+sub UNLOAD {
+ Irssi::timeout_remove($refresh_tag) if ($refresh_tag);
+}
+
# default values
Irssi::settings_add_str('misc', 'hitcount_regexp', $regexp);
Irssi::settings_add_int('misc', 'hitcount_refresh', $refresh);