Mercurial > hg > scripts
changeset 26:8046522db032 default tip
Fix lol counting on highlight messages
author | Jordi Gutiérrez Hermoso <jordigh@octave.org> |
---|---|
date | Wed, 07 Dec 2011 16:47:54 -0500 |
parents | 0ca9319b0d7f |
children | |
files | teh-lol.pl |
diffstat | 1 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/teh-lol.pl +++ b/teh-lol.pl @@ -23,6 +23,7 @@ #Report lol combos Xchat::hook_print('Channel Message', \&check_combo); +Xchat::hook_print('Channel Msg Hilight', \&check_combo); Xchat::hook_print('Your Message', \&check_combo); my %timestamp; @@ -78,7 +79,7 @@ $relol = "l".($midlol x $repeat_mid)."l"; } else { - $relol = "lol"; + $relol = $lol; } @@ -117,7 +118,11 @@ my $chan = Xchat::get_info("channel"); my $loller = $_[0][0]; my $msg = $_[0][1]; - my $islol = $msg =~ /^\s*l((o|(?<!l)lo)+)l\b/i; + my $nick = Xchat::get_info("nick"); + + ## Allow "lol stuff" and e.g. "JordiGH: lol stuff" to be part of a + ## lolcombo + my $islol = $msg =~ /^\s*($nick)?.?\s*l((o|(?<!l)lo)+)l\b/i; if(not $islol) { my $combo = $combo_count{$chan};