From: timriker Date: Thu, 1 Jul 2004 14:54:48 +0000 (+0000) Subject: chop lines - FIXME need real throttling X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=7d75a739998b33fda83091183b70d8bba9f3fb4b;p=infobot.git chop lines - FIXME need real throttling git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk@974 c11ca15a-4712-0410-83d8-924469b57eb5 --- diff --git a/blootbot/src/IRC/Irc.pl b/blootbot/src/IRC/Irc.pl index c1c2753..8770225 100644 --- a/blootbot/src/IRC/Irc.pl +++ b/blootbot/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') {