X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=src%2FIRC%2FIrc.pl;h=87702252d7635f60d542b6aaa43247497a7104bf;hb=7b79dd6c79d3c7a000b16ee15f94480aa0c15d63;hp=c1c2753cb7f44cae694e69108527e776d6a32085;hpb=25e4b444eb73249ec219ee495b0fd597f83cff2f;p=infobot.git diff --git a/src/IRC/Irc.pl b/src/IRC/Irc.pl index c1c2753..8770225 100644 --- a/src/IRC/Irc.pl +++ b/src/IRC/Irc.pl @@ -348,6 +348,10 @@ sub performReply { $reply =~ /([\.\?\s]+)$/; + # FIXME need real throttling.... + if (length($reply) > $maxlinelen - 30) { + $reply = substr($reply, 0, $maxlinelen - 33) . "..."; + } &checkMsgType($reply); if ($msgType eq 'public') { @@ -390,6 +394,10 @@ sub pSReply { sub performStrictReply { my ($reply) = @_; + # FIXME need real throttling.... + if (length($reply) > $maxlinelen - 30) { + $reply = substr($reply, 0, $maxlinelen - 33) . "..."; + } &checkMsgType($reply); if ($msgType eq 'private') {