From 7b79dd6c79d3c7a000b16ee15f94480aa0c15d63 Mon Sep 17 00:00:00 2001 From: timriker Date: Thu, 1 Jul 2004 14:54:48 +0000 Subject: [PATCH] chop lines - FIXME need real throttling git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@974 c11ca15a-4712-0410-83d8-924469b57eb5 --- src/IRC/Irc.pl | 8 ++++++++ 1 file changed, 8 insertions(+) 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') { -- 2.39.5