Permalink
Browse files

remove deprecated/broken usage of Str.bytes

  • Loading branch information...
1 parent d4b32f3 commit 3169a8ce414c446efe0dda31896d6dc6afb6aac7 @moritz moritz committed Aug 2, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/Net/IRC/Event.pm
View
@@ -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 3169a8c

Please sign in to comment.