Warning with last 3 words on channel/server character maximum limit.

By Pangaea on Feb 04, 2014

If your on a server like freenode that dose not give you any indication that what you have typed in to the channel was cut off due whatever the servers char/byte limit is, sometimes conversations can get confusing.

This is designed to be run on a bot that will simply warn a person that what they have typed into chan was likely cut off, and then shows the last 3 words it saw from that text.

Some Notes:
You might like to set it to notice the user rather then message the chan
You might like to tweak the char number from 400 to something else that more suits the server you are on.

A special thanks to smitey and andrio for the fantastic help on this.


Indie-Games on freenode

http://fractalscapes.net/IndieGames/members/

on 1:TEXT:*:#yourchan:{
  if ($len($1-) > 400) {
    msg $chan You may have exceeded the character limit. Here are the last words I saw:
    msg $chan $gettok($right($1-, $calc($len($1-) - 400)), 1-3, 32)
  }
}

Comments

Sign in to comment.
ProIcons   -  Feb 23, 2014
msg $chan $gettok($right($1-, $calc($len($1-) - 400)), 1-3, 32)

->

$gettok($1-,-1 - -3,32)
 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.