# HG changeset patch # User Jordi GutiƩrrez Hermoso # Date 1250119492 18000 # Node ID 6c34daa0afb05e35e397848f2a74f5d1aa277402 # Parent 34a80b4f5e34c5b005055d3c432fb2549c72172f Mimic lolling more subtly, delay lol reply diff --git a/teh-lol.pl b/teh-lol.pl --- a/teh-lol.pl +++ b/teh-lol.pl @@ -13,7 +13,7 @@ #You should have received a copy of the GNU General Public License #along with this program. If not, see . -Xchat::register('teh lol', '0.1.2', 'lols back'); +Xchat::register('teh lol', '0.1.3', 'lols back'); Xchat::hook_print('Channel Message', \&check_lol); @@ -24,9 +24,32 @@ if ($_[0][1] =~ /\b(lo+l)\b/i) { - Xchat::command("say $1") if (time - $timestamp{$chan} > 59 or - undef $timestamp{$chan} - ); + my $lol = $1; + + my $relol; + + #Mimic long lols + if (length $lol > 3 ) { + my $numos = int rand(3); + $numos += 3; + $relol = "l".("o" x $numos)."l"; + } + else { + $relol = "lol"; + } + + sleep(rand(5)); + + if (time - $timestamp{$chan} > 59 or + undef $timestamp{$chan} + ) { + + #Delay the response a little, for maximum annoyance. + sleep (rand(5)+2); + + Xchat::command("say $1"); + } + $timestamp{$chan} = time; } return Xchat::EAT_NONE;