From dc209721243f1e2d3838fa59e5a20b60e97c0896 Mon Sep 17 00:00:00 2001 From: wowaname Date: Mon, 17 Apr 2017 10:49:10 +0000 Subject: [PATCH] fuckyou.pl: unhook timer/signal if already hooked --- scripts/fuckyou.pl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/fuckyou.pl b/scripts/fuckyou.pl index 754a8f0..c2c4fca 100644 --- a/scripts/fuckyou.pl +++ b/scripts/fuckyou.pl @@ -75,10 +75,11 @@ sub cmd_fuckyou weechat::config_get_plugin('furry'), weechat::config_get_plugin('parallel')); + weechat::unhook($signal) if $signal; + weechat::unhook($timer) if $timer; + unless ($target) { - weechat::print($buffer, 'Stopping any current /fuckyou'); - weechat::unhook($signal) if $signal; - weechat::unhook($timer) if $timer; + weechat::print($buffer, 'Stopped any current /fuckyou'); return weechat::WEECHAT_RC_OK; } $amt_end //= 0;