diff options
Diffstat (limited to 'lib/IRC/Client.pm6')
-rw-r--r-- | lib/IRC/Client.pm6 | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/IRC/Client.pm6 b/lib/IRC/Client.pm6 index 8c0b2c1..49d1cff 100644 --- a/lib/IRC/Client.pm6 +++ b/lib/IRC/Client.pm6 @@ -2,9 +2,10 @@ use v6; use IRC::Parser; # parse-irc use IRC::Client::Plugin::PingPong; use IRC::Client::Plugin; -class IRC::Client:ver<2.001001> { +class IRC::Client:ver<2.002001> { has Bool:D $.debug = False; has Str:D $.host = 'localhost'; + has Str:D $.password; has Int:D $.port where 0 <= $_ <= 65535 = 6667; has Str:D $.nick = 'Perl6IRC'; has Str:D $.username = 'Perl6IRC'; @@ -23,6 +24,7 @@ class IRC::Client:ver<2.001001> { await IO::Socket::Async.connect( $!host, $!port ).then({ $!sock = .result; + $.ssay("PASS $!password\n") if $!password.defined; $.ssay("NICK $!nick\n"); $.ssay("USER $!username $!username $!host :$!userreal\n"); $.ssay("JOIN {@!channels[]} x\n"); |