Browse files

Merge pull request #2 from moritz/master

Fix for newest Rakudo
  • Loading branch information...
2 parents d4b32f3 + 3169a8c commit 99e638df1ec548aab32d1e6f756301400f487237 @TiMBuS committed Aug 3, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/Net/IRC/Event.pm
View
4 lib/Net/IRC/Event.pm
@@ -20,9 +20,9 @@ class Net::IRC::Event {
#I'm going with 480, as 510 seems to get cut off on some servers.
my $prepend = "PRIVMSG $to :";
- my $maxlen = 480-$prepend.bytes;
+ my $maxlen = 480-$prepend.encode.bytes;
for $text.split(/\c13?\c10/) -> $line is rw {
- while $line.bytes > $maxlen {
+ while $line.encode.bytes > $maxlen {
#Break up the line using a nearby space if possible.
my $index = $line.rindex(" ", $maxlen) || $maxlen;
$.conn.sendln($prepend~$line.substr(0, $index));

0 comments on commit 99e638d

Please sign in to comment.