From: Vincent Pit Date: Fri, 20 Nov 2015 15:32:41 +0000 (-0200) Subject: Better phrasing for the delayed clone announce X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=b87fc463b2f4f807fc7860438eed18a00f5c0e12;p=perl%2Fscripts%2Fxchat.git Better phrasing for the delayed clone announce --- diff --git a/clones.pl b/clones.pl index fded636..46ca4d6 100755 --- a/clones.pl +++ b/clones.pl @@ -188,15 +188,13 @@ hook_server 'JOIN', sub { my $clones = add $nick, host($userhost), $serv, $chan; return EAT_NONE unless $clones > 0; - local_context $chan, $serv => sub { + my $printer = sub { print $ph clone_enter_str $userhost, $nick, $clones; 1 - } or do { - delay JOIN_DELAY, sub { - local_context $chan, $serv => sub { - print $ph clone_enter_str $userhost, $nick, $clones; - } - } + }; + + local_context $chan, $serv, $printer or delay JOIN_DELAY, sub { + local_context $chan, $serv, $printer; }; return EAT_NONE;