diff --git a/hexchat-notification.pl b/hexchat-notification.pl index 69cf03b..c5f93b4 100644 --- a/hexchat-notification.pl +++ b/hexchat-notification.pl @@ -29,10 +29,17 @@ sub hookfn { $text =~ s/\"/\\"/g; my $topic = sprintf("%s at %s says:\n", $nick, $channel); $active = 1; - threads->create(\¬ify, $topic, $text)->detach; + my $t = undef; + + do { + $t = threads->create(\¬ify, $topic, $text); + sleep 1 unless(defined($t)); + } unless (defined($t)); + + $t->detach; if ($active == 1) { - hook_timer( 100, \&timeraction); + hook_timer( 500, \&timeraction); } return EAT_NONE;