From 03802a8644320719134817c4a510b4bfccd5390f Mon Sep 17 00:00:00 2001 From: alyptik Date: Wed, 15 Mar 2017 23:16:23 -1000 Subject: Add custom re(gex)/rep(lacement) config options --- saxrobot | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'saxrobot') diff --git a/saxrobot b/saxrobot index 8a59db6..8e8bd9f 100755 --- a/saxrobot +++ b/saxrobot @@ -88,6 +88,17 @@ sub irc_public { if ($saxcount > 0) { $irc->yield(privmsg => $channel => "🎷 " x $saxcount); } + + my $idx = 0; + for (@{$config{re}}) { + my $repcount = () = $what =~ /@{$config{re}}[$idx]/gi; + if ($repcount > 0) { + if ($repcount > 0) { + $irc->yield(privmsg => $channel => @{$config{rep}}[$idx] x $repcount); + } + $idx++; + } + return; } -- cgit v1.1