From 3ce55a107e23106919d1e389b0027030b7161f44 Mon Sep 17 00:00:00 2001 From: Zoffix Znet Date: Fri, 29 Jul 2016 08:31:21 -0400 Subject: Use better BUILD --- lib/IRC/Client.pm6 | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/IRC/Client.pm6 b/lib/IRC/Client.pm6 index ea03269..524a680 100644 --- a/lib/IRC/Client.pm6 +++ b/lib/IRC/Client.pm6 @@ -26,11 +26,10 @@ my &colored = try { } // sub (Str $s, $) { $s }; submethod BUILD ( - :@!filters, - :@!plugins, Int:D :$!debug = 0, - - :%servers is copy, + :$filters = (), + :$plugins = (), + :$servers = {}, Int:D :$port where 0 <= $_ <= 65535 = 6667, Str :$password, Str:D :$host = 'localhost', @@ -40,6 +39,10 @@ submethod BUILD ( Str:D :$userreal = 'Perl6 IRC Client', Str:D :$channels = ['#perl6'], ) { + @!filters = @$filters; + @!plugins = @$plugins; + my %servers = %$servers; + my %all-conf = :$port, :$password, :$host, :$nick, :$username, :$userhost, :$userreal, :$channels; -- cgit v1.1