FordLawnmower commented on a Page, [Bot script] Split message if its overlimit  -  Feb 08, 2010

It cuts off because you have the outer if -- else conditions and then inside the while loop you have an if with no else so the remainder of that drops through the last "> 452 if" is lost without being sent to the channel.
You should be able to fix it by removing the outer if else and just letting the script message the remaining text when it drops out of the while loop.

alias msg {
  var %channel $1, %x 1, %msgnum 1
  tokenize 32 $2-
  while (%x <= $0) {
    if ($len($($+($,%msgnum,-,%x),2)) > 452) {
      msg %channel $($+($,%msgnum,-,$calc(%x - 1)),2)
      var %msgnum %x
    }
    inc %x
  }
  msg %channel $($+($,%msgnum,-,$calc(%x - 1)),2)
}
 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.