]> git.donarmstrong.com Git - infobot.git/commitdiff
word break
authortimriker <timriker@c11ca15a-4712-0410-83d8-924469b57eb5>
Thu, 1 Jul 2004 15:24:14 +0000 (15:24 +0000)
committertimriker <timriker@c11ca15a-4712-0410-83d8-924469b57eb5>
Thu, 1 Jul 2004 15:24:14 +0000 (15:24 +0000)
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@976 c11ca15a-4712-0410-83d8-924469b57eb5

src/IRC/Irc.pl

index 87702252d7635f60d542b6aaa43247497a7104bf..ddc7fde35e8260cb6ee2cd0355245c725965d803 100644 (file)
@@ -350,7 +350,8 @@ sub performReply {
 
     # FIXME need real throttling....
     if (length($reply) > $maxlinelen - 30) {
-       $reply = substr($reply, 0, $maxlinelen - 33) . "...";
+       $reply = substr($reply, 0, $maxlinelen - 33);
+       $reply =~ s/ [^ ]*?$/ .../;
     }
     &checkMsgType($reply);
 
@@ -396,7 +397,8 @@ sub performStrictReply {
 
     # FIXME need real throttling....
     if (length($reply) > $maxlinelen - 30) {
-       $reply = substr($reply, 0, $maxlinelen - 33) . "...";
+       $reply = substr($reply, 0, $maxlinelen - 33);
+       $reply =~ s/ [^ ]*?$/ .../;
     }
     &checkMsgType($reply);