Skip to content

Commit

Permalink
Sorry, put chunckby in the wrong place :(
Browse files Browse the repository at this point in the history
  • Loading branch information
ohwow committed May 3, 2010
1 parent 7154ff1 commit 3b9de11
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions bot.pl
Expand Up @@ -263,6 +263,18 @@ sub make_client {
}


sub chunkby {
my ($a,$len) = @_;
my @out = ();
while (length($a) > $len) {
push @out,substr($a,0,$len);
$a = substr($a,$len);
}
push @out, $a if ($a);
return @out;
}


# overload the IRC::Client connect method to let us defined a prebinding callback
package AnyEvent::IRC::Client::Pre;

Expand Down Expand Up @@ -295,15 +307,4 @@ sub connect {
}


sub chunkby {
my ($a,$len) = @_;
my @out = ();
while (length($a) > $len) {
push @out,substr($a,0,$len);
$a = substr($a,$len);
}
push @out, $a if ($a);
return @out;
}

1;

0 comments on commit 3b9de11

Please sign in to comment.