fuckyou.pl: unhook timer/signal if already hooked

This commit is contained in:
wowaname 2017-04-17 10:49:10 +00:00
parent 68dd36f20e
commit dc20972124

View File

@ -75,10 +75,11 @@ sub cmd_fuckyou
weechat::config_get_plugin('furry'), weechat::config_get_plugin('furry'),
weechat::config_get_plugin('parallel')); weechat::config_get_plugin('parallel'));
unless ($target) {
weechat::print($buffer, 'Stopping any current /fuckyou');
weechat::unhook($signal) if $signal; weechat::unhook($signal) if $signal;
weechat::unhook($timer) if $timer; weechat::unhook($timer) if $timer;
unless ($target) {
weechat::print($buffer, 'Stopped any current /fuckyou');
return weechat::WEECHAT_RC_OK; return weechat::WEECHAT_RC_OK;
} }
$amt_end //= 0; $amt_end //= 0;