From 7d75a739998b33fda83091183b70d8bba9f3fb4b 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@974 c11ca15a-4712-0410-83d8-924469b57eb5 --- blootbot/src/IRC/Irc.pl | 8 ++++++++ 1 file changed, 8 insertions(+) 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') { -- 2.39.5