From ea2c4707a526cc9746ed929e7a38d932721db624 Mon Sep 17 00:00:00 2001 From: Zoffix Znet Date: Mon, 25 Jul 2016 21:05:42 -0400 Subject: Make filters sorta work --- lib/IRC/Client.pm6 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/IRC/Client.pm6 b/lib/IRC/Client.pm6 index e0cd731..5069d31 100644 --- a/lib/IRC/Client.pm6 +++ b/lib/IRC/Client.pm6 @@ -99,10 +99,11 @@ method send-cmd ($cmd, *@args is copy, :$server) { say "About to check filter stuff `{@!filters}`"; if $cmd eq 'NOTICE'|'PRIVMSG' and @!filters and my @f = @!filters.grep({ - .signature.ACCEPTS: \(@args[0], where => @args[1]) + .signature.ACCEPTS: \(@args[1]) + or .signature.ACCEPTS: \(@args[1], where => @args[0]) }) { - say "Starting filtering: `@args[]`"; + say "Starting filtering: `@f[]`"; start { CATCH { default { warn $_; warn .backtrace } } -- cgit v1.1