aboutsummaryrefslogtreecommitdiff
path: root/lib/IRC/Client.pm6
diff options
context:
space:
mode:
authorZoffix Znet <cpan@zoffix.com>2016-06-05 21:39:47 -0400
committerZoffix Znet <cpan@zoffix.com>2016-06-05 21:39:47 -0400
commit140959e4f170d732d990e69b9a0ca129b89e3ac4 (patch)
treec96d92c8eba8af28eea21585c1c0e5c8a18f69d7 /lib/IRC/Client.pm6
parent16056e8af837a4d982d23728adf24b4cc406576c (diff)
First working test
Diffstat (limited to 'lib/IRC/Client.pm6')
-rw-r--r--lib/IRC/Client.pm68
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/IRC/Client.pm6 b/lib/IRC/Client.pm6
index 96580cf..cacd7c1 100644
--- a/lib/IRC/Client.pm6
+++ b/lib/IRC/Client.pm6
@@ -37,14 +37,14 @@ method run {
"USER $!username $!username $!host :$!userreal",
:server($s-name);
+ my $left-overs = '';
react {
CATCH { warn .backtrace }
whenever $s-conf<sock>.Supply :bin -> $buf is copy {
- state $left-overs = '';
my $str = try $buf.decode: 'utf8';
$str or $str = $buf.decode: 'latin-1';
- $str = $left-overs ~ $str;
+ $str = ($left-overs//'') ~ $str;
(my $events, $left-overs)
= self!parse: $str, :server($s-name);
@@ -84,8 +84,8 @@ method !handle-event ($e) {
}
when 'PING' { $e.reply }
when 'JOIN' {
- say "Joined channel $e.channel()"
- if $e.nick eq %!servers{ $e.server }<nick>;
+ # say "Joined channel $e.channel() on $e.server()"
+ # if $e.nick eq %!servers{ $e.server }<nick>;
}
}