]> git.donarmstrong.com Git - infobot.git/commitdiff
chop lines - FIXME need real throttling
authortimriker <timriker@c11ca15a-4712-0410-83d8-924469b57eb5>
Thu, 1 Jul 2004 14:54:48 +0000 (14:54 +0000)
committertimriker <timriker@c11ca15a-4712-0410-83d8-924469b57eb5>
Thu, 1 Jul 2004 14:54:48 +0000 (14:54 +0000)
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@974 c11ca15a-4712-0410-83d8-924469b57eb5

src/IRC/Irc.pl

index c1c2753cb7f44cae694e69108527e776d6a32085..87702252d7635f60d542b6aaa43247497a7104bf 100644 (file)
@@ -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') {