# HG changeset patch # User Jordi GutiƩrrez Hermoso # Date 1315510171 18000 # Node ID 77444d749997f216967f707362df81bc62837a9f # Parent 8ebcdfa03782ccc9ea1582d7d4af4e3d4d7b4ca0 Use more meaningful variables names because jlf complained diff --git a/teh-lol.pl b/teh-lol.pl --- a/teh-lol.pl +++ b/teh-lol.pl @@ -28,6 +28,8 @@ my %timestamp; sub update_tstamp{ + my @xchat_args = $_[0]; + my $msg = $xchat_args[1]; if( $_[0][1] eq "lol" ){ my $chan = Xchat::get_info("channel"); $timestamp{$chan} = time; @@ -46,14 +48,18 @@ } sub check_lol { + my @xchat_args = $_[0]; + my $chatter = $xchat_args[0]; + my $msg = $xchat_args[1]; + my $chan = Xchat::get_info("channel"); my $timesince_lasttalk = time - Xchat::user_info -> {'lasttalk'}; ## Chatter name without possible colour codes - my $chatter = Xchat::strip_code($_[0][0]); + $chatter = Xchat::strip_code($chatter); #Match stuff like "lol", "loool" and "lololol" - if ($_[0][1] =~ /\b(l((o|(?